diff --git a/api/app/Http/Requests/UserFormRequest.php b/api/app/Http/Requests/UserFormRequest.php index b79bd8eb..9596e092 100644 --- a/api/app/Http/Requests/UserFormRequest.php +++ b/api/app/Http/Requests/UserFormRequest.php @@ -33,6 +33,7 @@ public function rules() 'theme' => ['required', Rule::in(Form::THEMES)], 'width' => ['required', Rule::in(Form::WIDTHS)], 'size' => ['required', Rule::in(Form::SIZES)], + 'layout_rtl' => 'boolean', 'border_radius' => ['required', Rule::in(Form::BORDER_RADIUS)], 'cover_picture' => 'url|nullable', 'logo_picture' => 'url|nullable', diff --git a/api/app/Http/Resources/FormResource.php b/api/app/Http/Resources/FormResource.php index 6686fcbd..878dd3f6 100644 --- a/api/app/Http/Resources/FormResource.php +++ b/api/app/Http/Resources/FormResource.php @@ -74,6 +74,7 @@ private function getProtectedForm() 'is_password_protected' => true, 'has_password' => $this->has_password, 'width' => 'centered', + 'layout_rtl' => $this->layout_rtl, 'no_branding' => $this->no_branding, 'properties' => [], 'logo_picture' => $this->logo_picture, diff --git a/api/app/Models/Forms/Form.php b/api/app/Models/Forms/Form.php index d6d50a35..ee8df7f4 100644 --- a/api/app/Models/Forms/Form.php +++ b/api/app/Models/Forms/Form.php @@ -58,6 +58,7 @@ class Form extends Model implements CachableAttributes 'border_radius', 'theme', 'width', + 'layout_rtl', 'cover_picture', 'logo_picture', 'dark_mode', diff --git a/api/database/migrations/2024_11_08_091638_add_layout_rtl_to_forms_table.php b/api/database/migrations/2024_11_08_091638_add_layout_rtl_to_forms_table.php new file mode 100644 index 00000000..10dee2a3 --- /dev/null +++ b/api/database/migrations/2024_11_08_091638_add_layout_rtl_to_forms_table.php @@ -0,0 +1,27 @@ +boolean('layout_rtl')->default(false); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('forms', function (Blueprint $table) { + $table->dropColumn('layout_rtl'); + }); + } +}; diff --git a/client/components/open/forms/OpenCompleteForm.vue b/client/components/open/forms/OpenCompleteForm.vue index cde381d1..266b6f2c 100644 --- a/client/components/open/forms/OpenCompleteForm.vue +++ b/client/components/open/forms/OpenCompleteForm.vue @@ -2,7 +2,7 @@