diff options
Diffstat (limited to 'app/helpers/custom_fields_helper.rb')
-rw-r--r-- | app/helpers/custom_fields_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 5447130a5..173e0d5f8 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -40,8 +40,13 @@ module CustomFieldsHelper :label => DocumentCategory::OptionName} ] - def custom_fields_tabs - CUSTOM_FIELDS_TABS + def render_custom_fields_tabs(types) + tabs = CUSTOM_FIELDS_TABS.select {|h| types.include?(h[:name]) } + render_tabs tabs + end + + def custom_field_type_options + CUSTOM_FIELDS_TABS.map {|h| [l(h[:label]), h[:name]]} end def render_custom_field_format_partial(form, custom_field) |