Skip to content

Commit

Permalink
rename fba2 to fba
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwoldatwork committed Dec 6, 2024
1 parent a2aacfa commit 4002dc2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/forms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def example
end

def js
render(partial: 'components/widget/fba2', formats: :js, locals: { form: @form })
render(partial: 'components/widget/fba', formats: :js, locals: { form: @form })
end

def new
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/touchpoints_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def show

def js
@form.increment!(:survey_form_activations)
render(partial: 'components/widget/fba2', formats: :js, locals: { form: @form })
render(partial: 'components/widget/fba', formats: :js, locals: { form: @form })
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/models/form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def deployable_form?
# returns javascript text that can be used standalone
# or injected into a GTM Container Tag
def touchpoints_js_string
ApplicationController.new.render_to_string(partial: 'components/widget/fba2', formats: :js, locals: { touchpoint: self })
ApplicationController.new.render_to_string(partial: 'components/widget/fba', formats: :js, locals: { form: self })
end

def non_flagged_submissions(start_date: nil, end_date: nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ function FBAform(d, N) {
xhr.onload = callback.bind(this);
xhr.send(JSON.stringify({
"submission": params,
<%- if @form.verify_csrf? %>
<%- if form.verify_csrf? %>
"authenticity_token": form.querySelector("#authenticity_token") ?
form.querySelector("#authenticity_token").value : null
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/submissions/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= render "components/forms/custom_layout", form: form, questions: form.ordered_questions %>
<script>
<%= render(partial: "components/widget/fba2", formats: :js, locals: { form: form, suppress_ui: true }) %>
<%= render(partial: "components/widget/fba", formats: :js, locals: { form: form, suppress_ui: true }) %>
</script>

0 comments on commit 4002dc2

Please sign in to comment.