diff --git a/app/views/scripts/_autosize_field.html.erb b/app/views/scripts/_autosize_field.html.erb new file mode 100644 index 00000000..89720177 --- /dev/null +++ b/app/views/scripts/_autosize_field.html.erb @@ -0,0 +1,15 @@ + diff --git a/app/views/submissions/_value.html.erb b/app/views/submissions/_value.html.erb index 9306f237..f8bb3cac 100644 --- a/app/views/submissions/_value.html.erb +++ b/app/views/submissions/_value.html.erb @@ -1,7 +1,8 @@ -
+ <% if field['type'].in?(['signature', 'image', 'initials']) %> <% elsif field['type'] == 'file' %> +
<% Array.wrap(value).each do |val| %> @@ -31,10 +32,12 @@ <% end %>
<% elsif field['type'] == 'date' %> +
<%= l(Date.parse(value), format: :long, locale: local_assigns[:locale]) %>
<% else %> +
<%= Array.wrap(value).join(', ') %>
<% end %> -
+ diff --git a/app/views/submissions/show.html.erb b/app/views/submissions/show.html.erb index 6c70b9cf..258a67d9 100644 --- a/app/views/submissions/show.html.erb +++ b/app/views/submissions/show.html.erb @@ -1,25 +1,27 @@
- + <%= render 'submissions/logo' %> - <%= @submission.template.name %> + <%= @submission.template.name %>
<% if @submission.audit_trail.present? %> <%= svg_icon('external_link', class: 'w-6 h-6') %> - Audit Log + <% end %> <% if last_submitter = @submission.submitters.to_a.select(&:completed_at?).max_by(&:completed_at) %> <%= svg_icon('download', class: 'w-6 h-6') %> - Download + <% elsif @submission.submitters.to_a.size == 1 %> @@ -172,3 +174,4 @@
+<%= render 'scripts/autosize_field' %> diff --git a/app/views/submit_form/show.html.erb b/app/views/submit_form/show.html.erb index ba469844..3801e0b1 100644 --- a/app/views/submit_form/show.html.erb +++ b/app/views/submit_form/show.html.erb @@ -41,3 +41,4 @@ +<%= render 'scripts/autosize_field' %>