- <div class="modal-body">
- <% if n_files == 1 %>
- <% ua = @required_user_agreements.first; file = ua.files.first %>
- <object data="<%= url_for(controller: 'collections', action: 'show_file', uuid: ua.uuid, file: "#{file[0]}/#{file[1]}") %>" type="<%= Rack::Mime::MIME_TYPES[file[1].match(/\.\w+$/)[0]] rescue '' %>" width="100%" height="400px">
- </object>
- <% end %>
- <div class="alert alert-info">
- <strong>Please check <%= n_files > 1 ? 'each' : 'the' %> box</strong> to indicate that you have read and accepted the agreement.
- </div>
- <div style="margin-left: 4em">
- <% @required_user_agreements.each do |ua| %>
- <% ua.files.each do |file| %>
- <%= f.label 'checked[]', class: 'checkbox inline' do %>
+ <% if n_files == 1 and (Rails.configuration.show_user_agreement_inline rescue false) %>
+ <% ua = unsigned_user_agreements.first; file = ua.files.first %>
+ <object data="<%= url_for(controller: 'collections', action: 'show_file', uuid: ua.uuid, file: "#{file[0]}/#{file[1]}") %>" type="<%= Rack::Mime::MIME_TYPES[file[1].match(/\.\w+$/)[0]] rescue '' %>" width="100%" height="400px">
+ </object>
+ <% end %>
+ <div>
+ <% unsigned_user_agreements.each do |ua| %>
+ <% ua.files.each do |file| %>
+ <div class="checkbox">
+ <%= f.label 'checked[]' do %>