<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2010 %> <% button_id = "button_close_#{@forecast_definition.id}" form_id = "edit_forecast_definition_#{@forecast_definition.id}" @title_section = t "forecast_definitions.forecast_definition.dialog_title" @title_section = @title_section + ' ' + t('common.view_only_mode') if @view_only @title_item = h @forecast_definition.name @help_link_anchor = HELP_URL_CONFIG['scheduling_objects']['forecast_models']['forecast_model_settings'] %> <% form_for @forecast_definition, :url => forecast_model_path(), :html => {:id => form_id,:class => "edit_forecast_definition",: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 => "settings-general", :section_title => t('common.general_title')}) do %>

<%= t_label('common.name') %>

<%= h @forecast_definition.name %>

<%= t_label('common.description')%>

<%= h @forecast_definition.description %>

<%= t_label('forecast_definitions.edit_general.forecast_start_date')%>

<%= h @forecast_definition.starting_date_text %>

<%= t_label('forecast_definitions.edit_general.forecast_start_time')%>

<%= h @forecast_definition.starting_time_text %>

<%= t_label('forecast_definitions.edit_general.forecast_duration')%>

<%= h @forecast_definition.duration_text %>

<%= t_label('common.tags')%>

<%= h @forecast_definition.tag_list %>

<% end %> <% render(:layout => 'shared/edit_section', :locals => {:section_id => "settings-exclude", :section_title => t('forecast_definitions.exclude_jobs')}) do %> <% something_excluded = false %> <% if @forecast_definition.exclude_timed_interval_jobs %>

<%= t('forecast_definitions.exclude_timed_intervals') %>

<% something_excluded = true %> <% end %> <% if @forecast_definition.exclude_daily_interval_jobs %>

<%= t('forecast_definitions.exclude_daily_intervals') %>

<% something_excluded = true %> <% end %> <% if @forecast_definition.excluded_jobs.length > 0 %>

<%= t('forecast_definitions.exclude_jobs_defined') %>

<% something_excluded = true %> <% end %> <% if !something_excluded %>

<%= t('forecast_definitions.nothing_excluded') %>

<% end %> <% end %> <% render(:layout => 'shared/edit_section', :locals => {:section_id => "settings-purge", :section_title => t('forecast_definitions.purge_title')}) do %> <% purging_set = false %> <% if @forecast_definition.purge_history_with_system_settings %>

<%= t('forecast_definitions.use_defaults') %>

<% purging_set = true %> <% else %> <% if @forecast_definition.purge_history %>

<%= t('forecast_definitions.purge_by_days', :days => @forecast_definition.purge_history_days) %>

<% purging_set = true %> <% end %> <% end %> <% if !purging_set %>

<%= t('forecast_definitions.no_purge') %>

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