BUG 0000 Changes in new and edit user SOLVED

- Also changes suggested by julio cesar
This commit is contained in:
Alvaro Campos
2012-06-20 19:00:41 -04:00
parent f289ad4ed4
commit e230492bf9
6 changed files with 15 additions and 9 deletions

View File

@@ -1022,11 +1022,12 @@ class System {
if (empty($wsName)) { if (empty($wsName)) {
$uriParts = explode('/', getenv("REQUEST_URI")); $uriParts = explode('/', getenv("REQUEST_URI"));
if (substr($uriParts[1], 0, 3 ) == 'sys') { if (isset($uriParts[1])) {
$wsName = substr($uriParts[1], 3); if (substr($uriParts[1], 0, 3 ) == 'sys') {
$wsName = substr($uriParts[1], 3);
}
} }
} }
$wsIniFile = PATH_DB . $wsName . PATH_SEP . 'env.ini'; $wsIniFile = PATH_DB . $wsName . PATH_SEP . 'env.ini';
} }
} }

View File

@@ -556,7 +556,7 @@ switch($_POST['action'])
} else { } else {
$color = 'green'; $color = 'green';
$img = '/images/dialog-ok-apply.png'; $img = '/images/dialog-ok-apply.png';
$aFields['DESCRIPTION'] .= G::LoadTranslation('ID_PASSWORD_COMPLIES_POLICIES') . '</span>'; $aFields['DESCRIPTION'] = G::LoadTranslation('ID_PASSWORD_COMPLIES_POLICIES') . '</span>';
$aFields['STATUS'] = true; $aFields['STATUS'] = true;
} }
$span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">'; $span = '<span style="color: ' . $color . '; font: 9px tahoma,arial,helvetica,sans-serif;">';

View File

@@ -15,5 +15,6 @@ if ( $postMaxSize < $uploadMaxSize ) $uploadMaxSize = $postMaxSize;
$oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/users', true ); //adding a javascript file .js $oHeadPublisher->addExtJsScript('users/users', true ); //adding a javascript file .js
$oHeadPublisher->assign('USR_UID', $_GET['USR_UID']); $oHeadPublisher->assign('USR_UID', $_GET['USR_UID']);
$oHeadPublisher->assign('MODE', $_GET['MODE']);
$oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') '); $oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
G::RenderPage('publish', 'extJs'); G::RenderPage('publish', 'extJs');

View File

@@ -16,5 +16,6 @@ if ( $postMaxSize < $uploadMaxSize ) $uploadMaxSize = $postMaxSize;
$oHeadPublisher =& headPublisher::getSingleton(); $oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('users/users', true ); //adding a javascript file .js $oHeadPublisher->addExtJsScript('users/users', true ); //adding a javascript file .js
$oHeadPublisher->assign('USR_UID', ''); $oHeadPublisher->assign('USR_UID', '');
$oHeadPublisher->assign('MODE', $_GET['MODE']);
$oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') '); $oHeadPublisher->assign('MAX_FILES_SIZE', ' (' . $UPLOAD_MAX_SIZE . ') ');
G::RenderPage('publish', 'extJs'); G::RenderPage('publish', 'extJs');

View File

@@ -33,6 +33,9 @@ Ext.onReady(function() {
}); });
if (MODE == 'edit')
flagPoliciesPassword = true;
//EDIT MODE //EDIT MODE
if (USR_UID != '') { if (USR_UID != '') {
allowBlackStatus = true; allowBlackStatus = true;

View File

@@ -403,7 +403,7 @@ DoNothing = function(){};
//Open New User Form //Open New User Form
NewUserAction = function(){ NewUserAction = function(){
location.href = 'usersNew'; location.href = 'usersNew?MODE=new';
}; };
//Delete User Action //Delete User Action
@@ -469,7 +469,7 @@ SummaryTabOpen = function(){
EditUserAction = function(){ EditUserAction = function(){
var uid = infoGrid.getSelectionModel().getSelected(); var uid = infoGrid.getSelectionModel().getSelected();
if (uid) { if (uid) {
location.href = 'usersEdit?USR_UID=' + uid.data.USR_UID+'&USR_AUTH_SOURCE=' + uid.data.USR_AUTH_SOURCE; location.href = 'usersEdit?USR_UID=' + uid.data.USR_UID+'&USR_AUTH_SOURCE=' + uid.data.USR_AUTH_SOURCE+'&MODE=edit';
} }
}; };