From a8043eb39a6d27156f7166cc5b2bf405dc8ea180 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 9 Jun 2018 05:09:06 +0200 Subject: [PATCH] login/edit: labeled fields with login and full name --- login/edit.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/login/edit.php b/login/edit.php index 0a90e0e..563a3a5 100644 --- a/login/edit.php +++ b/login/edit.php @@ -8,6 +8,7 @@ if (!empty($User['admin']) and $Page == 'login/edit' and $Args) { $username = ltrim($Args, '/'); $user = [ 'dir' => "profile/$username", + 'name' => $username, ]; if (!is_writable($user['dir'])) { print "

Het is niet mogelijk om de gebruiker {$user['name']} aan te passen.

\n\n"; @@ -16,6 +17,7 @@ if (!empty($User['admin']) and $Page == 'login/edit' and $Args) { } $cols = [ + 'name' => ['label' => 'volledige naam'], 'email' => ['label' => 'e-mailadres', 'type' => 'email'], ]; @@ -33,6 +35,10 @@ foreach ($cols as $col => &$colconf) { $colconf['target'] = $colpath; # editing allowed } +$cols = [ + 'login' => ['label' => 'login', 'value' => $user['name'], 'target' => NULL], +] + $cols; + $colwarn = []; if ($_POST) { foreach ($_POST as $col => $val) { @@ -61,7 +67,7 @@ if ($_POST) { } ?> -
+

Geef een e-mailadres op waarmee we u kunnen bereiken indien nodig. Wij zullen dit adres nooit vrij- of doorgeven. @@ -69,19 +75,22 @@ if ($_POST) {

&$colconf) { - print "\t%s: ', $col, ucfirst($colconf['label'])); + print "\n"; + print ' placeholder="Niet ingesteld"'; + print " />"; if ($error = @$colwarn[$col]) { - print "$error\n"; + print " $error\n"; } + print "
\n"; } ?> -- 2.30.0