diff --git a/.gitignore b/.gitignore index 56d5395c..e32129b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /config/config.php /nbproject/ /res/ -/backup/ \ No newline at end of file +/backup/ +/patches/ \ No newline at end of file diff --git a/ajax/ajax_getcontent.php b/ajax/ajax_getcontent.php index 4da15aca..f8ce811c 100644 --- a/ajax/ajax_getcontent.php +++ b/ajax/ajax_getcontent.php @@ -101,33 +101,34 @@ switch ($action) { if (SP_Users::checkUserAccess("users")) { $arrUsersTableProp = array( - "tblId" => "tblUsers", - "header" => '', - "tblHeaders" => array( - _('Nombre') - , _('Login') - , _('Perfil') - , _('Grupo') - , _('Propiedades') - , ''), - "tblRowSrc" => array( - "user_name" - , "user_login" - , "userprofile_name" - , "usergroup_name" - , array( - "user_isAdminApp" => array('img_file' => "check_blue.png", 'img_title' => _('Admin Aplicación')) - , "user_isAdminAcc" => array('img_file' => "check_orange.png", 'img_title' => _('Admin Cuentas')) - , "user_isLdap" => array('img_file' => "ldap.png", 'img_title' => _('Usuario de LDAP')) - , "user_isDisabled" => array('img_file' => "disabled.png", 'img_title' => _('Deshabilitado')) + 'itemName' => _('Usuario'), + 'tblId' => 'tblUsers', + 'header' => '', + 'tblHeaders' => array( + _('Nombre'), + _('Login'), + _('Perfil'), + _('Grupo'), + _('Propiedades'), + ''), + 'tblRowSrc' => array( + 'user_name', + 'user_login', + 'userprofile_name', + 'usergroup_name', + array( + 'user_isAdminApp' => array('img_file' => 'check_blue.png', 'img_title' => _('Admin Aplicación')), + 'user_isAdminAcc' => array('img_file' => 'check_orange.png', 'img_title' => _('Admin Cuentas')), + 'user_isLdap' => array('img_file' => 'ldap.png', 'img_title' => _('Usuario de LDAP')), + 'user_isDisabled' => array('img_file' => 'disabled.png', 'img_title' => _('Deshabilitado')) ) ), - "tblRowSrcId" => "user_id", - "frmId" => "frm_tblusers", - "actionId" => 1, - "newActionId" => 2, - "active" => $tplvars['active']++, - "actions" => array("edit", "del", "pass")); + 'tblRowSrcId' => 'user_id', + 'frmId' => 'frm_tblusers', + 'actionId' => 1, + 'newActionId' => 2, + 'active' => $tplvars['active']++, + 'actions' => array('view', 'edit', 'del', 'pass')); echo '
'; $startTime = microtime(); @@ -141,16 +142,18 @@ switch ($action) { } if (SP_Users::checkUserAccess("groups")) { - $arrGroupsTableProp = array("tblId" => "tblGroups", - "header" => '', - "tblHeaders" => array(_('Nombre'), _('Descripción'), ''), - "tblRowSrc" => array("usergroup_name", "usergroup_description"), - "tblRowSrcId" => "usergroup_id", - "frmId" => "frm_tblgroups", - "actionId" => 3, - "newActionId" => 4, - "active" => $tplvars['active']++, - "actions" => array("edit", "del")); + $arrGroupsTableProp = array( + 'itemName' => _('Grupo'), + 'tblId' => 'tblGroups', + 'header' => '', + 'tblHeaders' => array(_('Nombre'), _('Descripción'), ''), + 'tblRowSrc' => array('usergroup_name', 'usergroup_description'), + 'tblRowSrcId' => 'usergroup_id', + 'frmId' => 'frm_tblgroups', + 'actionId' => 3, + 'newActionId' => 4, + 'active' => $tplvars['active']++, + 'actions' => array('edit', 'del')); echo '
'; @@ -166,16 +169,18 @@ switch ($action) { } if (SP_Users::checkUserAccess("profiles")) { - $arrProfilesTableProp = array("tblId" => "tblProfiles", - "header" => '', - "tblHeaders" => array(_('Nombre'), ''), - "tblRowSrc" => array("userprofile_name"), - "tblRowSrcId" => "userprofile_id", - "frmId" => "frm_tblprofiles", - "actionId" => 5, - "newActionId" => 6, - "active" => $tplvars['active']++, - "actions" => array("edit", "del")); + $arrProfilesTableProp = array( + 'itemName' => _('Perfil'), + 'tblId' => 'tblProfiles', + 'header' => '', + 'tblHeaders' => array(_('Nombre'), ''), + 'tblRowSrc' => array('userprofile_name'), + 'tblRowSrcId' => 'userprofile_id', + 'frmId' => 'frm_tblprofiles', + 'actionId' => 5, + 'newActionId' => 6, + 'active' => $tplvars['active']++, + 'actions' => array('edit', 'del')); echo '
'; diff --git a/ajax/ajax_usersMgmt.php b/ajax/ajax_usersMgmt.php index 546d7057..9190cbfa 100644 --- a/ajax/ajax_usersMgmt.php +++ b/ajax/ajax_usersMgmt.php @@ -36,6 +36,7 @@ if ( SP_Common::parseParams('p', 'id', FALSE, TRUE) && SP_Common::parseParams('p $tplvars['itemid'] = SP_Common::parseParams('p', 'id', 0); $itemType = $tplvars['itemtype'] = SP_Common::parseParams('p', 'type', 0); $tplvars['active'] = SP_Common::parseParams('p', 'active', 0); + $tplvars['view'] = SP_Common::parseParams('p', 'view', 0); } else { return; } @@ -43,30 +44,30 @@ if ( SP_Common::parseParams('p', 'id', FALSE, TRUE) && SP_Common::parseParams('p switch ($itemType) { case 1: $tplvars['header'] = _('Editar Usuario'); + $template = 'users'; break; case 2: $tplvars['header'] = _('Nuevo Usuario'); + $template = 'users'; break; case 3: $tplvars['header'] = _('Editar Grupo'); + $template = 'groups'; break; case 4: $tplvars['header'] = _('Nuevo Grupo'); + $template = 'groups'; break; case 5: $tplvars['header'] = _('Editar Perfil'); + $template = 'profiles'; break; case 6: $tplvars['header'] = _('Nuevo Perfil'); + $template = 'profiles'; break; default : break; } -if ($itemType == 1 || $itemType == 2) { - SP_Html::getTemplate('users', $tplvars); -} elseif ($itemType == 3 || $itemType == 4) { - SP_Html::getTemplate('groups', $tplvars); -} elseif ($itemType == 5 || $itemType == 6) { - SP_Html::getTemplate('profiles', $tplvars); -} \ No newline at end of file +SP_Html::getTemplate($template, $tplvars); \ No newline at end of file diff --git a/inc/tpl/accounts.php b/inc/tpl/accounts.php index 0d36e7dc..3f5f1d1a 100644 --- a/inc/tpl/accounts.php +++ b/inc/tpl/accounts.php @@ -281,7 +281,7 @@ $maxFileSize = round(SP_Config::getValue('allowed_size') / 1024, 1);
-
+
upload
diff --git a/inc/tpl/eventlog.php b/inc/tpl/eventlog.php index 121f19ef..d42d6db6 100644 --- a/inc/tpl/eventlog.php +++ b/inc/tpl/eventlog.php @@ -87,7 +87,7 @@ $numRows = $resQueryNumRows[0]->numRows; $description = ( $isDemoMode === 0 ) ? utf8_decode($log->log_description) : preg_replace("/\d+\.\d+\.\d+\.\d+/", "*.*.*.*", utf8_decode($log->log_description)); ?> - + log_id; ?> diff --git a/inc/tpl/users.php b/inc/tpl/users.php index 13b95382..d06c341b 100644 --- a/inc/tpl/users.php +++ b/inc/tpl/users.php @@ -26,11 +26,12 @@ defined('APP_ROOT') || die(_('No es posible acceder directamente a este archivo')); $activeTab = $data['active']; +$isView = $data['view']; $user = SP_Users::getUserData($data['itemid']); $isDemo = SP_Config::getValue('demoenabled', 0); -$isDisabled = ( $isDemo ) ? 'disabled' : ''; +$isDisabled = ( $isDemo || $isView ) ? 'disabled' : ''; $profilesSelProp = array('name' => 'profileid', 'id' => 'selProfile', @@ -40,7 +41,7 @@ $profilesSelProp = array('name' => 'profileid', 'selected' => $user['user_profileId'], 'default' => '', 'js' => '', - 'attribs' => array('required')); + 'attribs' => array('required',$isDisabled)); $groupsSelProp = array('name' => 'groupid', 'id' => 'selGroup', @@ -50,7 +51,7 @@ $groupsSelProp = array('name' => 'groupid', 'selected' => $user['user_groupId'], 'default' => '', 'js' => '', - 'attribs' => array('required')); + 'attribs' => array('required',$isDisabled)); $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : ""; ?> @@ -63,16 +64,28 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : ""; - + + + - /> - - - + + /> + + + + @@ -93,12 +106,18 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : ""; - + + + - + @@ -136,26 +155,52 @@ $ro = ( $user['checks']['user_isLdap'] ) ? "READONLY" : ""; /> - /> + />
+ + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + -
-
-
    -
  • -
-
+ + +
+
+
    +
  • +
+
+