This commit is contained in:
f4ilji
2024-10-14 14:56:10 +05:00
parent 77b3e3b4b1
commit dd3a0c6ecd
258 changed files with 6548 additions and 1777 deletions
@@ -197,9 +197,51 @@ class FormBuilderItem
RuleRequiredComponent::getComponent(),
]),
]),
Builder\Block::make('additional_education_choice')
->label('Выбрать дополнительное образование')
->schema([
TextInput::make('title_field')
->label('Заголовок поля')
->live(onBlur: true)
->afterStateUpdated(function (string $operation, string $state, Forms\Set $set) {
$set('name_field', Str::slug($state) . Carbon::now()->timestamp );
}),
Forms\Components\Hidden::make('name_field')->required(),
Forms\Components\Textarea::make('description')->label('Описание поля (опционально)'),
Section::make('Настройка')
->statePath('rules')
->schema([
// RuleRequiredComponent::getComponent(),
// RuleLengthLimitComponent::getComponent(),
]),
])
->maxItems(1),
Builder\Block::make('educational_program_choice')
->label('Выбрать Образовательную программу')
->schema([
TextInput::make('title_field')
->label('Заголовок поля')
->live(onBlur: true)
->afterStateUpdated(function (string $operation, string $state, Forms\Set $set) {
$set('name_field', Str::slug($state) . Carbon::now()->timestamp );
}),
Forms\Components\Hidden::make('name_field')->required(),
Forms\Components\Textarea::make('description')->label('Описание поля (опционально)'),
Section::make('Настройка')
->statePath('rules')
->schema([
RuleRequiredComponent::getComponent(),
RuleLengthLimitComponent::getComponent(),
]),
])
->maxItems(1),
])
->label('')
->addActionLabel('Добавить поле')
->blockPickerColumns(3)
->blockPickerWidth('2xl')
->collapsed();
}