Merged in dheeyi/processmaker/PM-2104 (pull request #1930)

PM-2104 Se visualiza una "," en el Loguot ,Administrador en el nuevo instalador de PM3-RC3
This commit is contained in:
Julio Cesar Laura Avendaño
2015-04-20 18:36:39 -04:00
4 changed files with 27 additions and 6 deletions

View File

@@ -320,8 +320,17 @@ class Configurations // extends Configuration
if ($usrUid != '') {
$oUser = UsersPeer::retrieveByPK($usrUid);
$aux = str_replace('@userName', trim($username), $this->UserConfig['format']);
$theFormat = $this->UserConfig['format'];
$fname = $oUser->getUsrFirstname();
$lname = $oUser->getUsrLastname();
if (strpos($theFormat, ',') !== false && ( trim($fname) == '' || trim($lname) == '')) {
$theFormat = str_replace(',', '', $theFormat);
}
$aux = str_replace('@userName', trim($username), $theFormat);
$aux = str_replace('@firstName', $oUser->getUsrFirstname(), $aux);
$aux = str_replace('@lastName', $oUser->getUsrLastname(), $aux);
$aux = str_replace('@lastName', $oUser->getUsrLastname(), $aux);
}
return $aux;
}

View File

@@ -840,10 +840,10 @@ class Installer extends Controller
$query = sprintf( "USE %s;", $wf_workpace );
$this->mysqlQuery( $query );
$query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) );
$query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_LASTNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, $adminUsername, md5( $adminPassword ) );
$this->mysqlQuery( $query );
$query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, md5( $adminPassword ) );
$query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_LASTNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, $adminUsername, md5( $adminPassword ) );
$this->mysqlQuery( $query );
// Write the paths_installed.php file (contains all the information configured so far)

View File

@@ -752,7 +752,7 @@ class SkinEngine
} else {
$smarty->assign('udate', G::getformatedDate(date('Y-m-d H:i:s'), 'M d, yyyy', SYS_LANG));
}
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
$name = $conf->userNameFormat(isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME']: '', isset($_SESSION['USR_FULLNAME']) ? htmlentities($_SESSION['USR_FULLNAME'] , ENT_QUOTES, 'UTF-8'): '', isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '');
$smarty->assign('user',$name);
}

View File

@@ -409,14 +409,26 @@ Ext.onReady(function () {
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_FIRSTNAME')) +'"> * </span>' + _('ID_FIRSTNAME'),
xtype : 'textfield',
width : 260,
allowBlank : false
allowBlank : false,
listeners: {
'change': function(field, newVal, oldVal){
var fname = newVal.replace(/^\s+/,'').replace(/\s+$/,'');
field.setValue(fname.trim());
}
}
},
{
id : 'USR_LASTNAME',
fieldLabel : '<span style=\"color:red;\" ext:qtip="'+ _('ID_FIELD_REQUIRED', _('ID_LASTNAME')) +'"> * </span>' + _('ID_LASTNAME'),
xtype : 'textfield',
width : 260,
allowBlank : false
allowBlank : false,
listeners: {
'change': function(field, newVal, oldVal){
var lname = newVal.replace(/^\s+/,'').replace(/\s+$/,'');
field.setValue(lname.trim());
}
}
},
{
id : 'USR_USERNAME',