Skip to content

Commit

Permalink
Display agreement to terms and condition in user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Sep 20, 2023
1 parent df611c7 commit f701ce1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Http/Forms/User/SettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ private function bindFormEvents(): void
}
}
});
$this->addEventListener(FormEvents::POST_SUBMIT, function (Form $form) {
$form->remove('terms');
});
}

public function buildForm(): void
Expand Down Expand Up @@ -88,6 +91,11 @@ public function buildForm(): void
'rules' => 'boolean',
'label' => 'Przyklejony pasek menu',
])
->add('terms', 'checkbox', [
'rules' => 'boolean',
'label' => new TwigHtml((new UserSettings)->termsAndPrivacyPolicyAgreement()),
'attr' => ['disabled' => 'disabled', 'checked' => 'checked']
])
->add('marketing_agreement', 'checkbox', [
'rules' => 'boolean',
'label' => new TwigHtml((new UserSettings)->marketingAgreement())
Expand Down

0 comments on commit f701ce1

Please sign in to comment.