Merge branch '2.0-dev' of git.colosa.net:processmaker into 2.0-dev
This commit is contained in:
@@ -1116,7 +1116,7 @@ function setFocusById (id) {
|
||||
}
|
||||
|
||||
function submitForm () {
|
||||
document.webform.submit();
|
||||
document.forms[0].submit();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
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
|
||||
|
||||
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
|
||||
$stmt = $con->prepareStatement($query);
|
||||
$rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM);
|
||||
|
||||
if ($value == $rowId){
|
||||
$values["{$k}_label"] .= ($i != 0 ? '|': '') . $rowContent;
|
||||
break;
|
||||
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
|
||||
|
||||
@@ -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 = '<a class="tableOption" href=\'' . $this->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' ) . '</a>';
|
||||
$html = '<a class="tableOption" href=\'' . $this->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' ) . '</a>';
|
||||
$html .= $this->renderHint();
|
||||
} else {
|
||||
$html = $this->htmlentities ( $this->value === '' ? $label : $value, ENT_QUOTES, 'utf-8' );
|
||||
|
||||
@@ -397,11 +397,11 @@ class propelTable
|
||||
$value = '';
|
||||
}
|
||||
// checking if the value variable is a html field, a html tag content can't contain as white spaces
|
||||
|
||||
$testValue = preg_match( "/<a ?.*>(.*)<\/a>/i", $htmlField, $value);
|
||||
$this->tpl->assign( "value" , $htmlField );
|
||||
if ($testValue>0 && (isset($value[1]) && strlen(trim($value[1])) == 0 )) {
|
||||
$this->tpl->assign( "value" , " " );
|
||||
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 );
|
||||
|
||||
@@ -233,6 +233,13 @@ class Language extends BaseLanguage {
|
||||
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);
|
||||
$fieldName = $match[2];
|
||||
|
||||
@@ -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 <developers@colosa.com>\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
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -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','','',' ','') ,
|
||||
|
||||
@@ -19,17 +19,16 @@
|
||||
<en>Login</en>
|
||||
</BSUBMIT>
|
||||
|
||||
<FORGOT_PASWORD_LINK type="link" link="forgotPassword" onclick="" colAlign="right" colWidth="135">
|
||||
<FORGOT_PASWORD_LINK type="link" link="forgotPassword" onclick="" colAlign="right" colWidth="135" style="display:none;">
|
||||
<en>Forgot Password</en>
|
||||
</FORGOT_PASWORD_LINK>
|
||||
|
||||
|
||||
|
||||
<JS type="javascript"><![CDATA[
|
||||
|
||||
// enable/disable forgot password link
|
||||
if(flagForgotPassword != 'on' )
|
||||
hideRowById('FORGOT_PASWORD_LINK');
|
||||
if(flagForgotPassword == 'on' )
|
||||
document.getElementById("form[FORGOT_PASWORD_LINK]").style.display = 'block';//hideRowById('FORGOT_PASWORD_LINK');
|
||||
|
||||
var panel;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ $startingTime = array_sum(explode(' ',microtime()));
|
||||
$endTime = array_sum(explode(' ',microtime()));
|
||||
$time = $endTime - $startingTime;
|
||||
$fpt= fopen ( PATH_DATA . 'log/time.log', 'a' );
|
||||
fwrite( $fpt, sprintf ( "%s.%03d %15s %s %5.3f %s\n", date('H:i:s'), $time, getenv('REMOTE_ADDR'), substr($serverAddr,-4), $time, $_SERVER['REQUEST_URI'] ));
|
||||
fwrite( $fpt, sprintf ( "%s.%03d %15s %s %5.3f %s\n", date('Y-m-d H:i:s'), $time, getenv('REMOTE_ADDR'), substr($serverAddr,-4), $time, $_SERVER['REQUEST_URI'] ));
|
||||
fclose( $fpt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user