mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
cambios de legacytables3
This commit is contained in:
@ -3,6 +3,31 @@
|
||||
/// Control Rules and Menus
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
//JJO
|
||||
function ruleIsChecked($rules, $section, $method){
|
||||
if ($rules==null){
|
||||
return false;
|
||||
}
|
||||
$json = json_decode($rules);
|
||||
foreach($json as $key=>$value){
|
||||
if($key==$section){
|
||||
foreach($value as $item){
|
||||
if($item==$method){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
/*var_dump($key. ' '. $value[0]);
|
||||
|
||||
echo '<pre>';
|
||||
$rules =
|
||||
echo '</pre>';
|
||||
dd();*/
|
||||
}
|
||||
|
||||
function getAllClass($controller = null){
|
||||
try {
|
||||
helper('filesystem');
|
||||
@ -191,6 +216,7 @@ function getDictionary($word=''){
|
||||
'Calendario' => lang("App.permisos_calendario"),
|
||||
'Correo' => lang("App.permisos_correo"),
|
||||
'Paises' => lang("App.permisos_paises"),
|
||||
'Tipologias' => lang("App.permisos_tipologias"),
|
||||
|
||||
'Presupuestos' => lang("App.permisos_presupuestos"),
|
||||
'Presupuesto' => lang("App.permisos_presupuestos"),
|
||||
@ -298,28 +324,16 @@ function getArrayItem(array $array, $key, $word, $isArray=false)
|
||||
/// Notification Messages
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
// IMN Modified
|
||||
function formAlert()
|
||||
{
|
||||
$session = session();
|
||||
$alert = $session->getFlashdata('error');
|
||||
|
||||
$validation = \Config\Services::validation()->listErrors();
|
||||
if (!empty($alert)){
|
||||
|
||||
$validations = \Config\Services::validation()->getErrors();
|
||||
$alerts = "";
|
||||
|
||||
foreach ($validations as $key => $value){
|
||||
|
||||
$alerts .= '<div class="alert alert-danger alert-dismissible" role="alert">'.
|
||||
' ' . $value .
|
||||
' <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">'.
|
||||
' </button>'.
|
||||
'</div>';
|
||||
|
||||
}
|
||||
|
||||
return $alerts;
|
||||
return '<div class="alert alert-danger alert-dismissible alert-alt solid fade show">'.
|
||||
' <button type="button" class="close h-100" data-dismiss="alert" aria-label="Close"><span><i class="mdi mdi-close"></i></span>'.
|
||||
' </button>'. $validation .
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user