diff --git a/app/Http/Controllers/Forms/FormController.php b/app/Http/Controllers/Forms/FormController.php index 80f25617b..d51cec1da 100644 --- a/app/Http/Controllers/Forms/FormController.php +++ b/app/Http/Controllers/Forms/FormController.php @@ -98,7 +98,7 @@ public function store(StoreFormRequest $request) ])); return $this->success([ - 'message' => $this->formCleaner->hasCleaned() ? 'Form successfully created, but the Pro features you used will be disabled when sharing your form:' : 'Form created.', + 'message' => $this->formCleaner->hasCleaned() ? 'Form successfully created, but the Pro features you used will be disabled when sharing your form:' : 'Form created.' . ($form->visibility == 'draft' ? ' But other people won\'t be able to see the form since it\'s currently in draft mode' : ''), 'form' => (new FormResource($form))->setCleanings($this->formCleaner->getPerformedCleanings()), 'users_first_form' => $request->user()->forms()->count() == 1 ]); @@ -122,7 +122,7 @@ public function update(UpdateFormRequest $request, string $id) $form->update($formData); return $this->success([ - 'message' => $this->formCleaner->hasCleaned() ? 'Form successfully updated, but the Pro features you used will be disabled when sharing your form:' : 'Form updated.', + 'message' => $this->formCleaner->hasCleaned() ? 'Form successfully updated, but the Pro features you used will be disabled when sharing your form:' : 'Form updated.' . ($form->visibility == 'draft' ? ' But other people won\'t be able to see the form since it\'s currently in draft mode' : ''), 'form' => (new FormResource($form))->setCleanings($this->formCleaner->getPerformedCleanings()), ]); } diff --git a/app/Models/Forms/Form.php b/app/Models/Forms/Form.php index fe2f16396..7ba3fcc9e 100644 --- a/app/Models/Forms/Form.php +++ b/app/Models/Forms/Form.php @@ -84,7 +84,10 @@ class Form extends Model // Security & Privacy 'can_be_indexed', - 'password' + 'password', + + // Custom SEO + 'seo_meta' ]; protected $casts = [ diff --git a/resources/js/components/open/forms/components/CopyContent.vue b/resources/js/components/open/forms/components/CopyContent.vue index ae1444d0e..109d62e13 100644 --- a/resources/js/components/open/forms/components/CopyContent.vue +++ b/resources/js/components/open/forms/components/CopyContent.vue @@ -29,6 +29,10 @@ export default { type: String, required: true }, + isDraft: { + type: Boolean, + default: false + }, }, data() { @@ -50,7 +54,8 @@ export default { el.select() document.execCommand('copy') document.body.removeChild(el) - this.alertSuccess('Copied!') + this.alertSuccess((this.isDraft) ? 'Copied! But other people won\'t be able to see the form since it\'s currently in draft mode' : 'Copied!') + } } } diff --git a/resources/js/components/pages/forms/show/ShareLink.vue b/resources/js/components/pages/forms/show/ShareLink.vue index d3cce9e71..b9e0f88a9 100644 --- a/resources/js/components/pages/forms/show/ShareLink.vue +++ b/resources/js/components/pages/forms/show/ShareLink.vue @@ -3,7 +3,7 @@
Your form is now published and ready to be shared with the world! Copy this link to share your form on social media, messaging apps or via email.
-