diff --git a/gulliver/js/common/core/common.js b/gulliver/js/common/core/common.js
index 43bb1bbd9..fe3a208be 100755
--- a/gulliver/js/common/core/common.js
+++ b/gulliver/js/common/core/common.js
@@ -1116,7 +1116,7 @@ function setFocusById (id) {
}
function submitForm () {
- document.webform.submit();
+ document.forms[0].submit();
return;
}
diff --git a/gulliver/system/class.form.php b/gulliver/system/class.form.php
index 08e4a236e..08a78b372 100755
--- a/gulliver/system/class.form.php
+++ b/gulliver/system/class.form.php
@@ -329,26 +329,27 @@ class Form extends XmlForm
if (isset($v->options[$value])){
$values["{$k}_label"] .= ($i != 0 ? '|': '') . $v->options[$value];
- } else {
+ }
+ else { // if hasn't options try execute a sql sentence
$query = G::replaceDataField($this->fields[$k]->sql,$newValues);
- if(trim($query) == '') {
- continue;
- }
- //we do the query to the external connection and we've got the label
- $con = Propel::getConnection($this->fields[$k]->sqlConnection!=""?$this->fields[$k]->sqlConnection:"workflow");//use default connection workflow if connection is not defined. Same as Dynaforms
- $stmt = $con->prepareStatement($query);
- $rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM);
-
- while ($rs->next()) {
- list($rowId, $rowContent) = array_values($rs->getRow());//This to be sure that the array is numeric. Some cases when is DBArray result it returns an associative. By JHL
+ if ($query != '') { // execute just if a query was set, it should be not empty
+ //we do the query to the external connection and we've got the label
+ $con = Propel::getConnection($this->fields[$k]->sqlConnection!=""?$this->fields[$k]->sqlConnection:"workflow");//use default connection workflow if connection is not defined. Same as Dynaforms
- if ($value == $rowId){
- $values["{$k}_label"] .= ($i != 0 ? '|': '') . $rowContent;
- break;
+ $stmt = $con->prepareStatement($query);
+ $rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM);
+
+ while ($rs->next()) {
+ list($rowId, $rowContent) = array_values($rs->getRow());//This to be sure that the array is numeric. Some cases when is DBArray result it returns an associative. By JHL
+
+ if ($value == $rowId){
+ $values["{$k}_label"] .= ($i != 0 ? '|': '') . $rowContent;
+ break;
+ }
}
}
- //die;
+
}
}
$newValues["{$k}_label"] = isset($values["{$k}_label"]) ? $values["{$k}_label"] : '';
@@ -363,11 +364,15 @@ class Form extends XmlForm
if (isset($v->options[$newValues[$k]])){
$values["{$k}_label"] = $newValues["{$k}_label"] = $v->options[$newValues[$k]];
- } else {
+ }
+ else {
$query = G::replaceDataField($this->fields[$k]->sql,$newValues);
+
+ // execute just if a query was set, it should be not empty
if(trim($query) == '') {
- continue;
+ continue; //if it is empty string skip it
}
+
//we do the query to the external connection and we've got the label
$con = Propel::getConnection($this->fields[$k]->sqlConnection!=""?$this->fields[$k]->sqlConnection:"workflow");
$stmt = $con->prepareStatement($query);
@@ -394,12 +399,20 @@ class Form extends XmlForm
$values[$k][$j] = $newValues[$k][$j];
if ($this->fields[$k]->validateValue($newValues[$k][$j], $this )){
+ // if the dropdown has otions
if (isset($this->fields[$k]->fields[$kk]->options[$vv])){
$values[$k][$j]["{$kk}_label"] = $newValues[$k][$j][$kk . '_label'] = $this->fields[$k]->fields[$kk]->options[$vv];
- } else {
+ }
+ else { // if hasn't options try execute a sql sentence
$query = G::replaceDataField($this->fields[$k]->fields[$kk]->sql,$values[$k][$j]);
$con = Propel::getConnection($this->fields[$k]->fields[$kk]->sqlConnection!=""?$this->fields[$k]->fields[$kk]->sqlConnection:"workflow");
$stmt = $con->prepareStatement($query);
+
+ // execute just if a query was set, it should be not empty
+ if(trim($query) == '') {
+ continue; //if it is empty string skip it
+ }
+
$rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM);
while ($rs->next()){
// from the query executed we only need certain elements
diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php
index d0c829ade..871b7970d 100755
--- a/gulliver/system/class.xmlform.php
+++ b/gulliver/system/class.xmlform.php
@@ -2103,6 +2103,7 @@ class XmlForm_Field_Link extends XmlForm_Field {
var $link = '';
var $value = '';
var $target = '';
+ var $style = '';
var $colClassName = 'RowLink';
/**
* Function render
@@ -2118,7 +2119,7 @@ class XmlForm_Field_Link extends XmlForm_Field {
$value = G::replaceDataField ( $this->value, $owner->values );
$label = G::replaceDataField ( $this->label, $owner->values );
if ($this->mode == 'edit'){
- $html = 'htmlentities ( $link, ENT_QUOTES, 'utf-8' ) . '\'' . 'id="form[' . $this->name . ']" name="form[' . $this->name . ']"' . (($this->onclick) ? ' onclick="' . htmlentities ( $onclick, ENT_QUOTES, 'utf-8' ) . '"' : '') . (($this->target) ? ' target="' . htmlentities ( $target, ENT_QUOTES, 'utf-8' ) . '"' : '') . '>' . $this->htmlentities ( $this->value === '' ? $label : $value, ENT_QUOTES, 'utf-8' ) . '';
+ $html = 'htmlentities ( $link, ENT_QUOTES, 'utf-8' ) . '\'' . 'id="form[' . $this->name . ']" name="form[' . $this->name . ']" style="' . htmlentities ( $this->style, ENT_QUOTES, 'utf-8' ) .'" '. (($this->onclick) ? ' onclick="' . htmlentities ( $onclick, ENT_QUOTES, 'utf-8' ) . '"' : '') . (($this->target) ? ' target="' . htmlentities ( $target, ENT_QUOTES, 'utf-8' ) . '"' : '') . '>' . $this->htmlentities ( $this->value === '' ? $label : $value, ENT_QUOTES, 'utf-8' ) . '';
$html .= $this->renderHint();
} else {
$html = $this->htmlentities ( $this->value === '' ? $label : $value, ENT_QUOTES, 'utf-8' );
diff --git a/workflow/engine/classes/class.propelTable.php b/workflow/engine/classes/class.propelTable.php
index 1471c2c6e..e776ae458 100755
--- a/workflow/engine/classes/class.propelTable.php
+++ b/workflow/engine/classes/class.propelTable.php
@@ -396,12 +396,12 @@ class propelTable
if(is_object($value)){
$value = '';
}
- // checking if the value variable is a html field, a html tag content can't contain as white spaces
-
+ // checking if the value variable is a html field, a html tag content can't contain as white spaces
$testValue = preg_match( "/(.*)<\/a>/i", $htmlField, $value);
- $this->tpl->assign( "value" , $htmlField );
- if ($testValue>0 && (isset($value[1]) && strlen(trim($value[1])) == 0 )) {
- $this->tpl->assign( "value" , " " );
+ $this->tpl->assign( "value" , $htmlField );
+ if ($testValue>0 && (isset($value[1]) && strlen(trim($value[1])) == 0 )) {
+ if ((trim($value[0])) == '')
+ $this->tpl->assign( "value" , " " );
// $this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField );
} else {
$this->tpl->assign( "value" , $htmlField );
diff --git a/workflow/engine/classes/model/Language.php b/workflow/engine/classes/model/Language.php
index 21f6582cd..19737f8a0 100755
--- a/workflow/engine/classes/model/Language.php
+++ b/workflow/engine/classes/model/Language.php
@@ -232,6 +232,13 @@ class Language extends BaseLanguage {
$errorMsg .= 'file doesn\'t exist: ' . PATH_XMLFORM . $xmlForm . "\n";
continue;
}
+
+ if (count($match) < 4) {
+ $near = isset($rowTranslation['msgid']) ? $rowTranslation['msgid'] :
+ (isset($rowTranslation['msgstr']) ? $rowTranslation['msgstr'] : '');
+ $errorMsg .= "Invalid Translation reference: \"$reference\", near -> ".$near."\n";
+ continue;
+ }
G::LoadSystem('dynaformhandler');
$dynaform = new dynaFormHandler(PATH_XMLFORM . $xmlForm);
diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po
index 9fb560462..2aa22a984 100755
--- a/workflow/engine/content/translations/english/processmaker.en.po
+++ b/workflow/engine/content/translations/english/processmaker.en.po
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
-"Project-Id-Version: ProcessMaker (Branch 2.0) 2.0.34.rc3-5-g1db9c66\n"
+"Project-Id-Version: ProcessMaker (Branch 2.0) 2.0.34.rc6-4-gfd7334a\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2011-10-14 12:41:07\n"
+"PO-Revision-Date: 2011-10-26 09:47:45\n"
"Last-Translator: \n"
"Language-Team: Colosa Developers Team \n"
"MIME-Version: 1.0\n"
@@ -11251,6 +11251,24 @@ msgstr "Add new note"
msgid "Invalid process name, please just use alphanumeric characters."
msgstr "Invalid process name, please just use alphanumeric characters."
+# TRANSLATION
+# LABEL/ID_INVALID_PROCESS_NAME2
+#: LABEL/ID_INVALID_PROCESS_NAME2
+msgid "[LABEL/ID_INVALID_PROCESS_NAME2] Invalid process name, please just use alphanumeric characters."
+msgstr "Invalid process name, please just use alphanumeric characters."
+
+# TRANSLATION
+# LABEL/ID_HIDE_PROCESS_INF
+#: LABEL/ID_HIDE_PROCESS_INF
+msgid "Hide Process Information"
+msgstr "Hide Process Information"
+
+# TRANSLATION
+# LABEL/ID_NEW_CASE_PANEL
+#: LABEL/ID_NEW_CASE_PANEL
+msgid "New Case Panel"
+msgstr "New Case Panel"
+
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
# additionalTables/additionalTablesData.xml
#: text - ADD_TAB_NAME
diff --git a/workflow/engine/data/mssql/insert.sql b/workflow/engine/data/mssql/insert.sql
index 655921371..a80ad36f6 100755
--- a/workflow/engine/data/mssql/insert.sql
+++ b/workflow/engine/data/mssql/insert.sql
@@ -5168,6 +5168,10 @@ SELECT 'LABEL','ID_CASES_NOTES_ADD','en','Add new note','2011-10-03'
SELECT 'LABEL','ID_INVALID_PROCESS_NAME','en','Invalid process name, please just use alphanumeric characters.','2011-10-14'
UNION ALL
SELECT 'LABEL','ID_INVALID_PROCESS_NAME2','en','Invalid process name, please just use alphanumeric characters.','2011-10-14'
+ UNION ALL
+SELECT 'LABEL','ID_HIDE_PROCESS_INF','en','Hide Process Information','2011-10-19'
+ UNION ALL
+SELECT 'LABEL','ID_NEW_CASE_PANEL','en','New Case Panel','2011-10-19'
;
INSERT INTO ISO_LOCATION ([IC_UID],[IL_UID],[IL_NAME],[IL_NORMAL_NAME],[IS_UID])
diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql
index 5a516ce10..fc9e682af 100755
--- a/workflow/engine/data/mysql/insert.sql
+++ b/workflow/engine/data/mysql/insert.sql
@@ -3294,7 +3294,9 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_CASES_NOTES_CANCEL','en','Cancel this note','2011-10-03') ,
( 'LABEL','ID_CASES_NOTES_ADD','en','Add new note','2011-10-03') ,
( 'LABEL','ID_INVALID_PROCESS_NAME','en','Invalid process name, please just use alphanumeric characters.','2011-10-14') ,
-( 'LABEL','ID_INVALID_PROCESS_NAME2','en','Invalid process name, please just use alphanumeric characters.','2011-10-14') ;
+( 'LABEL','ID_INVALID_PROCESS_NAME2','en','Invalid process name, please just use alphanumeric characters.','2011-10-14') ,
+( 'LABEL','ID_HIDE_PROCESS_INF','en','Hide Process Information','2011-10-19') ,
+( 'LABEL','ID_NEW_CASE_PANEL','en','New Case Panel','2011-10-19') ;
INSERT INTO ISO_LOCATION (IC_UID,IL_UID,IL_NAME,IL_NORMAL_NAME,IS_UID) VALUES
('AD','','',' ','') ,
diff --git a/workflow/engine/xmlform/login/login.xml b/workflow/engine/xmlform/login/login.xml
index 464c5e147..4704dacd6 100755
--- a/workflow/engine/xmlform/login/login.xml
+++ b/workflow/engine/xmlform/login/login.xml
@@ -19,17 +19,16 @@
Login
-
+
Forgot Password
addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . "widgets/jscalendar/lang/calendar-" . SYS_LANG . ".js");
define( 'SYS_URI' , '/sys' . SYS_TEMP . '/' . SYS_LANG . '/' . SYS_SKIN . '/' );
@@ -295,8 +295,8 @@ $startingTime = array_sum(explode(' ',microtime()));
if ( file_exists( PATH_DB . SYS_TEMP . '/db.php' ) ) {
require_once( PATH_DB . SYS_TEMP . '/db.php' );
define ( 'SYS_SYS' , SYS_TEMP );
-
- // defining constant for workspace shared directory
+
+ // defining constant for workspace shared directory
define ( 'PATH_WORKSPACE' , PATH_DB . SYS_SYS . PATH_SEP );
// including workspace shared classes -> particularlly for pmTables
set_include_path(get_include_path() . PATH_SEPARATOR . PATH_WORKSPACE);
@@ -434,10 +434,10 @@ $startingTime = array_sum(explode(' ',microtime()));
//********* Setup plugins *************
$oPluginRegistry->setupPlugins(); //get and setup enabled plugins
$avoidChangedWorkspaceValidation = false;
-
+
//Load custom Classes and Model from Plugins.
G::LoadAllPluginModelClasses();
-
+
//*********jump to php file in methods directory *************
$collectionPlugin = '';
if ( $oPluginRegistry->isRegisteredFolder( SYS_COLLECTION ) ) {
@@ -467,8 +467,8 @@ $startingTime = array_sum(explode(' ',microtime()));
$phpFile = str_replace ( '.php', 'index.php', $phpFile );
$phpFile = include ( $phpFile );
}*/
- $bWE = false;
- $isControllerCall = false;
+ $bWE = false;
+ $isControllerCall = false;
if ( substr(SYS_COLLECTION , 0,8) === 'gulliver' ) {
$phpFile = PATH_GULLIVER_HOME . 'methods/' . substr( SYS_COLLECTION , 8) . SYS_TARGET.'.php';
}
@@ -493,7 +493,7 @@ $startingTime = array_sum(explode(' ',microtime()));
$bWE = true;
//$phpFile = PATH_DATA_SITE . 'public' . PATH_SEP . SYS_COLLECTION . PATH_SEP . $auxPart[ count($auxPart)-1];
}
-
+
//erik: verify if it is a Controller Class or httpProxyController Class
if( is_file(PATH_CONTROLLERS . SYS_COLLECTION . '.php') ) {
require_once PATH_CONTROLLERS . SYS_COLLECTION . '.php';
@@ -505,7 +505,7 @@ $startingTime = array_sum(explode(' ',microtime()));
$isControllerCall = true;
}
}
-
+
if ( ! $isControllerCall && ! file_exists( $phpFile ) ) {
$_SESSION['phpFileNotFound'] = $_SERVER['REQUEST_URI'];
print $phpFile;
@@ -513,7 +513,7 @@ $startingTime = array_sum(explode(' ',microtime()));
die;
}
}
-
+
//redirect to login, if user changed the workspace in the URL
if( ! $avoidChangedWorkspaceValidation && isset( $_SESSION['WORKSPACE'] ) && $_SESSION['WORKSPACE'] != SYS_SYS) {
$_SESSION['WORKSPACE'] = SYS_SYS;
@@ -536,7 +536,7 @@ $startingTime = array_sum(explode(' ',microtime()));
//get the language direction from ServerConf
define('SYS_LANG_DIRECTION', $oServerConf->getLanDirection() );
-
+
if((isset( $_SESSION['USER_LOGGED'] ))&&(!(isset($_GET['sid'])))) {
$RBAC->initRBAC();
$RBAC->loadUserRolePermission( $RBAC->sSystem, $_SESSION['USER_LOGGED'] , PATH_DATA, session_id());
@@ -581,7 +581,7 @@ $startingTime = array_sum(explode(' ',microtime()));
}
}
$_SESSION['phpLastFileFound'] = $_SERVER['REQUEST_URI'];
-
+
/***
* New feature for Gulliver framework to support Controllers & HttpProxyController classes handling
*
@@ -593,7 +593,7 @@ $startingTime = array_sum(explode(' ',microtime()));
$controller->call($controllerAction);
} else
require_once( $phpFile );
-
+
if ( defined('SKIP_HEADERS') ) {
header("Expires: " . gmdate("D, d M Y H:i:s", mktime( 0,0,0,date('m'),date('d'),date('Y') + 1) ) . " GMT");
header('Cache-Control: public');