BUG 11109 "Event of adding a new line couldn't work with..." SOLVED
- Event of adding a new line couldn't work with dependent field in Grid - Solved problem, variable had the incorrect value (ie when it had a grid with dependent fields) * Available from version ProcessMaker-2.0.47 (2.5.1)
This commit is contained in:
@@ -82,19 +82,26 @@
|
|||||||
{* TODO: include file='xmlformScript.html' *}
|
{* TODO: include file='xmlformScript.html' *}
|
||||||
var form_{$form->id};
|
var form_{$form->id};
|
||||||
var object_{$form->name};
|
var object_{$form->name};
|
||||||
var i;
|
|
||||||
if (typeof(__aObjects__) === 'undefined') {literal}{{/literal}
|
if (typeof(__aObjects__) == "undefined") {literal}{{/literal}
|
||||||
var __aObjects__ = [];
|
var __aObjects__ = [];
|
||||||
{literal}}{/literal}
|
{literal}}{/literal}
|
||||||
|
|
||||||
function loadForm_{$form->id}(ajaxServer)
|
function loadForm_{$form->id}(ajaxServer)
|
||||||
{literal}{{/literal}
|
{literal}{{/literal}
|
||||||
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
|
var i = 0;
|
||||||
|
|
||||||
|
if (typeof(G_Form) == "undefined") {literal}{{/literal}
|
||||||
|
return alert("form.js was not loaded");
|
||||||
|
{literal}}{/literal}
|
||||||
|
|
||||||
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
|
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
|
||||||
object_{$form->name} = form_{$form->id};
|
object_{$form->name} = form_{$form->id};
|
||||||
__aObjects__.push(object_{$form->name});
|
__aObjects__.push(object_{$form->name});
|
||||||
var myForm=form_{$form->id};
|
var myForm=form_{$form->id};
|
||||||
if (myForm.aElements===undefined) alert("{$form->name}");
|
if (myForm.aElements===undefined) alert("{$form->name}");
|
||||||
myForm.ajaxServer=ajaxServer;
|
myForm.ajaxServer = ajaxServer;
|
||||||
|
|
||||||
//{$form->ajaxSubmit}
|
//{$form->ajaxSubmit}
|
||||||
{if isset($form->ajaxSubmit) && ($form->ajaxSubmit)}
|
{if isset($form->ajaxSubmit) && ($form->ajaxSubmit)}
|
||||||
{literal}
|
{literal}
|
||||||
@@ -109,6 +116,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{foreach from=$form->fields item=field key=name}
|
{foreach from=$form->fields item=field key=name}
|
||||||
i = myForm.aElements.length;
|
i = myForm.aElements.length;
|
||||||
|
|
||||||
{if (($field->type==='dropdown') || $field->type==='listbox')}
|
{if (($field->type==='dropdown') || $field->type==='listbox')}
|
||||||
myForm.aElements[i] = new G_DropDown(myForm, myForm.element.elements['form[{$name}]'],'{$name}');
|
myForm.aElements[i] = new G_DropDown(myForm, myForm.element.elements['form[{$name}]'],'{$name}');
|
||||||
myForm.aElements[i].setAttributes({$field->getAttributes()});
|
myForm.aElements[i].setAttributes({$field->getAttributes()});
|
||||||
|
|||||||
Reference in New Issue
Block a user