<% # (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% button_id = "button_close_#{@job.id}" form_id = "job_conditions_#{@job.id}" @title_section = t('.title') @title_section = @title_section + ' ' + t('common.view_only_mode') if @view_only @title_item = @job.name @help_link_anchor = HELP_URL_CONFIG['jobs']['job_conditions'] if @job.job_type == MemberJob::JOB_TYPE if @editing_view.nil? || !@editing_view url = member_job_path(@job.id) conditionListPath = edit_member_job_path(@job.id, :list => 'conditions') conditionsJobPath = edit_member_job_path(@job.id, :page => 'conditions') jobListPath = member_jobs_path(:format => :json) parent_type = "member_job" else url = job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id) conditionListPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :list => 'conditions') conditionsJobPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :page => 'conditions') jobListPath = member_jobs_path(:format => :json) parent_type = "member_job" end else url = job_path(@job.id) conditionListPath = edit_job_path(@job.id, :list => 'conditions') conditionsJobPath = edit_job_path(@job.id, :page => 'conditions') jobListPath = jobs_path(:format => :json) parent_type = "job" end %> <% form_for(@job, :url => url, :html => { :id => form_id, :class => "edit_job", :autocomplete => "off", :onsubmit => "try {helpsys.CntMgr.getController('#{form_id}').submitForm();} catch(e) {console.log(e);};return false;"}) do |form| %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "job-general", :section_title => t('jobs.conditions.title_general')}) do %>

<%= t_label('jobs.edit_condition_options.status') %>

<%= h @condition_status %>

<% if @job.conditional %> <% if @job.cond_retry %>

<%= t_label('jobs.edit_condition_options.retry_if_not_met') %>

<%= h @retry_text %>

<% else %>

<%= t_label('jobs.edit_condition_options.retry_if_not_met') %>

<%= h @retry_text %>

<% end %>

<%= t_label('jobs.edit_condition_options.condition_fail_action') %>

<%= t('jobs.edit_condition_options.job_status_fail') if @job.condition_fail_status == Job::COND_STATUS_FAIL %> <%= t('jobs.edit_condition_options.job_status_cancel') if @job.condition_fail_status == Job::COND_STATUS_CANCEL %> <%= t('jobs.edit_condition_options.condition_run_anyway') if @job.condition_fail_status == Job::COND_STATUS_RUN_ANYWAY %>

<% end %> <% end %> <%= render( :partial => 'jobs/edit_conditions', :layout => 'shared/edit_section', :locals => { :section_id => "job-conditions", :section_title => t('common.conditions_title'), :details_only => true}) %>
<%= if @editing_view.nil? || !@editing_view standard_buttons(button_id) else standard_buttons(button_id, t('common.Ok')) end %>
<% end %>