Commit b5839538 authored by Frédéric Escudié's avatar Frédéric Escudié
Browse files

Improve indentation.

parent 5370da2e
......@@ -1127,76 +1127,75 @@ Handsontable.cellTypes["bootdate"] = Handsontable.BootstrapDateCell;
' {{/if}}',
'</div>'
].join('\n'),
template: ['<form id="workflow_form" class="form-horizontal" role="form">',
' {{each(gindex, group) workflow.groups}}',
'<fieldset>',
' {{if group != "default" && group.indexOf("exclude-") != 0 }}',
' <legend>${group}</legend>',
' {{/if}}',
' {{each(index, param) workflow.parameters_per_groups[group]}}',
template: [
'<form id="workflow_form" class="form-horizontal" role="form">',
' {{each(gindex, group) workflow.groups}}',
' <fieldset>',
' {{if group != "default" && group.indexOf("exclude-") != 0 }}',
' <legend>${group}</legend>',
' {{/if}}',
' {{each(index, param) workflow.parameters_per_groups[group]}}',
// it the parameter has not already been settled
' {{if Object.keys(parameters).indexOf(param.name) == -1 }}',
' <div class="form-group param-field">',
' <label class="col-sm-2 control-label" for="${param.name}">${param.display_name}</label>',
' {{if Object.keys(parameters).indexOf(param.name) == -1 }}',
' <div class="form-group param-field">',
' <label class="col-sm-2 control-label" for="${param.name}">${param.display_name}</label>',
// if it's a multiple type
' {{if param.type == "MultipleParameters"}}',
' <div class="col-sm-10">',
// if it's an append and multiple type
' {{if param.action == "MiltipleAppendAction"}}',
' <blockquote style="font-size:14px;">',
' <div id="handsontable_${param.name}" > </div>',
' <span id="error_handsontable_${param.name}" class="help-block" for="read_2"></span>',
' <span id="help_handsontable_${param.name}" class="help-block">${param.help}</span>',
' </blockquote>',
// if it's a single and multiple type
' {{else}}',
' <blockquote style="font-size:14px;">',
' {{each(spindex, sub_param) param.sub_parameters}}',
' <div class="param-field">',
' {{if sub_param.type == "bool"}}',
' {{html getParameterDisplay(templates, getTplName(sub_param), sub_param, sub_param.display_name)}}',
' {{else}}',
' <div class="input-group">',
' <span class="input-group-addon">${sub_param.display_name}</span>',
' {{html getParameterDisplay(templates, getTplName(sub_param), sub_param)}}',
' </div>',
' {{/if}}',
' <span class="help-block">${sub_param.help}</span> <br />',
' </div>',
' {{/each}}',
' </blockquote>',
' {{/if}}',
' {{else}}',
' <div class="col-sm-10">',
' {{html getParameterDisplay(templates, getTplName(param), param)}}',
' <span class="help-block">${param.help}</span>',
' {{/if}}',
' </div>',
' </div>',
' {{else}}',
' {{if param.type == "MultipleParameters"}}',
' <div class="col-sm-10">',
' <blockquote style="font-size:14px;">',
' {{if param.action == "MiltipleAppendAction"}}', // if it's an append and multiple type
' <div id="handsontable_${param.name}" > </div>',
' <span id="error_handsontable_${param.name}" class="help-block" for="read_2"></span>',
' <span id="help_handsontable_${param.name}" class="help-block">${param.help}</span>',
' {{else}}', // if it's a single and multiple type
' {{each(spindex, sub_param) param.sub_parameters}}',
' <div class="param-field">',
' {{if sub_param.type == "bool"}}',
' {{html getParameterDisplay(templates, getTplName(sub_param), sub_param, sub_param.display_name)}}',
' {{else}}',
' <div class="input-group">',
' <span class="input-group-addon">${sub_param.display_name}</span>',
' {{html getParameterDisplay(templates, getTplName(sub_param), sub_param)}}',
' </div>',
' {{/if}}',
' <span class="help-block">${sub_param.help}</span> <br />',
' </div>',
' {{/each}}',
' {{/if}}',
' </blockquote>',
' </div>',
// if it's a std type
' {{else}}',
' <div class="col-sm-10">',
' {{html getParameterDisplay(templates, getTplName(param), param)}}',
' <span class="help-block">${param.help}</span>',
' </div>',
' {{/if}}',
' </div>',
' {{else}}',
// if the param is already settled, hide it
' <input id="${param.name}" name="${param.name}" class="${param.group}" value="${parameters[param.name]}" type="hidden">',
' {{/if}}',
' <input id="${param.name}" name="${param.name}" class="${param.group}" value="${parameters[param.name]}" type="hidden">',
' {{/if}}',
' {{/each}}',
' </fieldset>',
' {{/each}}',
'</fieldset>',
' {{/each}}',
'<fieldset>',
' <fieldset>',
// for all workflow add the workflowClass
' <input name="workflow_class" value="${workflow.class}" type="hidden">',
' <input name="workflow_class" value="${workflow.class}" type="hidden">',
// add buttons if requested
'{{if display_reset_button || display_run_button}}',
' <div class="row"> <div class="col-md-3 col-md-offset-9">',
' <div class="btn-group">',
' {{if display_reset_button}}',
' <button id="wfform_reset_btn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Reset</button>',
' {{/if}}',
' {{if display_run_button}}',
' <button id="wfform_run_btn" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-cog"></span> Run</button>',
' {{/if}}',
' </div>',
' </div> </div>',
'{{/if}}',
'</fieldset>',
' {{if display_reset_button || display_run_button}}',
' <div class="row"> <div class="col-md-3 col-md-offset-9">',
' <div class="btn-group">',
' {{if display_reset_button}}',
' <button id="wfform_reset_btn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Reset</button>',
' {{/if}}',
' {{if display_run_button}}',
' <button id="wfform_run_btn" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-cog"></span> Run</button>',
' {{/if}}',
' </div>',
' </div>',
' {{/if}}',
' </fieldset>',
'</form>',
// add a second form for the files to upload
'<form method="post" enctype="multipart/form-data" style="display:none;">',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment