summaryrefslogtreecommitdiffstats
path: root/app/views/custom_fields/_form.rhtml
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-09-01 03:56:14 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-09-01 03:56:14 +0000
commit00a275699a1eaf0637284990b6155382ac27c6c1 (patch)
tree8944af113ca64c706125df32a80293ba51f76a73 /app/views/custom_fields/_form.rhtml
parent8a9038297b6dabbb520587853fb3f06133da252b (diff)
downloadredmine-00a275699a1eaf0637284990b6155382ac27c6c1.tar.gz
redmine-00a275699a1eaf0637284990b6155382ac27c6c1.zip
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
Diffstat (limited to 'app/views/custom_fields/_form.rhtml')
-rw-r--r--app/views/custom_fields/_form.rhtml114
1 files changed, 0 insertions, 114 deletions
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' %>
-
-<script type="text/javascript">
-//<![CDATA[
-function toggle_custom_field_format() {
- format = $("custom_field_field_format");
- p_length = $("custom_field_min_length");
- p_regexp = $("custom_field_regexp");
- p_values = $("custom_field_possible_values");
- p_searchable = $("custom_field_searchable");
- p_default = $("custom_field_default_value");
-
- p_default.setAttribute('type','text');
- Element.show(p_default.parentNode);
-
- switch (format.value) {
- case "list":
- Element.hide(p_length.parentNode);
- Element.hide(p_regexp.parentNode);
- if (p_searchable) Element.show(p_searchable.parentNode);
- Element.show(p_values.parentNode);
- break;
- case "bool":
- p_default.setAttribute('type','checkbox');
- Element.hide(p_length.parentNode);
- Element.hide(p_regexp.parentNode);
- if (p_searchable) Element.hide(p_searchable.parentNode);
- Element.hide(p_values.parentNode);
- break;
- case "date":
- Element.hide(p_length.parentNode);
- Element.hide(p_regexp.parentNode);
- if (p_searchable) Element.hide(p_searchable.parentNode);
- Element.hide(p_values.parentNode);
- break;
- case "float":
- case "int":
- Element.show(p_length.parentNode);
- Element.show(p_regexp.parentNode);
- if (p_searchable) Element.hide(p_searchable.parentNode);
- Element.hide(p_values.parentNode);
- break;
- case "user":
- case "version":
- Element.hide(p_length.parentNode);
- Element.hide(p_regexp.parentNode);
- if (p_searchable) Element.hide(p_searchable.parentNode);
- Element.hide(p_values.parentNode);
- Element.hide(p_default.parentNode);
- break;
- default:
- Element.show(p_length.parentNode);
- Element.show(p_regexp.parentNode);
- if (p_searchable) Element.show(p_searchable.parentNode);
- Element.hide(p_values.parentNode);
- break;
- }
-}
-
-//]]>
-</script>
-
-<div class="box">
-<p><%= f.text_field :name, :required => true %></p>
-<p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :onchange => "toggle_custom_field_format();",
- :disabled => !@custom_field.new_record? %></p>
-<p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label>
- <%= f.text_field :min_length, :size => 5, :no_label => true %> -
- <%= f.text_field :max_length, :size => 5, :no_label => true %><br />(<%=l(:text_min_max_length_info)%>)</p>
-<p><%= f.text_field :regexp, :size => 50 %><br />(<%=l(:text_regexp_info)%>)</p>
-<p>
- <%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %>
- <br /><em><%= l(:text_custom_field_possible_values_info) %></em>
-</p>
-<p><%= @custom_field.field_format == 'bool' ? f.check_box(:default_value) : f.text_field(:default_value) %></p>
-<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
-</div>
-
-<div class="box">
-<% case @custom_field.class.name
-when "IssueCustomField" %>
-
- <fieldset><legend><%=l(:label_tracker_plural)%></legend>
- <% 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][]", '' %>
- </fieldset>
- &nbsp;
- <p><%= f.check_box :is_required %></p>
- <p><%= f.check_box :is_for_all %></p>
- <p><%= f.check_box :is_filter %></p>
- <p><%= f.check_box :searchable %></p>
-
-<% when "UserCustomField" %>
- <p><%= f.check_box :is_required %></p>
- <p><%= f.check_box :visible %></p>
- <p><%= f.check_box :editable %></p>
-
-<% when "ProjectCustomField" %>
- <p><%= f.check_box :is_required %></p>
- <p><%= f.check_box :visible %></p>
- <p><%= f.check_box :searchable %></p>
-
-<% when "TimeEntryCustomField" %>
- <p><%= f.check_box :is_required %></p>
-
-<% else %>
- <p><%= f.check_box :is_required %></p>
-
-<% end %>
-<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
-</div>
-<%= javascript_tag "toggle_custom_field_format();" %>