From 996f2338a5a5d47579d75876a590049c6c250de3 Mon Sep 17 00:00:00 2001 From: rainydaysavings Date: Tue, 30 Jun 2020 17:35:38 +0100 Subject: [PATCH] [CONTROLLER] UserAdminPanel handle request fix [UI] Minor CSS font size corrections --- public/assets/css/base_small.css | 10 +++++----- public/assets/css/faq/faq_small.css | 4 ++-- src/Controller/UserAdminPanel.php | 22 +--------------------- src/Routes/Main.php | 1 + 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/public/assets/css/base_small.css b/public/assets/css/base_small.css index 867c8acd26..0de0fbb4bb 100644 --- a/public/assets/css/base_small.css +++ b/public/assets/css/base_small.css @@ -25,7 +25,7 @@ ul { } .drop-down ul li ul a { - line-height: 1.1em; + line-height: 1.4em; } .drop-down ul li ul { @@ -170,8 +170,8 @@ b { #avatar { z-index: 1; position: absolute; - width: 2em; - height: 2em; + width: 2.5em; + height: 2.5em; margin-left: 1em; } @@ -180,9 +180,9 @@ b { flex-wrap: wrap; justify-content: flex-start; width: 100%; - padding: 0.8em 1em 0.8em 1em; + padding: 0.7em 1em 0.7em 1em; order: 4; - font-size: 0.75em; + font-size: 0.8em; align-items: center; } diff --git a/public/assets/css/faq/faq_small.css b/public/assets/css/faq/faq_small.css index 4299adf3ac..3a4344a0fc 100644 --- a/public/assets/css/faq/faq_small.css +++ b/public/assets/css/faq/faq_small.css @@ -10,7 +10,7 @@ margin-right: 0; background-color: #00000080; padding: 1em 1em; - font-size: 0.7em; + font-size: 0.75em; box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1); } @@ -58,7 +58,7 @@ background-color: rgba(0, 0, 0, 0.40); padding: 0 1em 1em 1em; border-radius: 1em; - font-size: 0.7em; + font-size: 0.75em; box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1); } diff --git a/src/Controller/UserAdminPanel.php b/src/Controller/UserAdminPanel.php index fa1ed892b1..a50cc03b08 100644 --- a/src/Controller/UserAdminPanel.php +++ b/src/Controller/UserAdminPanel.php @@ -24,6 +24,7 @@ * @category Controller * * @author Hugo Sales + * @author Eliseu Amaro * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ @@ -52,27 +53,6 @@ class UserAdminPanel extends AbstractController ['save', SubmitType::class, ['label' => _m('Save')]], ]); $prof->handleRequest($request); - if ($prof->isSubmitted()) { - $data = $prof->getData(); - if ($prof->isValid() && array_key_exists(_m('Setting'), $data)) { - list($section, $setting) = explode(':', $data[_m('Setting')]); - $value = $data[_m('Value')]; - $default = $defaults[$section][$setting]; - if (gettype($default) === gettype($value)) { - $conf = DB::find('\App\Entity\Config', ['section' => $section, 'setting' => $setting]); - $old_value = $conf->getValue(); - $conf->setValue(serialize($value)); - DB::flush(); - } - return $this->render('config/admin.html.twig', [ - 'prof' => $prof->createView(), - 'old_value' => unserialize($old_value), - 'default' => $default, - ]); - } else { - // Display error - } - } return $this->render('settings/profile.html.twig', [ 'prof' => $prof->createView(), diff --git a/src/Routes/Main.php b/src/Routes/Main.php index 15d32d3e8d..1dcff50149 100644 --- a/src/Routes/Main.php +++ b/src/Routes/Main.php @@ -24,6 +24,7 @@ * @category Router * * @author Hugo Sales + * @author Eliseu Amaro * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */