Skip to content

Commit

Permalink
Adds labels to the edit title form fields in the File Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
randalldfloyd committed Nov 5, 2024
1 parent 8ac01e0 commit bdf986e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/views/hyrax/base/_file_manager_member.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
<%= simple_form_for [main_app, node], remote: true, html: {'data-type': 'json'} do |f| %>
<div class="card-header">
<div class="order-title">
<%= f.input :title, as: :string, input_html: { name: "#{f.object.model_name.singular}[title][]", class: "title" }, value: node.to_s, label: false, hint: false %>
<label class="sr-only" id='<%= "edit_#{f.object.model_name.singular}_title" %>'>Edit title</label>
<%= f.input :title, as: :string, input_html: { name: "#{f.object.model_name.singular}[title][]", class: "title", 'aria-labelledby': "edit_#{f.object.model_name.singular}_title" }, value: node.to_s, label: false, hint: false %>
</div>
<div class="file-set-link float-right">
<%= link_to contextual_path(node, @presenter), title: "Edit file" do %>
<span class="fa fa-pencil" aria-hidden="true"></span>
<% end %>
</div>
<% if node.respond_to?(:label) %>
<div class="order-filename">
<em title="<%= node.page_title %>">(<%= truncate(node.label, length: 29) %>)</em>
</div>
<% unless node.label.nil? %>
<div class="order-filename" >
<em title="<%= node.page_title %>">(<%= truncate(node.label, length: 29) %>)</em>
</div>
<% end %>
<% end %>
</div>
<div class="card-body">
Expand Down

0 comments on commit bdf986e

Please sign in to comment.