BUG 9216 Al cambiar el idioma por system settings... SOLVED
- By selecting the language in settings the Dropdown shows no language predefined. - was add posts to language in the login and system for more information, and was modified the Dropdown for show the language predefined.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -22,58 +22,62 @@
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if (isset ( $_POST ['form'] ['USER_ENV'] )) {
|
if (isset ($_POST['form']['USER_ENV'])) {
|
||||||
session_start ();
|
session_start ();
|
||||||
$_SESSION ['sysLogin'] = $_POST ['form'];
|
$_SESSION ['sysLogin'] = $_POST ['form'];
|
||||||
G::header ( 'location: /sys' . $_POST ['form'] ['USER_ENV'] . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/sysLoginVerify' );
|
G::header ('location: /sys' . $_POST ['form'] ['USER_ENV'] . '/' . SYS_LANG . '/' . SYS_SKIN .
|
||||||
die ();
|
'/login/sysLoginVerify');
|
||||||
|
die ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Required classes for dbArray work
|
//Required classes for dbArray work
|
||||||
require_once ("propel/Propel.php");
|
require_once ("propel/Propel.php");
|
||||||
require_once ("creole/Creole.php");
|
require_once ("creole/Creole.php");
|
||||||
G::LoadThirdParty ( "pake", "pakeColor.class" );
|
G::LoadThirdParty ("pake", "pakeColor.class");
|
||||||
Propel::init ( PATH_CORE . "config/databases.php" );
|
Propel::init (PATH_CORE . "config/databases.php");
|
||||||
Creole::registerDriver ( 'dbarray', 'creole.contrib.DBArrayConnection' );
|
Creole::registerDriver ('dbarray', 'creole.contrib.DBArrayConnection');
|
||||||
|
|
||||||
function getLangFiles() {
|
function getLangFiles()
|
||||||
$dir = PATH_LANGUAGECONT;
|
{
|
||||||
$filesArray = array ();
|
$dir = PATH_LANGUAGECONT;
|
||||||
if (file_exists ( $dir )) {
|
$filesArray = array ();
|
||||||
if ($handle = opendir ( $dir )) {
|
if (file_exists ($dir)) {
|
||||||
while ( false !== ($file = readdir ( $handle )) ) {
|
if ($handle = opendir ($dir)) {
|
||||||
|
while (false !== ($file = readdir ($handle))) {
|
||||||
|
|
||||||
$fileParts = explode ( ".", $file );
|
$fileParts = explode (".", $file);
|
||||||
if ($fileParts [0] == "translation") {
|
if ($fileParts [0] == "translation") {
|
||||||
$filesArray [$fileParts [1]] = $file;
|
$filesArray [$fileParts [1]] = $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir ($handle);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
closedir ( $handle );
|
|
||||||
}
|
}
|
||||||
}
|
return $filesArray;
|
||||||
return $filesArray;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkspacesAvailable() {
|
function getWorkspacesAvailable()
|
||||||
G::LoadClass ( 'serverConfiguration' );
|
{
|
||||||
$oServerConf = & serverConf::getSingleton ();
|
G::LoadClass ('serverConfiguration');
|
||||||
$dir = PATH_DB;
|
$oServerConf = & serverConf::getSingleton ();
|
||||||
$filesArray = array ();
|
$dir = PATH_DB;
|
||||||
if (file_exists ( $dir )) {
|
$filesArray = array ();
|
||||||
if ($handle = opendir ( $dir )) {
|
if (file_exists ($dir)) {
|
||||||
while ( false !== ($file = readdir ( $handle )) ) {
|
if ($handle = opendir ($dir)) {
|
||||||
if (($file != ".") && ($file != "..")) {
|
while (false !== ($file = readdir ($handle))) {
|
||||||
if (file_exists ( PATH_DB . $file . '/db.php' )) {
|
if (($file != ".") && ($file != "..")) {
|
||||||
if (! $oServerConf->isWSDisabled ( $file ))
|
if (file_exists (PATH_DB . $file . '/db.php')) {
|
||||||
$filesArray [] = $file;
|
if (! $oServerConf->isWSDisabled ($file)) {
|
||||||
}
|
$filesArray [] = $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir ($handle);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
closedir ( $handle );
|
|
||||||
}
|
}
|
||||||
}
|
sort ($filesArray, SORT_STRING);
|
||||||
sort ( $filesArray, SORT_STRING );
|
return $filesArray;
|
||||||
return $filesArray;
|
|
||||||
}
|
}
|
||||||
$availableWorkspace = getWorkspacesAvailable ();
|
$availableWorkspace = getWorkspacesAvailable ();
|
||||||
|
|
||||||
@@ -82,24 +86,25 @@ $Translations = G::getModel("Translation");
|
|||||||
$translationsTable = $Translations->getTranslationEnvironments();
|
$translationsTable = $Translations->getTranslationEnvironments();
|
||||||
|
|
||||||
$availableLangArray = array ();
|
$availableLangArray = array ();
|
||||||
$availableLangArray [] = array ('LANG_ID' => 'char', 'LANG_NAME' => 'char' );
|
$availableLangArray [] = array ('LANG_ID' => 'char', 'LANG_NAME' => 'char');
|
||||||
|
|
||||||
foreach ( $translationsTable as $locale ) {
|
foreach ($translationsTable as $locale) {
|
||||||
$aFields['LANG_ID'] = $locale['LOCALE'];
|
$aFields['LANG_ID'] = $locale['LOCALE'];
|
||||||
if( $locale['COUNTRY'] != '.' )
|
if ($locale['COUNTRY'] != '.') {
|
||||||
$aFields['LANG_NAME'] = $locale['LANGUAGE'] . ' (' . (ucwords(strtolower($locale['COUNTRY']))) . ')';
|
$aFields['LANG_NAME'] = $locale['LANGUAGE'] . ' (' . (ucwords(strtolower($locale['COUNTRY']))) . ')';
|
||||||
else
|
} else {
|
||||||
$aFields['LANG_NAME'] = $locale['LANGUAGE'];
|
$aFields['LANG_NAME'] = $locale['LANGUAGE'];
|
||||||
|
}
|
||||||
|
|
||||||
$availableLangArray [] = $aFields;
|
$availableLangArray [] = $aFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$availableWorkspaceArray = array ();
|
$availableWorkspaceArray = array ();
|
||||||
$availableWorkspaceArray [] = array ('ENV_ID' => 'char', 'ENV_NAME' => 'char' );
|
$availableWorkspaceArray [] = array ('ENV_ID' => 'char', 'ENV_NAME' => 'char');
|
||||||
foreach ( $availableWorkspace as $envKey => $envName ) {
|
foreach ($availableWorkspace as $envKey => $envName) {
|
||||||
$aFields = array ('ENV_ID' => $envName, 'ENV_NAME' => $envName );
|
$aFields = array ('ENV_ID' => $envName, 'ENV_NAME' => $envName);
|
||||||
$availableWorkspaceArray [] = $aFields;
|
$availableWorkspaceArray [] = $aFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
@@ -109,24 +114,22 @@ $_DBArray ['availableWorkspace'] = $availableWorkspaceArray;
|
|||||||
|
|
||||||
$_SESSION ['_DBArray'] = $_DBArray;
|
$_SESSION ['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
$aField ['LOGIN_VERIFY_MSG'] = G::loadTranslation ( 'LOGIN_VERIFY_MSG' );
|
$aField ['LOGIN_VERIFY_MSG'] = G::loadTranslation ('LOGIN_VERIFY_MSG');
|
||||||
$aField['USER_LANG'] = SYS_LANG;
|
$aField['USER_LANG'] = SYS_LANG;
|
||||||
//Get Server Configuration
|
//Get Server Configuration
|
||||||
G::LoadClass ( 'serverConfiguration' );
|
G::LoadClass ('serverConfiguration');
|
||||||
$oServerConf = & serverConf::getSingleton ();
|
$oServerConf = & serverConf::getSingleton ();
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher ( );
|
$G_PUBLISH = new Publisher ();
|
||||||
if ($oServerConf->getProperty ( 'LOGIN_NO_WS' )) {
|
if ($oServerConf->getProperty ('LOGIN_NO_WS')) {
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/sysLoginNoWS', '', $aField, 'sysLogin' );
|
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLoginNoWS', '', $aField, 'sysLogin');
|
||||||
}
|
} else {
|
||||||
else {
|
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLogin', '', $aField, 'sysLogin');
|
||||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/sysLogin', '', $aField, 'sysLogin' );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//g::dump($G_PUBLISH);
|
//g::dump($G_PUBLISH);
|
||||||
|
|
||||||
G::RenderPage ( "publish" );
|
G::RenderPage ("publish");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -134,48 +137,48 @@ G::RenderPage ( "publish" );
|
|||||||
var oInfoPanel;
|
var oInfoPanel;
|
||||||
var openInfoPanel = function()
|
var openInfoPanel = function()
|
||||||
{
|
{
|
||||||
|
// note added by carlos pacha carlos[at]colosa[dot]com pckrlos[at]gmail[dot]com
|
||||||
// note added by carlos pacha carlos[at]colosa[dot]com pckrlos[at]gmail[dot]com
|
// the following lines of code are getting the hight of panel. Related 8021 bug
|
||||||
// the following lines of code are getting the hight of panel. Related 8021 bug
|
var hightpnl= 424;
|
||||||
var hightpnl= 424;
|
var varjs = "<?php echo isset($_POST['form']['USER_ENV'])?$_POST['form']['USER_ENV']:''; ?>";
|
||||||
var varjs = "<?php echo isset($_POST['form']['USER_ENV'])?$_POST['form']['USER_ENV']:''; ?>";
|
if (varjs !=' ') {
|
||||||
if(varjs !=' ')
|
hightpnl= 330;
|
||||||
hightpnl= 330;
|
|
||||||
|
|
||||||
var oInfoPanel = new leimnud.module.panel();
|
|
||||||
oInfoPanel.options = {
|
|
||||||
size :{w:500,h:hightpnl},
|
|
||||||
position:{x:0,y:0,center:true},
|
|
||||||
title :'System Information',
|
|
||||||
theme :'processmaker',
|
|
||||||
control :{
|
|
||||||
close :true,
|
|
||||||
drag :false
|
|
||||||
},
|
|
||||||
fx:{
|
|
||||||
modal:true
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
oInfoPanel.setStyle = {modal: {
|
|
||||||
backgroundColor: 'white'
|
|
||||||
}};
|
|
||||||
oInfoPanel.make();
|
|
||||||
|
|
||||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
var oInfoPanel = new leimnud.module.panel();
|
||||||
url : '../login/dbInfo',
|
oInfoPanel.options = {
|
||||||
//async : false,
|
size :{w:500,h:hightpnl},
|
||||||
method: 'POST',
|
position:{x:0,y:0,center:true},
|
||||||
args : ''
|
title :'System Information',
|
||||||
});
|
theme :'processmaker',
|
||||||
|
control :{
|
||||||
|
close :true,
|
||||||
|
drag :false
|
||||||
|
},
|
||||||
|
fx:{
|
||||||
|
modal:true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
oInfoPanel.setStyle = {modal: {
|
||||||
|
backgroundColor: 'white'
|
||||||
|
}};
|
||||||
|
oInfoPanel.make();
|
||||||
|
|
||||||
oRPC.callback = function(oRPC) {
|
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||||
oInfoPanel.loader.hide();
|
url : '../login/dbInfo',
|
||||||
var scs = oRPC.xmlhttp.responseText.extractScript();
|
//async : false,
|
||||||
oInfoPanel.addContent(oRPC.xmlhttp.responseText);
|
method: 'POST',
|
||||||
scs.evalScript();
|
args : ''
|
||||||
}.extend(this);
|
});
|
||||||
|
|
||||||
oRPC.make();
|
oRPC.callback = function(oRPC) {
|
||||||
oInfoPanel.addContent(oRPC.xmlhttp.responseText);
|
oInfoPanel.loader.hide();
|
||||||
|
var scs = oRPC.xmlhttp.responseText.extractScript();
|
||||||
|
oInfoPanel.addContent(oRPC.xmlhttp.responseText);
|
||||||
|
scs.evalScript();
|
||||||
|
}.extend(this);
|
||||||
|
|
||||||
|
oRPC.make();
|
||||||
|
oInfoPanel.addContent(oRPC.xmlhttp.responseText);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -122,10 +122,7 @@ Ext.onReady(function(){
|
|||||||
bodyStyle:'padding:5px',
|
bodyStyle:'padding:5px',
|
||||||
frame: true,
|
frame: true,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
html:'The language that is set by default applies directly when the domain is entered '+
|
html: _('ID_MESSAGE_SYSTEM')+" "+_('ID_MESSAGE_SYSTEM2')
|
||||||
' (eg.- http://127.0.0.1:8081), the system reads the configuration and redirects '+
|
|
||||||
' the link to the selected language (eg.- http://127.0.0.1:8081/sys/en/classic/login/login),'+
|
|
||||||
' it should be emphasized that this configuration is for all environments.'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ Ext.onReady(function(){
|
|||||||
bodyStyle:'padding:5px',
|
bodyStyle:'padding:5px',
|
||||||
frame: true,
|
frame: true,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
html:'The default language that is configured in this place is for the "dropdown" of the '+
|
html: _('ID_MESSAGE_LOGIN')
|
||||||
'languages that are displaying on the login screen, this configuration is set for each workspace.'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
buttons : [saveButton]
|
buttons : [saveButton]
|
||||||
|
|||||||
Reference in New Issue
Block a user