From 7ef3308a8dc566b743b7777cbd72db3f2ca43da4 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 1 Mar 2020 10:15:35 -0500 Subject: [PATCH 1/2] Improve feedback in mod/settings --- mod/settings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index fcbd8208d..1d1caa6f8 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -252,6 +252,8 @@ function settings_post(App $a) unlink($_FILES['importcontact-filename']['tmp_name']); } } + + return; } if (!empty($_POST['resend_relocate'])) { @@ -363,17 +365,17 @@ function settings_post(App $a) if ($username != $a->user['username']) { if (strlen($username) > 40) { - $err .= DI::l10n()->t(' Please use a shorter name.'); + $err .= DI::l10n()->t('Please use a shorter name.'); } if (strlen($username) < 3) { - $err .= DI::l10n()->t(' Name too short.'); + $err .= DI::l10n()->t('Name too short.'); } } if ($email != $a->user['email']) { // check for the correct password if (!User::authenticate(intval(local_user()), $_POST['mpassword'])) { - $err .= DI::l10n()->t('Wrong Password') . EOL; + $err .= DI::l10n()->t('Wrong Password.'); $email = $a->user['email']; } // check the email is valid @@ -391,7 +393,7 @@ function settings_post(App $a) } if (strlen($err)) { - notice($err . EOL); + notice($err); return; } From a344809d3c029c771fe2f5d4860f770a0c5a5df8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 1 Mar 2020 10:15:56 -0500 Subject: [PATCH 2/2] [frio] Enable file upload in settings form --- view/theme/frio/templates/settings/settings.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/frio/templates/settings/settings.tpl b/view/theme/frio/templates/settings/settings.tpl index 11506a70a..ff340f993 100644 --- a/view/theme/frio/templates/settings/settings.tpl +++ b/view/theme/frio/templates/settings/settings.tpl @@ -4,7 +4,7 @@ {{$nickname_block nofilter}} -
+ {{* We organize the settings in collapsable panel-groups *}}