-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Remove PDF.js related fields from form
The `show_pdf_viewer` and `show_pdf_download_button` fields were showing up on the form so this commit will remove them.
- Loading branch information
Showing
2 changed files
with
23 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
<%# OVERRIDE: HydraEditor 5.0.5 support dynamic labels and hints for custom worktypes %> | ||
<%# Avoid NoMethod error when rendering partial in Collection or batch edit form %> | ||
<%# Hide unwanted fields from the form %> | ||
<% record = f.object.model %> | ||
<% if f.object.multiple? key %> | ||
<%= f.input key, | ||
as: :multi_value, | ||
label: label_for(term: key, record_class: record.class), | ||
hint: hint_for(term: key, record_class: record.class), | ||
input_html: { class: 'form-control' }, | ||
required: f.object.required?(key) %> | ||
<% else %> | ||
<%= f.input key, | ||
label: label_for(term: key, record_class: record.class), | ||
hint: hint_for(term: key, record_class: record.class), | ||
required: f.object.required?(key) %> | ||
<% end %> | ||
<% return if f.object.try(:hidden?, key) == false %> | ||
<% record = f.object.model %> | ||
<% if f.object.multiple? key %> | ||
<%= f.input key, | ||
as: :multi_value, | ||
label: label_for(term: key, record_class: record.class), | ||
hint: hint_for(term: key, record_class: record.class), | ||
input_html: { class: 'form-control' }, | ||
required: f.object.required?(key) %> | ||
<% else %> | ||
<%= f.input key, | ||
label: label_for(term: key, record_class: record.class), | ||
hint: hint_for(term: key, record_class: record.class), | ||
required: f.object.required?(key) %> | ||
<% end %> |