|
27 | 27 |
|
28 | 28 | <!-- Field: Resource Type --> |
29 | 29 | <%= f.multi_input :resource_type, label: 'Resource types', errors: @material.errors[:resource_type], |
30 | | - title: t('materials.hints.resource_type'), visibility_toggle: feature_enabled?('materials_disabled') %> |
| 30 | + title: t('materials.hints.resource_type'), visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
31 | 31 |
|
32 | 32 | <!-- Field: Scientific Topics --> |
33 | 33 | <%= f.autocompleter :scientific_topics, url: edam_topics_path, template: 'autocompleter/term', |
34 | 34 | id_field: :uri, label_field: :preferred_label, |
35 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 35 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
36 | 36 |
|
37 | 37 | <hr> |
38 | 38 |
|
39 | 39 | <!-- Field: Keywords --> |
40 | | - <%= f.multi_input :keywords, title: t('materials.hints.keywords'), visibility_toggle: feature_enabled?('materials_disabled') %> |
| 40 | + <%= f.multi_input :keywords, title: t('materials.hints.keywords'), visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
41 | 41 |
|
42 | 42 | <!-- Field: Licence --> |
43 | 43 | <%= f.input :licence, collection: licence_options_for_select, as: :grouped_select, group_method: :last, group_label_method: :first, |
44 | 44 | input_html: { title: t('materials.hints.licence'), class: 'js-select2' }, |
45 | 45 | prompt: 'Select a licence...', errors: @material.errors[:licence], field_lock: true, |
46 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 46 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
47 | 47 |
|
48 | 48 | <!-- Field: Status --> |
49 | 49 | <%= f.input :status, collection: MaterialStatusDictionary.instance.options_for_select, prompt: 'Select a status...', |
50 | 50 | errors: @material.errors[:status], input_html: { title: t('materials.hints.status') }, |
51 | | - field_lock: true, visibility_toggle: feature_enabled?('materials_disabled') %> |
| 51 | + field_lock: true, visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
52 | 52 |
|
53 | 53 | <!-- Field: Contact --> |
54 | 54 | <%= f.input :contact, input_html: { rows: '5', title: t('materials.hints.contact') }, field_lock: true, |
55 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 55 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
56 | 56 |
|
57 | 57 | <!-- Field: DOI --> |
58 | 58 | <%= f.input :doi, field_lock: true, input_html: { title: t('materials.hints.doi') }, |
59 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 59 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
60 | 60 |
|
61 | 61 | <!-- Field: Version --> |
62 | 62 | <%= f.input :version, input_html: { title: t('materials.hints.version') }, field_lock: true, |
63 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 63 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
64 | 64 |
|
65 | 65 | <!-- Field: Provider --> |
66 | 66 | <%= f.input :content_provider_id, collection: current_user.get_editable_providers, label_method: :title, value_method: :id, |
67 | 67 | include_blank: true, field_lock: true, input_html: { title: t('materials.hints.providers') }, |
68 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 68 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
69 | 69 |
|
70 | 70 | <!-- Field: Authors --> |
71 | 71 | <%= f.multi_input :authors, suggestions_url: people_autocomplete_suggestions_path, title: t('materials.hints.authors'), |
72 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 72 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
73 | 73 |
|
74 | 74 | <!-- Field: Contributors --> |
75 | 75 | <%= f.multi_input :contributors, suggestions_url: people_autocomplete_suggestions_path, title: t('materials.hints.contributors'), |
76 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 76 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
77 | 77 |
|
78 | 78 | <!-- Field: Target Audience --> |
79 | 79 | <%= f.multi_input :target_audience, label: 'Target audiences', errors: @material.errors[:target_audience], |
80 | | - title: t('events.hints.targets'), visibility_toggle: feature_enabled?('materials_disabled') %> |
| 80 | + title: t('events.hints.targets'), visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
81 | 81 |
|
82 | 82 | <!-- Field: Prerequisites --> |
83 | 83 | <%= f.input :prerequisites, as: :markdown_area, field_lock: true, |
84 | 84 | input_html: { rows: '3', title: t('materials.hints.prerequisites') }, |
85 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 85 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
86 | 86 |
|
87 | 87 | <!-- Field: Level --> |
88 | 88 | <%= f.input :difficulty_level, collection: DifficultyDictionary.instance.options_for_select, |
89 | 89 | label: 'Competency level', prompt: 'Select a difficulty level...', field_lock: true, |
90 | 90 | errors: @material.errors[:difficulty_level], input_html: { title: t('materials.hints.difficulty') }, |
91 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 91 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
92 | 92 |
|
93 | 93 | <!-- Field: Learning Objectives--> |
94 | 94 | <%= f.input :learning_objectives, as: :markdown_area, field_lock: true, |
95 | 95 | input_html: { rows: '3', title: t('materials.hints.objectives') }, |
96 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 96 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
97 | 97 |
|
98 | 98 | <!-- Field: Date Created --> |
99 | 99 | <%= f.input :date_created, as: :date_picker, field_lock: true, input_html: { title: t('materials.hints.date_created') }, |
100 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 100 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
101 | 101 |
|
102 | 102 |
|
103 | 103 | <!-- Field: Dates --> |
104 | 104 | <%= f.input :date_modified, as: :date_picker, field_lock: true, input_html: { title: t('materials.hints.date_modified') }, |
105 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 105 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
106 | 106 | <%= f.input :date_published, as: :date_picker, field_lock: true, input_html: { title: t('materials.hints.date_published') }, |
107 | | - visibility_toggle: feature_enabled?('materials_disabled') %> |
| 107 | + visibility_toggle: TeSS::Config.feature['materials_disabled'] %> |
108 | 108 |
|
109 | 109 | <!-- Field: Other Types --> |
110 | 110 | <%= f.input :other_types, input_html: { title: t('materials.hints.other_types') }, field_lock: true, |
|
0 commit comments