Patch #3651 ยป redmine_customfield_url.diff
| app/helpers/custom_fields_helper.rb (working copy) | ||
|---|---|---|
|
(custom_field.default_value.blank? ? "<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" : '') :
|
||
|
'<option></option>'
|
||
|
select_tag(field_name, blank_option + options_for_select(custom_field.possible_values, custom_value.value), :id => field_id)
|
||
|
when "url"
|
||
|
text_field_tag(field_name, custom_value.value, :id => field_id, :size => 60)
|
||
|
else
|
||
|
text_field_tag(field_name, custom_value.value, :id => field_id)
|
||
|
end
|
||
| app/models/custom_field.rb (working copy) | ||
|---|---|---|
|
"float" => { :name => :label_float, :order => 4 },
|
||
|
"list" => { :name => :label_list, :order => 5 },
|
||
|
"date" => { :name => :label_date, :order => 6 },
|
||
|
"bool" => { :name => :label_boolean, :order => 7 }
|
||
|
"bool" => { :name => :label_boolean, :order => 7 },
|
||
|
"url" => { :name => :label_url, :order => 8}
|
||
|
}.freeze
|
||
|
validates_presence_of :name, :field_format
|
||
| app/views/custom_fields/_form.rhtml (working copy) | ||
|---|---|---|
|
if (p_searchable) Element.hide(p_searchable.parentNode);
|
||
|
Element.hide(p_values);
|
||
|
break;
|
||
|
case "url":
|
||
|
Element.hide(p_length.parentNode);
|
||
|
if (p_searchable) Element.hide(p_searchable.parentNode);
|
||
|
Element.hide(p_values);
|
||
|
break;
|
||
|
case "float":
|
||
|
case "int":
|
||
|
Element.show(p_length.parentNode);
|
||
| config/locales/en.yml (working copy) | ||
|---|---|---|
|
label_float: Float
|
||
|
label_boolean: Boolean
|
||
|
label_string: Text
|
||
|
label_url: URL
|
||
|
label_text: Long text
|
||
|
label_attribute: Attribute
|
||
|
label_attribute_plural: Attributes
|
||