From: Toshi MARUYAMA Date: Thu, 1 Sep 2011 03:56:14 +0000 (+0000) Subject: rename .rhtml to .html.erb of app/views/custom_fields/_form.rhtml. X-Git-Tag: 1.3.0~997 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=00a275699a1eaf0637284990b6155382ac27c6c1;p=redmine.git rename .rhtml to .html.erb of app/views/custom_fields/_form.rhtml. :rhtml and :rxml were finally removed as template handlers at Rails 3.1 RC4. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6966 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb new file mode 100644 index 000000000..14fca7e59 --- /dev/null +++ b/app/views/custom_fields/_form.html.erb @@ -0,0 +1,114 @@ +<%= error_messages_for 'custom_field' %> + + + +
+

<%= f.text_field :name, :required => true %>

+

<%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :onchange => "toggle_custom_field_format();", + :disabled => !@custom_field.new_record? %>

+

+ <%= f.text_field :min_length, :size => 5, :no_label => true %> - + <%= f.text_field :max_length, :size => 5, :no_label => true %>
(<%=l(:text_min_max_length_info)%>)

+

<%= f.text_field :regexp, :size => 50 %>
(<%=l(:text_regexp_info)%>)

+

+ <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %> +
<%= l(:text_custom_field_possible_values_info) %> +

+

<%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %>

+<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %> +
+ +
+<% case @custom_field.class.name +when "IssueCustomField" %> + +
<%=l(:label_tracker_plural)%> + <% for tracker in @trackers %> + <%= check_box_tag "custom_field[tracker_ids][]", tracker.id, (@custom_field.trackers.include? tracker) %> <%=h tracker.name %> + <% end %> + <%= hidden_field_tag "custom_field[tracker_ids][]", '' %> +
+   +

<%= f.check_box :is_required %>

+

<%= f.check_box :is_for_all %>

+

<%= f.check_box :is_filter %>

+

<%= f.check_box :searchable %>

+ +<% when "UserCustomField" %> +

<%= f.check_box :is_required %>

+

<%= f.check_box :visible %>

+

<%= f.check_box :editable %>

+ +<% when "ProjectCustomField" %> +

<%= f.check_box :is_required %>

+

<%= f.check_box :visible %>

+

<%= f.check_box :searchable %>

+ +<% when "TimeEntryCustomField" %> +

<%= f.check_box :is_required %>

+ +<% else %> +

<%= f.check_box :is_required %>

+ +<% end %> +<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %> +
+<%= javascript_tag "toggle_custom_field_format();" %> diff --git a/app/views/custom_fields/_form.rhtml b/app/views/custom_fields/_form.rhtml deleted file mode 100644 index 14fca7e59..000000000 --- a/app/views/custom_fields/_form.rhtml +++ /dev/null @@ -1,114 +0,0 @@ -<%= error_messages_for 'custom_field' %> - - - -
-

<%= f.text_field :name, :required => true %>

-

<%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :onchange => "toggle_custom_field_format();", - :disabled => !@custom_field.new_record? %>

-

- <%= f.text_field :min_length, :size => 5, :no_label => true %> - - <%= f.text_field :max_length, :size => 5, :no_label => true %>
(<%=l(:text_min_max_length_info)%>)

-

<%= f.text_field :regexp, :size => 50 %>
(<%=l(:text_regexp_info)%>)

-

- <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %> -
<%= l(:text_custom_field_possible_values_info) %> -

-

<%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %>

-<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %> -
- -
-<% case @custom_field.class.name -when "IssueCustomField" %> - -
<%=l(:label_tracker_plural)%> - <% for tracker in @trackers %> - <%= check_box_tag "custom_field[tracker_ids][]", tracker.id, (@custom_field.trackers.include? tracker) %> <%=h tracker.name %> - <% end %> - <%= hidden_field_tag "custom_field[tracker_ids][]", '' %> -
-   -

<%= f.check_box :is_required %>

-

<%= f.check_box :is_for_all %>

-

<%= f.check_box :is_filter %>

-

<%= f.check_box :searchable %>

- -<% when "UserCustomField" %> -

<%= f.check_box :is_required %>

-

<%= f.check_box :visible %>

-

<%= f.check_box :editable %>

- -<% when "ProjectCustomField" %> -

<%= f.check_box :is_required %>

-

<%= f.check_box :visible %>

-

<%= f.check_box :searchable %>

- -<% when "TimeEntryCustomField" %> -

<%= f.check_box :is_required %>

- -<% else %> -

<%= f.check_box :is_required %>

- -<% end %> -<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %> -
-<%= javascript_tag "toggle_custom_field_format();" %>