<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% button_id = "button_close_#{@job.id}" form_id = "status_notification_#{@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['job_suites']['job_suite_status_notification'] %> <% form_for(@job, :url => job_suite_path(@job.id), :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 => "skipped-status-notification", :section_title => t('.skipped_heading')}) do %> <% if @job.send_skipped_snmp_trap || @job.send_skipped_email %> <% if @job.send_skipped_snmp_trap %>

<%= " #{t('common.snmp_notification')}" %>

<% end %> <% if @job.send_skipped_email %> <% if !@job.skipped_notification_list.nil? && @job.skipped_notification_list_public_list %>

<%= " #{t('common.email_notification_list', :notification_list => @job.skipped_notification_list.name) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_skipped.blank? && @job.email_body_skipped.blank?) %>

<% else %>

<%= " #{t('common.email_notification', :user => formatted_list_of_usernames(@job.skipped_status_user_names)) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_skipped.blank? && @job.email_body_skipped.blank?) %>

<% end %> <% end %> <% else %>

<%= " #{t('jobs.status_notification.no_notification_options')}" %>

<% end %> <% end %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "run-status-notification", :section_title => t('.running_heading')}) do %> <% if @job.send_run_snmp_trap || @job.send_run_email %> <% if @job.send_run_snmp_trap %>

<%= " #{t('common.snmp_notification')}" %>

<% end %> <% if @job.send_run_email %> <% if !@job.run_notification_list.nil? && @job.run_notification_list_public_list %>

<%= " #{t('common.email_notification_list', :notification_list => @job.run_notification_list.name) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_running.blank? && @job.email_body_running.blank?) %>

<% else %>

<%= " #{t('common.email_notification', :user => formatted_list_of_usernames(@job.run_status_user_names)) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_running.blank? && @job.email_body_running.blank?) %>

<% end %> <% end %> <% else %>

<%= " #{t('jobs.status_notification.no_notification_options')}" %>

<% end %> <% end %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "complete-status-notification", :section_title => t('.completed_heading')}) do %> <% if @job.send_complete_snmp_trap || @job.send_complete_email %> <% if @job.send_complete_snmp_trap %>

<%= " #{t('common.snmp_notification')}" %>

<% end %> <% if @job.send_complete_email %> <% if !@job.complete_notification_list.nil? && @job.complete_notification_list_public_list %>

<%= " #{t('common.email_notification_list', :notification_list => @job.complete_notification_list.name) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_completed.blank? && @job.email_body_completed.blank?) %>

<% else %>

<%= " #{t('common.email_notification', :user => formatted_list_of_usernames(@job.complete_status_user_names)) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_completed.blank? && @job.email_body_completed.blank?) %>

<% end %> <% end %> <% else %>

<%= " #{t('jobs.status_notification.no_notification_options')}" %>

<% end %> <% end %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "member-fail-status-notification", :section_title => t('.member_failed_heading')}) do %> <% if @job.send_member_fail_snmp_trap || @job.send_member_fail_email %> <% if @job.send_member_fail_snmp_trap %>

<%= " #{t('common.snmp_notification')}" %>

<% end %> <% if @job.send_member_fail_email %> <% if !@job.member_fail_notification_list.nil? && @job.member_fail_notification_list_public_list %>

<%= " #{t('common.job_log_notification_list', :notification_list => @job.member_fail_notification_list.name)} " if (@job.send_member_failed_email_log?) %>

<%= " #{t('common.email_notification_list', :notification_list => @job.member_fail_notification_list.name) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_member_failed.blank? && @job.email_body_member_failed.blank?) %>

<% else %>

<%= " #{t('common.job_log_notification', :user => formatted_list_of_usernames(@job.member_fail_status_user_names)) } " if (@job.send_member_failed_email_log?) %>

<%= " #{t('common.email_notification', :user => formatted_list_of_usernames(@job.member_fail_status_user_names)) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_member_failed.blank? && @job.email_body_member_failed.blank?) %>

<% end %> <% end %> <% else %>

<%= " #{t('jobs.status_notification.no_notification_options')}" %>

<% end %> <% end %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "member-cancel-status-notification", :section_title => t('.member_cancel_heading')}) do %> <% if @job.send_member_cancel_snmp_trap || @job.send_member_cancel_email %> <% if @job.send_member_cancel_snmp_trap %>

<%= " #{t('common.snmp_notification')}" %>

<% end %> <% if @job.send_member_cancel_email %> <% if !@job.member_cancel_notification_list.nil? && @job.member_cancel_notification_list_public_list %>

<%= " #{t('common.job_log_notification_list', :notification_list => @job.member_cancel_notification_list.name)} " if (@job.send_member_canceled_email_log?) %>

<%= " #{t('common.email_notification_list', :notification_list => @job.member_cancel_notification_list.name) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_member_canceled.blank? && @job.email_body_member_canceled.blank?) %>

<% else %>

<%= " #{t('common.job_log_notification', :user => formatted_list_of_usernames(@job.member_cancel_status_user_names)) } " if (@job.send_member_canceled_email_log?) %>

<%= " #{t('common.email_notification', :user => formatted_list_of_usernames(@job.member_cancel_status_user_names)) } " %>

<%= " #{t('common.advanced_options_specified')} " unless (@job.email_subject_member_canceled.blank? && @job.email_body_member_canceled.blank?) %>

<% end %> <% end %> <% else %>

<%= " #{t('jobs.status_notification.no_notification_options')}" %>

<% end %> <% end %>
<%= standard_buttons(button_id) %>
<% end %>