[gen] Allow to show transitions on 'view' and/or 'result' layout types.

This commit is contained in:
Gaetan Delannay 2013-03-18 13:13:29 +01:00
parent e0cef5eed5
commit da1f2699cd
7 changed files with 33 additions and 12 deletions

View file

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