OM-641: Nex step button no funciona correctamente
resolve case without button submit documentation function
This commit is contained in:
@@ -7,6 +7,19 @@ function ajax_post(action, form, method, callback, asynchronous) {
|
|||||||
function dynaFormChanged(frm) {
|
function dynaFormChanged(frm) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Create fake submit button to force send data formpost action
|
||||||
|
* and after this is destryed
|
||||||
|
* @param formStep
|
||||||
|
*/
|
||||||
|
function submitNextStep(formStep) {
|
||||||
|
var btnSubmit = $('<button>');
|
||||||
|
btnSubmit.attr("type","submit");
|
||||||
|
btnSubmit.hide();
|
||||||
|
$(formStep).append(btnSubmit);
|
||||||
|
btnSubmit.click();
|
||||||
|
btnSubmit.remove();
|
||||||
|
}
|
||||||
$(window).load(function () {
|
$(window).load(function () {
|
||||||
if (pm_run_outside_main_app === 'true') {
|
if (pm_run_outside_main_app === 'true') {
|
||||||
if (parent.showCaseNavigatorPanel) {
|
if (parent.showCaseNavigatorPanel) {
|
||||||
@@ -107,14 +120,10 @@ $(window).load(function () {
|
|||||||
form.appendChild(appuid);
|
form.appendChild(appuid);
|
||||||
form.appendChild(arrayRequired);
|
form.appendChild(arrayRequired);
|
||||||
dyn_forward = document.getElementById("dyn_forward");
|
dyn_forward = document.getElementById("dyn_forward");
|
||||||
dyn_forward.onclick = function () {
|
dyn_forward.onclick = function (e) {
|
||||||
if (window.dynaform.getForms()[0].isValid()) {
|
e.preventDefault();
|
||||||
window.dynaform.getForms()[0].applySuccess();
|
e.stopPropagation();
|
||||||
window.dynaform.getForms()[0].prepareFormToPost();
|
submitNextStep(form);
|
||||||
form.submit();
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
if (triggerDebug === true) {
|
if (triggerDebug === true) {
|
||||||
showdebug();
|
showdebug();
|
||||||
|
|||||||
Reference in New Issue
Block a user