<%# (C) COPYRIGHT HELP/SYSTEMS, L.L.C. 2009 %> <% fields_for @job do |fields| %>
<%= fields.label :name, t_label('common.name'), :class => "name-label item-label" %>
<%= fields.text_field :name, :disabled => @view_only, :maxLength => 50, :class => "x-form-field name-field" %>

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

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

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

<%= t('common.agent_or_group') %> <%= fields.hidden_field :target_id, :disabled => true %> <%= fields.hidden_field :target_type, :disabled => true %> <%= fields.hidden_field :job_queue_id, :disabled => true %> <%= fields.hidden_field :job_queue_name, :disabled => true %> <%= hidden_field_tag "job_queue_type", @job.get_job_queue_type %> <% if @job.target_type == 'AgentGroup' && !@job.target.nil? %> <%= hidden_field_tag "job_group_type_value", @job.target.group_type %> <% if @job.target.group_utilization? %> <%= hidden_field_tag "job_target_group_type_style", AgentGroup::STYLE_UTILIZATION_BALANCED %> <% elsif @job.target.group_preferred? %> <%= hidden_field_tag "job_target_group_type_style", AgentGroup::STYLE_PREFERRED_AGENT %> <% else %> <%= hidden_field_tag "job_target_group_type_style", AgentGroup::STYLE_ALL_AGENTS %> <% end %> <% end %> <% fields.fields_for :target do |agent_fields| %> <%= agent_fields.hidden_field :name, :disabled => true %> <% end %>

<%= t('.agent_caption') %>

<%= t('.agent_group_caption') %>

<%= fields.text_field :default_priority, :disabled => @view_only, :class => "x-form-field name-field" %>

<%= t('job.default_priority_caption') %>

<%= fields.label :calendar, t_label('jobs.job.calendar'), :class => "x-form-item label calendar-label" %>
<%= fields.hidden_field :calendar_id %>

<%= t('jobs.job.calendar_caption') %>

<% time_zone_id = if @job.timezone_type == 'A' 'job_timezone_agent' elsif @job.timezone_type == 'J' 'job_timezone_selected' else 'job_timezone_server' end %> <%= fields.label :timezone_type, t_label('jobs.job.timezone_option'), :class => "x-form-item label calendar-label" %> <%= fields.hidden_field :timezone_type %> <%= fields.hidden_field :timezone %> <%= hidden_field_tag :origin_time_zone_id, time_zone_id %>

<%= t('jobs.job.timezone_option_caption') %>

<%= fields.label :tag, t_label('common.tags'), :class => "x-form-item label" %>
<%= tags_form_helper(fields, "job[tag_list]", @job.tag_list, {:view_only => @view_only}) %>
<% end %>