<%# (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['jobs']['job_status_notification'] if @job.job_type == MemberJob::JOB_TYPE if @editing_view.nil? || !@editing_view url = member_job_path(@job.id) submitStatusPath = edit_member_job_path(@job.id, :page => 'submit_status_notification') skippedStatusPath = edit_member_job_path(@job.id, :page => 'skipped_status_notification') runStatusPath = edit_member_job_path(@job.id, :page => 'run_status_notification') completeStatusPath = edit_member_job_path(@job.id, :page => 'complete_status_notification') failStatusPath = edit_member_job_path(@job.id, :page => 'fail_status_notification') cancelStatusPath = edit_member_job_path(@job.id, :page => 'cancel_status_notification') retryWaitStatusPath = edit_member_job_path(@job.id, :page => 'retry_wait_status_notification') assignedSubmitStatusPath = edit_member_job_path(@job.id, :format => :json, :list => 'submit_status_users') assignedSkippedStatusPath = edit_member_job_path(@job.id, :format => :json, :list => 'skipped_status_users') assignedRunStatusPath = edit_member_job_path(@job.id, :format => :json, :list => 'run_status_users') assignedCompleteStatusPath = edit_member_job_path(@job.id, :format => :json, :list => 'complete_status_users') assignedFailStatusPath = edit_member_job_path(@job.id, :format => :json, :list => 'fail_status_users') assignedCancelStatusPath = edit_member_job_path(@job.id, :format => :json, :list => 'cancel_status_users') assignedRetryWaitStatusPath = edit_member_job_path(@job.id, :format => :json, :list => 'retry_wait_status_users') 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) submitStatusPath = 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 => 'submit_status_notification') skippedStatusPath = 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 => 'skipped_status_notification') runStatusPath = 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 => 'run_status_notification') completeStatusPath = 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 => 'complete_status_notification') failStatusPath = 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 => 'fail_status_notification') cancelStatusPath = 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 => 'cancel_status_notification') retryWaitStatusPath = 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 => 'retry_wait_status_notification') assignedSubmitStatusPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :format => :json, :list => 'submit_status_users') assignedSkippedStatusPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :format => :json, :list => 'skipped_status_users') assignedRunStatusPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :format => :json, :list => 'run_status_users') assignedCompleteStatusPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :format => :json, :list => 'complete_status_users') assignedFailStatusPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :format => :json, :list => 'fail_status_users') assignedCancelStatusPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :format => :json, :list => 'cancel_status_users') assignedRetryWaitStatusPath = edit_job_editing_job_suite_editing_member_job_path(:job_id => job_id, :editing_job_suite_id => editing_job_suite_id, :id => @job.id, :format => :json, :list => 'retry_wait_status_users') parent_type = "member_job" end else url = job_path(@job.id) submitStatusPath = edit_job_path(@job.id, :page => 'submit_status_notification') skippedStatusPath = edit_job_path(@job.id, :page => 'skipped_status_notification') runStatusPath = edit_job_path(@job.id, :page => 'run_status_notification') completeStatusPath = edit_job_path(@job.id, :page => 'complete_status_notification') failStatusPath = edit_job_path(@job.id, :page => 'fail_status_notification') cancelStatusPath = edit_job_path(@job.id, :page => 'cancel_status_notification') retryWaitStatusPath = edit_job_path(@job.id, :page => 'retry_wait_status_notification') assignedSubmitStatusPath = edit_job_path(@job.id, :format => :json, :list => 'submit_status_users') assignedSkippedStatusPath = edit_job_path(@job.id, :format => :json, :list => 'skipped_status_users') assignedRunStatusPath = edit_job_path(@job.id, :format => :json, :list => 'run_status_users') assignedCompleteStatusPath = edit_job_path(@job.id, :format => :json, :list => 'complete_status_users') assignedFailStatusPath = edit_job_path(@job.id, :format => :json, :list => 'fail_status_users') assignedCancelStatusPath = edit_job_path(@job.id, :format => :json, :list => 'cancel_status_users') assignedRetryWaitStatusPath = edit_job_path(@job.id, :format => :json, :list => 'retry_wait_status_users') 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 => "submit-status-notification", :section_title => t('.submitted_heading')}) do %> <% if @job.send_submit_snmp_trap || @job.send_submit_email %> <% if @job.send_submit_snmp_trap %>

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

<% end %> <% if @job.send_submit_email %> <% if !@job.submit_notification_list.nil? && @job.submit_notification_list.public_list %>

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

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

<% else %>

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

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

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

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

<% end %> <% end %> <% 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.job_log_notification_list', :notification_list => @job.complete_notification_list.name)} " if (@job.send_complete_email_log?) %>

<%= " #{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.job_log_notification', :user => formatted_list_of_usernames(@job.complete_status_user_names)) } " if (@job.send_complete_email_log?) %>

<%= " #{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 => "fail-status-notification", :section_title => t('.failed_heading')}) do %> <% if @job.send_fail_snmp_trap || @job.send_fail_email %> <% if @job.send_fail_snmp_trap %>

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

<% end %> <% if @job.send_fail_email %> <% if !@job.fail_notification_list.nil? && @job.fail_notification_list_public_list %>

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

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

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

<% else %>

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

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

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

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

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

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

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

<% end %> <% if @job.send_cancel_email %> <% if !@job.cancel_notification_list.nil? && @job.cancel_notification_list_public_list %>

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

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

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

<% else %>

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

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

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

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

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

<% end %> <% end %> <% render( :layout => 'shared/edit_section', :locals => { :section_id => "retry-wait-status-notification", :section_title => t('.retry_wait_heading')}) do %> <% if @job.send_retry_wait_snmp_trap || @job.send_retry_wait_email %> <% if @job.send_retry_wait_snmp_trap %>

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

<% end %> <% if @job.send_retry_wait_email %> <% if !@job.retry_wait_notification_list.nil? && @job.retry_wait_notification_list_public_list %>

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

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

<% else %>

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

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

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

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

<% end %> <% end %>
<%= if @editing_view.nil? || !@editing_view standard_buttons(button_id) else standard_buttons(button_id, t('common.Ok')) end %>
<% end %>