[CONTROLLER] UserAdminPanel handle request fix
[UI] Minor CSS font size corrections
This commit is contained in:
		| @@ -25,7 +25,7 @@ ul { | |||||||
| } | } | ||||||
|  |  | ||||||
| .drop-down ul li ul a { | .drop-down ul li ul a { | ||||||
|     line-height: 1.1em; |     line-height: 1.4em; | ||||||
| } | } | ||||||
|  |  | ||||||
| .drop-down ul li ul { | .drop-down ul li ul { | ||||||
| @@ -170,8 +170,8 @@ b { | |||||||
| #avatar { | #avatar { | ||||||
|     z-index: 1; |     z-index: 1; | ||||||
|     position: absolute; |     position: absolute; | ||||||
|     width: 2em; |     width: 2.5em; | ||||||
|     height: 2em; |     height: 2.5em; | ||||||
|     margin-left: 1em; |     margin-left: 1em; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -180,9 +180,9 @@ b { | |||||||
|     flex-wrap: wrap; |     flex-wrap: wrap; | ||||||
|     justify-content: flex-start; |     justify-content: flex-start; | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     padding: 0.8em 1em 0.8em 1em; |     padding: 0.7em 1em 0.7em 1em; | ||||||
|     order: 4; |     order: 4; | ||||||
|     font-size: 0.75em; |     font-size: 0.8em; | ||||||
|     align-items: center; |     align-items: center; | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ | |||||||
|     margin-right: 0; |     margin-right: 0; | ||||||
|     background-color: #00000080; |     background-color: #00000080; | ||||||
|     padding: 1em 1em; |     padding: 1em 1em; | ||||||
|     font-size: 0.7em; |     font-size: 0.75em; | ||||||
|     box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1); |     box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -58,7 +58,7 @@ | |||||||
|     background-color: rgba(0, 0, 0, 0.40); |     background-color: rgba(0, 0, 0, 0.40); | ||||||
|     padding: 0 1em 1em 1em; |     padding: 0 1em 1em 1em; | ||||||
|     border-radius: 1em; |     border-radius: 1em; | ||||||
|     font-size: 0.7em; |     font-size: 0.75em; | ||||||
|     box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1); |     box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -24,6 +24,7 @@ | |||||||
|  * @category Controller |  * @category Controller | ||||||
|  * |  * | ||||||
|  * @author    Hugo Sales <hugo@fc.up.pt> |  * @author    Hugo Sales <hugo@fc.up.pt> | ||||||
|  |  * @author    Eliseu Amaro <eliseu@fc.up.pt> | ||||||
|  * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org |  * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org | ||||||
|  * @license   https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later |  * @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')]], ]); |             ['save',        SubmitType::class, ['label' => _m('Save')]], ]); | ||||||
|  |  | ||||||
|         $prof->handleRequest($request); |         $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', [ |         return $this->render('settings/profile.html.twig', [ | ||||||
|             'prof' => $prof->createView(), |             'prof' => $prof->createView(), | ||||||
|   | |||||||
| @@ -24,6 +24,7 @@ | |||||||
|  * @category Router |  * @category Router | ||||||
|  * |  * | ||||||
|  * @author    Hugo Sales <hugo@fc.up.pt> |  * @author    Hugo Sales <hugo@fc.up.pt> | ||||||
|  |  * @author    Eliseu Amaro <eliseu@fc.up.pt> | ||||||
|  * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org |  * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org | ||||||
|  * @license   https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later |  * @license   https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later | ||||||
|  */ |  */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user