add loading text for form submit buttons

This commit is contained in:
Alex Turchyn
2023-06-11 12:42:13 +00:00
parent 85574d6605
commit 21f684ed4a
20 changed files with 44 additions and 23 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<p>
Form has been submitted alredy by ypu - thanks!
</p>
<%= button_to button_title('Send copy to Email'), send_submission_email_index_path, params: { template_slug: @template.slug, email: params[:email] }, form: { onsubmit: 'event.submitter.disabled = true' } %>
<%= button_to button_title(title: 'Send copy to Email', disabled_with: 'Sending'), send_submission_email_index_path, params: { template_slug: @template.slug, email: params[:email] }, form: { onsubmit: 'event.submitter.disabled = true' } %>
<%# do not allow donwload for securetiy reaosn<a href="">Download documets</a> %>
+1 -1
View File
@@ -5,5 +5,5 @@ You have been invited to submit template <%= @template.name %>
<%= f.label :email %>
<%= f.email_field :email, required: true %>
</div>
<%= f.button button_title %>
<%= f.button button_title(title: 'Confirm', disabled_with: 'Processing') %>
<% end %>