This file contains hidden or 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
$.each box, (key, value) -> | |
# Insert a container with a 'Click to sign' button that replaces the signature (mobile devices) | |
mobileSignatureContainer = '<div id="mobile-signature-container">' | |
mobileSignatureContainer += '<img id="signature_img_' + $(value).data('component-id') + '" class="signature-img" data-component-id="' | |
mobileSignatureContainer += $(value).data('component-id') + '"><br/>' | |
mobileSignatureContainer += '<a href="#" id="sign_button_' + $(value).data('component-id') + '" class="btn btn-info btn-xs mobile-sign-button" ' | |
mobileSignatureContainer += 'data-component-id="' + $(value).data('component-id') + '">Click to sign</a>' | |
mobileSignatureContainer += '</div>' | |
$(value).parent().before(mobileSignatureContainer) |
This file contains hidden or 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
<%= form_with(model: section, url: url, local: true, class: 'form', id: 'product_section_form') do |f| %> | |
<% if section.errors.any? %> | |
<div id="error_explanation"> | |
<h3><%= pluralize(section.errors.count, "error") %> prohibited this product section from being saved:</h3> | |
<ul> | |
<% section.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> | |
</div> |
OlderNewer