obsolete.ChilliProject/app/views/custom_fields/_form.rhtml

53 lines
2.0 KiB
Plaintext

<%= error_messages_for 'custom_field' %>
<!--[form:custom_field]-->
<div class="box">
<p><label for="custom_field_name"><%=l(:field_name)%><span class="required"> *</span></label>
<%= text_field 'custom_field', 'name' %></p>
<p><label for="custom_field_field_format"><%=l(:field_field_format)%></label>
<%= select("custom_field", "field_format", custom_field_formats_for_select) %></p>
<p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label>
<%= text_field 'custom_field', 'min_length', :size => 5 %> -
<%= text_field 'custom_field', 'max_length', :size => 5 %><br>(<%=l(:text_min_max_length_info)%>)</p>
<p><label for="custom_field_regexp"><%=l(:field_regexp)%></label>
<%= text_field 'custom_field', 'regexp', :size => 50 %><br>(<%=l(:text_regexp_info)%>)</p>
<p><label for="custom_field_possible_values"><%=l(:field_possible_values)%></label>
<%= text_area 'custom_field', 'possible_values', :rows => 5, :cols => 60 %><br>(<%=l(:text_possible_values_info)%>)</p>
</div>
<!--[eoform:custom_field]-->
<div class="box">
<% case type.to_s
when "IssueCustomField" %>
<fieldset><legend><%=l(:label_tracker_plural)%></legend>
<% for tracker in @trackers %>
<input type="checkbox"
name="tracker_ids[]"
value="<%= tracker.id %>"
<%if @custom_field.trackers.include? tracker%>checked="checked"<%end%>
> <%= tracker.name %>
<% end %></fieldset>
&nbsp;
<p><label for="custom_field_is_required"><%=l(:field_is_required)%></label>
<%= check_box 'custom_field', 'is_required' %></p>
<p><label for="custom_field_is_for_all"><%=l(:field_is_for_all)%></label>
<%= check_box 'custom_field', 'is_for_all' %></p>
<% when "UserCustomField" %>
<p><label for="custom_field_is_required"><%=l(:field_is_required)%></label>
<%= check_box 'custom_field', 'is_required' %></p>
<% when "ProjectCustomField" %>
<p><label for="custom_field_is_required"><%=l(:field_is_required)%></label>
<%= check_box 'custom_field', 'is_required' %></p>
<% end %>
</div>