Skip to content

Commit

Permalink
Revert "Use importmaps"
Browse files Browse the repository at this point in the history
This reverts commit 1d74df8.
  • Loading branch information
jbirdjavi committed Dec 5, 2023
1 parent 1d74df8 commit f55a862
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ import 'jquery-validation'
import '@activeadmin/activeadmin'

import './custom/active_admin_custom'
import './custom/campaign-form'
2 changes: 1 addition & 1 deletion app/views/admin/forms/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
<a href="https://policies.google.com/terms">Terms of Service</a> apply.
</small>
<style>.grecaptcha-badge { visibility: hidden; } </style>
<%= javascript_importmap_tags %>
<script type="application/javascript" src="<%= asset_url '/assets/campaign-form.js' %>"></script>
<% if form.use_recaptcha %><script type="application/javascript" src='https://www.google.com/recaptcha/api.js<%= "?render=#{form.recaptcha_key}" if form.recaptcha_v3 %>'></script><% end %>
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//= require jquery
//= require jquery-form
//= require jquery-validation/dist/jquery.validate

// Only initialize campaign-forms JS if it hasn't loaded previously.
if (typeof window.campaignForms === 'undefined') {

Expand Down

0 comments on commit f55a862

Please sign in to comment.