Skip to content

Instantly share code, notes, and snippets.

@inri13666
Created October 6, 2016 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inri13666/65522bd4077ceaa08003c2057a0ed743 to your computer and use it in GitHub Desktop.
Save inri13666/65522bd4077ceaa08003c2057a0ed743 to your computer and use it in GitHub Desktop.
<% if(!stepFrom || stepFrom.get('name')) {
var stepFromName = stepFrom ? stepFrom.get('name') : '';
%>
<div class="control-group">
{{ _self.render_label("oro.workflow.form.from_step.label"|trans, true, "oro.workflow.workflowdefinition.transition.step_from.tooltip") }}
<div class="controls">
<select name="step_from" data-validation="{{ requiredConstraint|json_encode }}"
<% if (name && !_is_clone) { %>disabled="disabled"<% } %>
>
<option value=""></option>
<% _.each(allowedStepsFrom, function (step) { %>
<option
value="<%- step.get('name') %>"
<% if (step.get('name') == stepFromName) { %>selected="selected"<% } %>
>
<%- step.get('label') %>
</option>
<% }); %>
</select>
</div>
</div>
<% } %>
<div class="control-group">
{{ _self.render_label("oro.workflow.form.to_step.label"|trans, true, "oro.workflow.workflowdefinition.transition.step_to.tooltip") }}
<div class="controls">
<select name="step_to" data-validation="{{ requiredConstraint|json_encode }}">
<option value=""></option>
<% _.each(allowedStepsTo, function (step) { %>
<option
value="<%- step.get('name') %>"
<% if (step.get('name') == step_to) { %>selected="selected"<% } %>
>
<%- step.get('label') %>
</option>
<% }); %>
</select>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment