Merged in mcuiza/processmaker/PM-1486 (pull request #1391)

PM-1486
This commit is contained in:
Julio Cesar Laura Avendaño
2015-02-05 14:54:33 -04:00
5 changed files with 21 additions and 4 deletions

View File

@@ -1938,6 +1938,7 @@ class XmlForm_Field_Textarea extends XmlForm_Field
public $cols = 40;
public $required = false;
public $readOnly = false;
public $resizable = false;
public $wrap = 'OFF';
public $className;
public $renderMode = '';
@@ -1970,9 +1971,9 @@ class XmlForm_Field_Textarea extends XmlForm_Field
if ($this->renderMode == '') {
$this->renderMode = $this->mode;
}
$resizable = ($this->resizable == 1 || $this->resizable == '1') ? 'resize:both;' : 'resize:none;';
$html = '';
$scrollStyle = $this->style . "overflow:scroll;overflow-y:scroll;overflow-x:hidden;overflow:-moz-scrollbars-vertical;resize:none;";
$scrollStyle = $this->style . "overflow:scroll;overflow-y:scroll;overflow-x:hidden;overflow:-moz-scrollbars-vertical;".$resizable;
if ($this->renderMode == 'edit') {
//EDIT MODE
$readOnlyText = ($this->readOnly == 1 || $this->readOnly == '1') ? 'readOnly="readOnly"' : '';
@@ -2037,8 +2038,8 @@ class XmlForm_Field_Textarea extends XmlForm_Field
}
$arrayOptions[$r] = $v;
$scrollStyle = $this->style . "overflow:scroll;overflow-y:scroll;overflow-x:hidden;overflow:-moz-scrollbars-vertical;resize:none;";
$resizable = ($this->resizable == 1 || $this->resizable == '1') ? 'resize:both;' : 'resize:none;';
$scrollStyle = $this->style . "overflow:scroll;overflow-y:scroll;overflow-x:hidden;overflow:-moz-scrollbars-vertical;".$resizable;
$html = '';
if ($this->renderMode == 'edit') {
//EDIT MODE

View File

@@ -55,6 +55,14 @@ if (isset($_POST['form']['PME_READONLY'])) {
$_POST['form']['PME_READONLY'] = 0;
}
if (isset($_POST['form']['PME_RESIZABLE'])) {
if ($_POST['form']['PME_RESIZABLE'] == '') {
$_POST['form']['PME_RESIZABLE'] = 0;
}
} else {
$_POST['form']['PME_RESIZABLE'] = 0;
}
$_POST["form"]["PME_OPTGROUP"] = (isset($_POST["form"]["PME_OPTGROUP"]) && !empty($_POST["form"]["PME_OPTGROUP"]))? intval($_POST["form"]["PME_OPTGROUP"]) : 0;
if (isset($_POST['form']['PME_SAVELABEL'])) {

View File

@@ -48,6 +48,11 @@
<td class="FormLabel" width="{$form_labelWidth}">{$PME_READONLY}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.PME_READONLY} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.PME_READONLY}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$PME_RESIZABLE}</td>
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.PME_RESIZABLE} </td> //-->
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.PME_RESIZABLE}</td>
</tr>
<tr>
<td class="FormLabel" width="{$form_labelWidth}">{$PME_DEFAULTVALUE}</td>

View File

@@ -25,6 +25,9 @@ SELECT XMLNODE_NAME, TYPE FROM dynaForm WHERE XMLNODE_NAME = @@PME_XMLNODE_NAME
<PME_READONLY type="checkbox" falseValue="0" value="1" defaultvalue="0" labelOnRight="0">
<en><![CDATA[Read Only]]></en>
</PME_READONLY>
<PME_RESIZABLE type="checkbox" falseValue="0" value="1" defaultvalue="0" labelOnRight="0">
<en><![CDATA[Resizable]]></en>
</PME_RESIZABLE>
<PME_DEFAULTVALUE type="textarea" rows="3" cols="38" defaultvalue="">
<en><![CDATA[Default Value]]></en>
</PME_DEFAULTVALUE>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 64 KiB