Formulare: visueller Baukasten, CSV-Auswahl, Einbindung unter Beiträgen
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m59s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m5s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m11s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m6s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 3m2s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m3s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m37s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m39s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 1m59s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m5s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m11s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m6s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 3m2s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m3s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m37s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m39s
CI / Build-Artefakte aktuell (pull_request) Failing after 52s
- Visueller Formularbaukasten im Portal (/redaktion/formulare/{id}): Formular
wie ausgefüllt, Bezeichnungen/Optionen/Hinweise direkt bearbeiten, Ziehen
und Ablegen aus der Palette, Pflicht/Breite in der Werkzeugleiste,
Einstellungen und Bedingungen in der Seitenleiste, Vorschau mit Bedingungen
- Admin: Felder-Reiter führt in den Baukasten; nach dem Anlegen direkt dorthin
- CSV: in der Formularliste, im Redaktionsbereich und für ausgewählte Einsendungen
- Neuigkeiten: Formular unter dem Beitrag (über den Pagebuilder-Block, ohne
Abhängigkeit vom Formular-Plugin)
- Kein Menüpunkt „Formulare“ im Portal; Redaktionsbereich „Formulare“
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
11123fecc0
commit
435960725d
139 changed files with 1735 additions and 432 deletions
|
|
@ -11,6 +11,7 @@ use Illuminate\Http\UploadedFile;
|
|||
use Illuminate\Support\Facades\Notification;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Inertia\Testing\AssertableInertia as Assert;
|
||||
use Inhaus\Plugins\Forms\Models\Form;
|
||||
use Inhaus\Plugins\News\Models\NewsCategory;
|
||||
use Inhaus\Plugins\News\Models\NewsPost;
|
||||
use Tests\TestCase;
|
||||
|
|
@ -185,4 +186,22 @@ class NewsWorkflowTest extends TestCase
|
|||
$post->update(['published_at' => null]);
|
||||
$this->assertSame(NewsPost::DRAFT, $post->fresh()->status);
|
||||
}
|
||||
|
||||
public function test_a_form_can_be_shown_below_a_post(): void
|
||||
{
|
||||
$form = Form::query()->create(['title' => 'Anmeldung Sommerfest', 'fields' => [['type' => 'text', 'data' => ['label' => 'Name']]]]);
|
||||
|
||||
$this->actingAs($this->editor)->get('/redaktion/neuigkeiten/neu')
|
||||
->assertInertia(fn (Assert $p) => $p->where('forms', [['value' => $form->id, 'label' => 'Anmeldung Sommerfest']]));
|
||||
|
||||
$this->post('/redaktion/neuigkeiten', $this->payload(['action' => 'publish', 'form_id' => $form->id]))->assertSessionHasNoErrors();
|
||||
$post = NewsPost::query()->sole();
|
||||
$this->assertSame($form->id, $post->form_id);
|
||||
|
||||
$this->actingAs(User::factory()->create())->get('/neuigkeiten/'.$post->slug)->assertInertia(fn (Assert $p) => $p
|
||||
->where('form.blocks.0.type', 'forms.form')
|
||||
->where('form.blocks.0.props.title', 'Anmeldung Sommerfest'));
|
||||
|
||||
$this->actingAs($this->editor)->put('/redaktion/neuigkeiten/'.$post->id, $this->payload(['action' => 'publish', 'form_id' => 99999]))->assertSessionHasErrors('form_id');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue