File modules/cms/action/profile/ProfileThemeAction.class.php
Last commit: Sat Dec 7 20:34:52 2024 +0100 Jan Dankert UI: New Selection for user color scheme.
1 <?php 2 namespace cms\action\profile; 3 use cms\action\Method; 4 use cms\action\ProfileAction; 5 use cms\base\Configuration; 6 use cms\base\Startup; 7 use language\Language; 8 use language\Messages; 9 use security\Base2n; 10 use util\Request; 11 12 class ProfileThemeAction extends ProfileAction implements Method { 13 public function view() { 14 15 $this->setTemplateVars( $this->user->getProperties() ); 16 17 $this->setTemplateVar( 'allstyles',$this->user->getAvailableStyles() ); 18 19 } 20 21 22 /** 23 * Saving the user profile. 24 * 25 * @return void 26 */ 27 public function post() { 28 29 30 $this->request->handleText('style',function($value) { 31 $this->user->style = $value; 32 }); 33 34 $this->request->handleNumber('styleScheme',function($value) { 35 $this->user->styleScheme = $value; 36 }); 37 38 // Overwrite user in session with new settings. 39 Request::setUser( $this->user ); 40 41 $this->user->persist(); 42 $this->addNoticeFor( $this->user,Messages::SAVED); 43 } 44 }
Downloadmodules/cms/action/profile/ProfileThemeAction.class.php
History Sat, 7 Dec 2024 20:34:52 +0100 Jan Dankert UI: New Selection for user color scheme. Fri, 6 Dec 2024 23:29:56 +0100 Jan Dankert UI: Cleaner profile dialog in navigation menu.