diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 13:44:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 13:44:58 +0000 |
commit | 1cd6a2aa84db83b127cc037021dc6351877790d0 (patch) | |
tree | ae3eaa0a3f6d15c62771db779f19f15fce4b1d87 /app/views/custom_fields | |
parent | 122ba564b9c5c475c360e45af51fa92cfe969657 (diff) | |
download | redmine-1cd6a2aa84db83b127cc037021dc6351877790d0.tar.gz redmine-1cd6a2aa84db83b127cc037021dc6351877790d0.zip |
Adds User and Version custom field format that can be used to reference a project member or version in custom fields (#2096).
These new field formats are available for project, issue, version and time entry custom fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5272 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/custom_fields')
-rw-r--r-- | app/views/custom_fields/_form.rhtml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/views/custom_fields/_form.rhtml b/app/views/custom_fields/_form.rhtml index 8cbd90371..2900af900 100644 --- a/app/views/custom_fields/_form.rhtml +++ b/app/views/custom_fields/_form.rhtml @@ -40,6 +40,14 @@ function toggle_custom_field_format() { 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); @@ -54,7 +62,7 @@ function toggle_custom_field_format() { <div class="box"> <p><%= f.text_field :name, :required => true %></p> -<p><%= f.select :field_format, custom_field_formats_for_select, {}, :onchange => "toggle_custom_field_format();", +<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 %> - |