Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Move quarantine option into av_form

Oliver Güntherf867b22ba692
diff --git a/app/views/admin/settings/attachments_settings/_av_form.html.erb b/app/views/admin/settings/attachments_settings/_av_form.html.erb
index 4d0f29a2704..a79b945df7c 100644
--- a/app/views/admin/settings/attachments_settings/_av_form.html.erb
+++ b/app/views/admin/settings/attachments_settings/_av_form.html.erb
@@ -20,19 +20,21 @@
</div>
</div>
<% end %>
- <div class="form--field">
- <%= setting_select :antivirus_scan_action,
- [
- [t('settings.antivirus.actions.quarantine'), :quarantine],
- [t('settings.antivirus.actions.delete'), :delete],
- ],
- container_class: '-wide'
- %>
- <div class="form--field-instructions">
- <p><%= t('settings.antivirus.actions.instructions_html',
- quarantine_option: t('settings.antivirus.actions.quarantine'),
- delete_option: t('settings.antivirus.actions.delete')
- ) %></p>
- </div>
+ <% if selected != :disabled %>
+ <div class="form--field">
+ <%= setting_select :antivirus_scan_action,
+ [
+ [t('settings.antivirus.actions.quarantine'), :quarantine],
+ [t('settings.antivirus.actions.delete'), :delete],
+ ],
+ container_class: '-wide'
+ %>
+ <div class="form--field-instructions">
+ <p><%= t('settings.antivirus.actions.instructions_html',
+ quarantine_option: t('settings.antivirus.actions.quarantine'),
+ delete_option: t('settings.antivirus.actions.delete')
+ ) %></p>
+ </div>
+ <% end %>
</div>
</turbo-frame>