Right to left mode (#611)
* Right to left mode * Fix label --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -33,6 +33,7 @@ abstract class UserFormRequest extends \Illuminate\Foundation\Http\FormRequest
|
||||
'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',
|
||||
|
||||
@@ -74,6 +74,7 @@ class FormResource extends JsonResource
|
||||
'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,
|
||||
|
||||
@@ -58,6 +58,7 @@ class Form extends Model implements CachableAttributes
|
||||
'border_radius',
|
||||
'theme',
|
||||
'width',
|
||||
'layout_rtl',
|
||||
'cover_picture',
|
||||
'logo_picture',
|
||||
'dark_mode',
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('forms', function (Blueprint $table) {
|
||||
$table->boolean('layout_rtl')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('forms', function (Blueprint $table) {
|
||||
$table->dropColumn('layout_rtl');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user