- <%= radio_button_tag(:script, "use_same", true) %>
- <%= label_tag(:script_use_same, "Use same script version as this run") %>
- <p style="padding-left: 1em"> Use the same script version as the current job.</p>
- <% if !job_info['supplied_script_version'].nil? and
- !job_info['supplied_script_version'].empty? and
- job_info['supplied_script_version'] != job_info['script_version'] %>
- <%= radio_button_tag(:script, "use_latest") %>
- <%= label_tag(:script_use_latest, "Use latest script version") %>
- <p style="padding-left: 1em"> Use the current commit indicated by '<%=job_info['supplied_script_version']%>' in the '<%=job_info['repository']%>' repository.</p>
- <% end %>
+ <% if (@job.supplied_script_version.blank? or
+ (@job.supplied_script_version == @job.script_version)) %>
+ <%= f.hidden_field(:script_version) %>
+ <% else %>
+ <%= f.radio_button("script_version", @job.script_version) %>
+ <%= f.label(:script_version, "Use same script version as this run", value: @job.script_version) %>
+ <p style="padding-left: 1em"> Use the same script version as the current job.</p>