diff options
author | Go MAEDA <maeda@farend.jp> | 2022-03-17 11:52:12 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-03-17 11:52:12 +0000 |
commit | 8529e39e6da800f2f075d04362eb49a32bc83e64 (patch) | |
tree | 24cb1396d97d745ecbe279834cd5594a53c5c4f3 /app | |
parent | e1ae7f5c8418cf0c908a78e86913bdab3cd35491 (diff) | |
download | redmine-8529e39e6da800f2f075d04362eb49a32bc83e64.tar.gz redmine-8529e39e6da800f2f075d04362eb49a32bc83e64.zip |
Show a custom field description as a placeholder (#14275).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21460 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/custom_fields_helper.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 0ff648d9d..fb341d9ec 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -81,6 +81,8 @@ module CustomFieldsHelper def custom_field_tag(prefix, custom_value) cf = custom_value.custom_field css = cf.css_classes + placeholder = cf.description + placeholder&.tr!("\n", ' ') if cf.field_format != 'text' data = nil if cf.full_text_formatting? css += ' wiki-edit' @@ -94,6 +96,7 @@ module CustomFieldsHelper custom_field_tag_name(prefix, cf), custom_value, :class => css, + :placeholder => placeholder, :data => data) end |