Skip to content

Commit

Permalink
Merge pull request #3 from lucky-media/v1.2
Browse files Browse the repository at this point in the history
v1.2
  • Loading branch information
lokmanm authored Mar 19, 2024
2 parents 5967b45 + 4606e43 commit d28c82e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
26 changes: 26 additions & 0 deletions public/build/assets/site-a126440d.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"src": "resources/css/site.css"
},
"resources/js/site.js": {
"file": "assets/site-6726e1ae.js",
"file": "assets/site-a126440d.js",
"isEntry": true,
"src": "resources/js/site.js"
}
Expand Down
11 changes: 10 additions & 1 deletion resources/js/form/Formatic.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ export const Formatic = () => ({
this.form = this.$form(
"post",
this.$refs.form.getAttribute("action"),
JSON.parse(this.$refs.form.getAttribute("x-data")).dynamic_form
JSON.parse(this.$refs.form.getAttribute("x-data")).form,
{
headers: {
"X-CSRF-Token": {
toString: () =>
this.$refs.form.querySelector('[name="_token"]')
.value,
},
},
}
);
},

Expand Down
2 changes: 1 addition & 1 deletion resources/views/partials/sets/formatic.antlers.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<x-block form_size="{form_size}">
{{ form:create :in="selected_form:handle" js="alpine:dynamic_form" attr:x-ref="form" files="true" }}
{{ form:create :in="selected_form:handle" js="alpine:form" attr:x-ref="form" files="true" }}
<div x-data="formatic()">
<template x-if="success">
{{ if submit_options === 'thankyou_page' }}
Expand Down

0 comments on commit d28c82e

Please sign in to comment.