<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% fields_for @job do |fields| %> <% disabled_string = 'ctldisabled=true"' if @view_only %>

<%= fields.radio_button :overrun_monitor_option, 1, :disabled => @view_only, :class => "x-form-field overrun-monitor-option-field" %> <%= fields.label :overrun_monitor_option, t('.maximum_duration_label'), :class => "overrun-monitor-label item-label", :value => 1 %>
<%= fields.label :overrun_hours, t_label('common.hours_label'), :class => "overrun-hours-label item-label" %>
<%= fields.spinner :overrun_hours, :minValue=>0, :maxValue=>100,:disabled => @view_only, :class => "x-form-field overrun-hours-field" %>

<%= fields.label :overrun_minutes, t_label('common.minutes_label'), :class => "overrun-minutes-label item-label" %>
<%= fields.spinner :overrun_minutes, :minValue=>0, :maxValue=>59, :disabled => @view_only, :class => "x-form-field overrun-minutes-field" %>

<% if @job.job_type != MemberJob::JOB_TYPE %>
<%= fields.radio_button :overrun_monitor_option, 2, :disabled => @view_only, :class => "x-form-field overrun-must-complete-option-field" %> <%= fields.label :overrun_monitor_option, t('.must_complete_by_label'), :class => "overrun-must-complete-label item-label", :value => 2 %>
<%= fields.label :overrun_monitor_option, t_label('common.time'), :class => "overrun-must-complete-label item-label" %>
>

<% if @job.job_type == Job::JOB_TYPE %> <%= t('.must_complete_by_caption') %> <% else %> <%= t('job_suites.edit_overrun_monitor.must_complete_by_caption') %> <% end%>

<% end %>
<%= fields.label :overrun_send_snmp_trap, t_label('common.snmp_trap'), :class => "description-label item-label" %>
<%= fields.check_box :overrun_send_snmp_trap, :disabled => @view_only, :class => "" %>

<%= t('common.send_snmp_trap_caption') %>

<%= t('common.email') %>
<%= check_box_tag :use_overrun_notification_list, '1', @job.overrun_notification_list_public_list, {:disabled => @view_only, :class => ""} %>

<%= label :job, :overrun_notification_list_name_label, ' ', :class => "description-label item-label" %>
<%= fields.hidden_field :overrun_notification_list_id, :disabled => true %> <%= fields.hidden_field :overrun_notification_list_name, :disabled => true %> <%= hidden_field_tag :update_overrun_notification_list, true %>

<%= t('common.select_a_notification_list')%>

<%= t('common.to_users')%>

<%= t('common.email_user_caption')%>

<%= label :jobs, :overrun_users, t_label('common.add_user'), :class => "x-form-item label" %>

<%= t('common.add_user_caption')%>

<%= t('common.advanced_options') %>

/>

<%= t('common.advanced_options') %>

<%= fields.label :email_subject_overrun, t_label('common.custom_subject'), :class => "x-form-item label" %>
<%= fields.text_field :email_subject_overrun, :disabled => @view_only, :maxLength => 256, :class => "x-form-field name-field" %>

<%= fields.label :email_body_overrun, t_label('common.custom_text'), :class => "x-form-item label" %>
<%= fields.text_area :email_body_overrun, :disabled => @view_only, :maxLength => 2048, :class => "x-form-field description-field", :style => "overflow:auto;height:80px;" %>

<%= t('common.custom_text_caption_jobs') %>

/>
<%= fields.check_box :overrun_end_job, :disabled => @view_only %>

<% end %>