diff --git a/workflow/engine/methods/users/users_Edit.php b/workflow/engine/methods/users/users_Edit.php index 19274e49e..a16f89215 100755 --- a/workflow/engine/methods/users/users_Edit.php +++ b/workflow/engine/methods/users/users_Edit.php @@ -32,7 +32,7 @@ try { G::LoadClass('xmlfield_Image'); } require_once 'classes/model/Users.php'; - require_once 'classes/model/Department.php'; + require_once 'classes/model/Department.php'; $_SESSION['CURRENT_USER'] = $_GET['USR_UID']; $oUser = new Users(); @@ -144,17 +144,18 @@ try { global $_DBArray; $_DBArray['aUserInfo'] = $aUserInfo; $_SESSION['_DBArray'] = $_DBArray; - - //always show this form users_EditRT.xml. - $G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/users_EditRT.xml', '', $aFields, 'users_Save?USR_UID=' . $_SESSION['CURRENT_USER']); - //if (isset($aFields['DEP_UID']) && isset($aFields['USR_REPORTS_TO']) && $aFields['DEP_UID']!='' && $aFields['USR_REPORTS_TO']!='') - // $G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/users_EditRT.xml', '', $aFields, 'users_Save?USR_UID=' . $_SESSION['CURRENT_USER']); - //else - // $G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/users_Edit.xml', '', $aFields, 'users_Save?USR_UID=' . $_SESSION['CURRENT_USER']); - + if ($_GET['USR_AUTH_SOURCE'] == 'ProcessMaker (MYSQL)') { + //always show this form users_EditRT.xml. + $G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/users_EditRT.xml', '', $aFields, 'users_Save?USR_UID=' . $_SESSION['CURRENT_USER']); + } + else { + //for users ldap always show this form users_EditLDAP.xml. + $G_PUBLISH->AddContent('xmlform', 'xmlform', 'users/users_EditLDAP.xml', '', $aFields, 'users_Save?USR_UID=' . $_SESSION['CURRENT_USER']); + } + G::RenderPage('publish','blank'); } catch (Exception $oException) { die($oException->getMessage()); } -?> \ No newline at end of file +?> diff --git a/workflow/engine/templates/users/usersList.js b/workflow/engine/templates/users/usersList.js index b89169305..5e14ebeff 100755 --- a/workflow/engine/templates/users/usersList.js +++ b/workflow/engine/templates/users/usersList.js @@ -414,8 +414,8 @@ SummaryTabOpen = function(){ //Edit User Action EditUserAction = function(){ var uid = infoGrid.getSelectionModel().getSelected(); - if (uid){ - location.href = 'users_Edit?USR_UID=' + uid.data.USR_UID; + if (uid) { + location.href = 'users_Edit?USR_UID=' + uid.data.USR_UID+'&USR_AUTH_SOURCE=' + uid.data.USR_AUTH_SOURCE; } }; diff --git a/workflow/engine/xmlform/users/users_EditLDAP.html b/workflow/engine/xmlform/users/users_EditLDAP.html new file mode 100644 index 000000000..ba1c6e942 --- /dev/null +++ b/workflow/engine/xmlform/users/users_EditLDAP.html @@ -0,0 +1,157 @@ +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{$form.menuUser}
{$form.TITLE3}
{$USR_PHOTO_SHOW}{$form.USR_PHOTO_SHOW}
{$USR_PHOTO}{$form.USR_PHOTO}
{$USR_RESUME}{$form.USR_RESUME}
{$MAX_FILES_SIZE}{$form.MAX_FILES_SIZE}
{$form.TITLE1}
* {$USR_FIRSTNAME}{$form.USR_FIRSTNAME}
* {$USR_LASTNAME}{$form.USR_LASTNAME}
* {$USR_USERNAME}{$form.USR_USERNAME}
* {$USR_EMAIL}{$form.USR_EMAIL}
{$USR_ADDRESS}{$form.USR_ADDRESS}
{$USR_ZIP_CODE}{$form.USR_ZIP_CODE}
{$USR_COUNTRY}{$form.USR_COUNTRY}
{$USR_CITY}{$form.USR_CITY}
{$USR_LOCATION}{$form.USR_LOCATION}
{$USR_PHONE}{$form.USR_PHONE}
{$USR_POSITION}{$form.USR_POSITION}
{$USR_REPORTS_TO}{$form.USR_REPORTS_TO}
{$USR_DEPARTMENT}{$form.USR_DEPARTMENT}
{$USR_REPLACED_BY}{$form.USR_REPLACED_BY}
* {$USR_DUE_DATE}{$form.USR_DUE_DATE}
* {$USR_CALENDAR}{$form.USR_CALENDAR}
{$USR_STATUS}{$form.USR_STATUS}
{$USR_ROLE}{$form.USR_ROLE}
{$form.TITLE2}
* {$USR_NEW_PASS}{$form.USR_NEW_PASS}
* {$USR_CNF_PASS}{$form.USR_CNF_PASS}
{$form.SUBMIT}   {$form.BTN_CANCEL}
+
+
* {php}echo (G::LoadTranslation('ID_REQUIRED_FIELD'));{/php}
+
+
+ + +
+ diff --git a/workflow/engine/xmlform/users/users_EditLDAP.xml b/workflow/engine/xmlform/users/users_EditLDAP.xml new file mode 100644 index 000000000..75d36fbd7 --- /dev/null +++ b/workflow/engine/xmlform/users/users_EditLDAP.xml @@ -0,0 +1,256 @@ + + + + + + + Profile + + + + + + + Photo + + + Résumé + + + Max upload files size in bytes + + + Personal Information + + + + First Name + + + Last Name + + + User ID (*) + + + Email + + + Address + + + Zip/Postal Code + + + SELECT IC_UID, IC_NAME FROM ISO_COUNTRY ORDER BY IC_NAME + Country + + State or Region + + Location + + + Phone + + + Position + + + Reports to + + + Department + + + SELECT * FROM aUserInfo + Replaced by + + + Expiration Date + + + SELECT CALENDAR_UID, CALENDAR_NAME FROM availableCalendars + Calendar + + + + + Status + + + + + + Role + + + Change Password + + + New Password + + + Confirm Password + + + Save + + + Cancel + + + + + + + + 0) { + showRow(this); + } + else { + hideRow(this); + } + }; + + function cancel(){ + window.location = 'users_List'; + } + + ]]> + +