houdini/app/views/layouts/_javascripts.html.erb
2020-04-23 14:09:14 -05:00

36 lines
1,002 B
Text

<%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%>
<!-- Load up polyfill service -->
<script src="https://cdn.polyfill.io/v1/polyfill.min.js"></script>
<%= render 'layouts/app_data' %>
<% if Settings.payment_provider.stripe_proprietary_v2_js %>
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<% else %>
<%= IncludeAsset.js "/client/js/stripe_wrapper/page.js" %>
<% end %>
<script>
Stripe.setPublishableKey("<%= Settings.payment_provider.stripe_public_key %>");
window._csrf = "<%= form_authenticity_token %>";
</script>
<%= IncludeAsset.js '/client/js/i18n.js' %>
<script>
I18n.defaultLocale = "<%= I18n.default_locale %>"
I18n.locale = "<%= I18n.locale %>"
</script>
<%= yield :javascripts %>
<span data-parsley-namespace='parsley-'></span>
<% if current_role?([:nonprofit_associate, :nonprofit_admin, :super_admin]) && yield(:hide_nav_beacon) != 'true' %>
<%= render 'layouts/nav_beacon' %>
<% end %>