diff --git a/acl/CHANGELOG b/acl/CHANGELOG index 1f1cf40de..bb5c93013 100644 --- a/acl/CHANGELOG +++ b/acl/CHANGELOG @@ -53,3 +53,4 @@ Added an API function to allow easier anonymous module access setup. Removed the Hide Unused button and associated functionality, as un-available modules are already automatically hidden in the Un-used Modules category. Moved the 'global ACL' fields to the Edit User and Edit Group pages, so that restrictions applying to all modules can be more easily found and edited. Added a per-user option to not grant that user new module permissions when Webmin is upgraded. +If any theme overlays are installed, users' overlays can be selected on the Edit User page. diff --git a/acl/edit_user.cgi b/acl/edit_user.cgi index 3c75564c5..434ed1ef6 100755 --- a/acl/edit_user.cgi +++ b/acl/edit_user.cgi @@ -183,10 +183,14 @@ if ($access{'cats'}) { } if ($access{'theme'}) { + @all = &webmin::list_themes(); + @themes = grep { !$_->{'overlay'} } @all; + @overlays = grep { $_->{'overlay'} } @all; + # Current theme @topts = ( ); push(@topts, [ "", $text{'edit_themedef'} ]); - foreach $t (&webmin::list_themes()) { + foreach $t (@themes) { push(@topts, [ $t->{'dir'}, $t->{'desc'} ]); } print &ui_table_row($text{'edit_theme'}, @@ -195,6 +199,16 @@ if ($access{'theme'}) { [ 0, &ui_select("theme", $user{'theme'}, \@topts) ] ])); } +if ($access{'theme'} && @overlays) { + # Overlay theme, if any + print &ui_table_row($text{'edit_overlay'}, + &ui_radio("overlay_def", defined($user{'overlay'}) ? 0 : 1, + [ [ 1, $text{'edit_overlayglobal'} ], + [ 0, &ui_select("overlay", $user{'overlay'}, + [ map { [ $_->{'dir'}, $_->{'desc'} ] } @overlays ] + ) ] ])); + } + if ($showui) { print &ui_hidden_table_end("ui"); } diff --git a/acl/lang/en b/acl/lang/en index 493bed30a..bb9ffb94b 100644 --- a/acl/lang/en +++ b/acl/lang/en @@ -68,9 +68,11 @@ edit_risk_low=Normal user edit_groupmods=(In addition to modules from group) edit_euser=You are not allowed to edit this user edit_ecreate=You are not allowed to create users -edit_theme=Personal theme +edit_theme=Personal UI theme edit_themeglobal=From Webmin Configuration edit_themedef=Old Webmin theme +edit_overlay=Personal theme overlay +edit_overlayglobal=None - use theme defaults edit_log=View Logs edit_selall=Select all edit_invert=Invert selection @@ -99,6 +101,7 @@ save_err=Failed to save user save_ename='$1' is not a valid username save_enamewebmin=The username 'webmin' is reserved for internal use save_edup=The username '$1' is already in use +save_eoverlay=A theme overlay cannot be selected unless a theme is save_edeny=you cannot deny yourself access to the Webmin Users module save_eos=The Same as Unix password option is not supported on your operating system. save_emd5=The Same as Unix password option cannot be used on systems with MD5 encryption diff --git a/acl/save_user.cgi b/acl/save_user.cgi index 09d00544f..03b4d6644 100755 --- a/acl/save_user.cgi +++ b/acl/save_user.cgi @@ -179,8 +179,17 @@ $salt = chr(int(rand(26))+65).chr(int(rand(26))+65); $user{'name'} = $in{'name'}; $user{'lang'} = !$access{'lang'} ? $old->{'lang'} : $in{'lang_def'} ? undef : $in{'lang'}; -$user{'theme'} = !$access{'theme'} ? $old->{'theme'} : - $in{'theme_def'} ? undef : $in{'theme'}; +if (!$access{'theme'}) { + $user{'theme'} = $old->{'theme'}; + $user{'overlay'} = $old->{'overlay'}; + } +else { + $user{'theme'} = $in{'theme_def'} ? undef : $in{'theme'}; + $user{'overlay'} = $in{'overlay_def'} ? undef : $in{'overlay'}; + if ($user{'overlay'} && !$user{'theme'}) { + &error($text{'save_eoverlay'}); + } + } $user{'cert'} = !$access{'chcert'} ? $old->{'cert'} : $in{'cert_def'} ? undef : $in{'cert'}; $user{'notabs'} = !$access{'cats'} ? $old->{'notabs'} : $in{'notabs'}; diff --git a/change-user/CHANGELOG b/change-user/CHANGELOG index 710259517..14bf16127 100644 --- a/change-user/CHANGELOG +++ b/change-user/CHANGELOG @@ -1,2 +1,4 @@ ---- Changes since 1.430 ---- Converted the UI to use the new Webmin user interface functions, for a more consistent look. +---- Changes since 1.440 ---- +If any theme overlays are installed, one can be selected in this module to modify the appearance of the underlying theme. diff --git a/webmin/CHANGELOG b/webmin/CHANGELOG index c940ea622..a627e5e93 100644 --- a/webmin/CHANGELOG +++ b/webmin/CHANGELOG @@ -82,3 +82,5 @@ On Linux systems, the IO scheduling class and priority for Webmin Cron jobs can Added a field to the SSL Encryption page for setting allowed ciphers. ---- Changes since 1.440 ---- Added an advanced option to have Webmin turn off the immutable bit on files before writing to them, and turn it back on when done. +Re-designed the Webmin Themes page to use tabs. +Added support for overlay themes, which can be selected in addition to a regular theme. An overlay typically just modifies the CSS or images in the real theme, making simple design changes easier.