[gen] Optimisations, bugfixes and refactorings.

This commit is contained in:
Gaetan Delannay 2014-04-21 12:11:41 +02:00
parent 822e1a7c63
commit f0c1f69573
9 changed files with 104 additions and 115 deletions

View file

@ -529,10 +529,8 @@ function submitAppyForm(button) {
// Function used for triggering a workflow transition
function triggerTransition(formId, transitionId, msg) {
var theForm = document.getElementById(formId);
theForm.workflow_action.value = transitionId;
if (!msg) {
theForm.submit();
}
theForm.transition.value = transitionId;
if (!msg) { theForm.submit(); }
else { // Ask the user to confirm.
askConfirm('form', formId, msg, true);
}