From 65688f649e72aa82260a847f846a91ff6e36a58c Mon Sep 17 00:00:00 2001 From: fsociety Date: Sat, 26 Oct 2024 19:40:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20feat(form):=20simplify=20validat?= =?UTF-8?q?ion=20for=20check=20property=20in=20ApplicationForm=20and=20add?= =?UTF-8?q?=20alert=20for=20agreement=20in=20profile=20view.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Livewire/Forms/ApplicationForm.php | 2 +- resources/views/pages/association/profile.blade.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Forms/ApplicationForm.php b/app/Livewire/Forms/ApplicationForm.php index ffdb495..998665e 100644 --- a/app/Livewire/Forms/ApplicationForm.php +++ b/app/Livewire/Forms/ApplicationForm.php @@ -9,6 +9,6 @@ class ApplicationForm extends Form { #[Validate('nullable|string')] public $reason = ''; - #[Validate('boolean|in:true')] + #[Validate('boolean')] public $check = false; } diff --git a/resources/views/pages/association/profile.blade.php b/resources/views/pages/association/profile.blade.php index 9ae6a6e..7bc034e 100644 --- a/resources/views/pages/association/profile.blade.php +++ b/resources/views/pages/association/profile.blade.php @@ -172,6 +172,10 @@ $listenForPayment = function () { $save = function ($type) { $this->form->validate(); + if (!$this->form->check) { + $this->js('alert("Du musst den Statuten zustimmen.")'); + return; + } $this->currentPleb ->update([ @@ -322,7 +326,6 @@ $loadEvents = function () {

Aktueller Status

-