Editable Submissions (#49)

* Editable Submissions

* refactor some code

* Update composer.lock

Co-authored-by: JhumanJ <julien@nahum.net>
This commit is contained in:
Chirag
2023-01-10 19:22:14 +05:30
committed by GitHub
parent 997a86f734
commit 0a33581c0a
390 changed files with 2616 additions and 1153 deletions

View File

@@ -109,6 +109,9 @@
<open-form-button v-if="form.re_fillable" :theme="theme" :color="form.color" class="my-4" @click="restart">
{{ form.re_fill_button_text }}
</open-form-button>
<p v-if="form.editable_submissions && submissionId" class="mt-5">
<a target="_parent" :href="form.share_url+'?submission_id='+submissionId" class="text-nt-blue hover:underline">Edit submission</a>
</p>
<p v-if="!form.no_branding" class="mt-5">
<a target="_parent" href="https://opnform.com/?utm_source=form&utm_content=create_form_free" class="text-nt-blue hover:underline">Create your form for free with OpnForm</a>
</p>
@@ -144,7 +147,8 @@ export default {
passwordForm: new Form({
password: null
}),
hidePasswordDisabledMsg: false
hidePasswordDisabledMsg: false,
submissionId: false
}
},
@@ -203,6 +207,10 @@ export default {
window.location.href = response.data.redirect_url
}
if (response.data.submission_id) {
this.submissionId = response.data.submission_id
}
this.loading = false
this.submitted = true
this.$emit('submitted', true)