mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
🚀 feat(form): simplify validation for check property in ApplicationForm and add alert for agreement in profile view.
This commit is contained in:
@@ -9,6 +9,6 @@ class ApplicationForm extends Form
|
|||||||
{
|
{
|
||||||
#[Validate('nullable|string')]
|
#[Validate('nullable|string')]
|
||||||
public $reason = '';
|
public $reason = '';
|
||||||
#[Validate('boolean|in:true')]
|
#[Validate('boolean')]
|
||||||
public $check = false;
|
public $check = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,6 +172,10 @@ $listenForPayment = function () {
|
|||||||
|
|
||||||
$save = function ($type) {
|
$save = function ($type) {
|
||||||
$this->form->validate();
|
$this->form->validate();
|
||||||
|
if (!$this->form->check) {
|
||||||
|
$this->js('alert("Du musst den Statuten zustimmen.")');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->currentPleb
|
$this->currentPleb
|
||||||
->update([
|
->update([
|
||||||
@@ -322,7 +326,6 @@ $loadEvents = function () {
|
|||||||
<div class="p-6 space-y-6">
|
<div class="p-6 space-y-6">
|
||||||
<h2 class="sm:text-2xl text-[#1B1B1B] dark:text-gray-100 font-bold mb-5">Aktueller Status</h2>
|
<h2 class="sm:text-2xl text-[#1B1B1B] dark:text-gray-100 font-bold mb-5">Aktueller Status</h2>
|
||||||
|
|
||||||
<!-- Picture -->
|
|
||||||
<section>
|
<section>
|
||||||
<div class="flex flex-wrap space-y-2 sm:space-y-0 items-center justify-between">
|
<div class="flex flex-wrap space-y-2 sm:space-y-0 items-center justify-between">
|
||||||
<x-button label="Mit Nostr verbinden" @click="openNostrLogin"
|
<x-button label="Mit Nostr verbinden" @click="openNostrLogin"
|
||||||
|
|||||||
Reference in New Issue
Block a user