From 20b4e3b86f483942fa1f2d1638539126db37dc2f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 6 Apr 2021 18:46:17 +0200 Subject: [PATCH] HTML5 require the fields when enforce is on Signed-off-by: Joas Schilling --- lib/Controller/RegisterController.php | 2 ++ templates/form/user.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Controller/RegisterController.php b/lib/Controller/RegisterController.php index ed6a83c..51bfdb7 100644 --- a/lib/Controller/RegisterController.php +++ b/lib/Controller/RegisterController.php @@ -236,8 +236,10 @@ class RegisterController extends Controller { 'loginname' => $loginname, 'fullname' => $fullname, 'show_fullname' => $this->config->getAppValue('registration', 'show_fullname', 'no') === 'yes', + 'enforce_fullname' => $this->config->getAppValue('registration', 'enforce_fullname', 'no') === 'yes', 'phone' => $phone, 'show_phone' => $this->config->getAppValue('registration', 'show_phone', 'no') === 'yes', + 'enforce_phone' => $this->config->getAppValue('registration', 'enforce_phone', 'no') === 'yes', 'message' => $message, 'password' => $password, 'additional_hint' => $additional_hint, diff --git a/templates/form/user.php b/templates/form/user.php index a5fea2b..104ff8d 100644 --- a/templates/form/user.php +++ b/templates/form/user.php @@ -45,7 +45,7 @@ script('registration', 'registration-form');

+} ?>" placeholder="t('Full name')); ?>" />

@@ -57,7 +57,7 @@ script('registration', 'registration-form');

+} ?>" placeholder="t('Phone number')); ?>" />