diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/back_tape_restore.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/back_tape_restore.html.ep index 534db1a..4a3f716 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/back_tape_restore.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/back_tape_restore.html.ep @@ -14,7 +14,7 @@ % if ( stash 'error' ) {
%= $c->render_to_string(inline => stash 'error') -
+ %}

<%= $title%>

diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/layouts/AdminLTE.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/layouts/AdminLTE.html.ep index 87ce22a..0c6313b 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/layouts/AdminLTE.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/layouts/AdminLTE.html.ep @@ -12,6 +12,7 @@ %= content_for 'head_contrib' + % if (config 'hasJquery') { %= include 'partials/_js_imports' %= include 'common_js' @@ -28,9 +29,6 @@ %= include 'partials/_nutups_overrides' % } - - - diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_footer.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_footer.html.ep index b5a5804..cd2abbc 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_footer.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_footer.html.ep @@ -1,7 +1,6 @@
- % if ( $c->is_logged_in && $c->is_admin) { SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II % my $mode; @@ -10,5 +9,4 @@ % }
Copyright 1999-2006 Mitel Corporation
%= session 'copyRight' -
Copyright (c) 2013-2024 Koozali Foundation Inc.
-
\ No newline at end of file +
Copyright (c) 2013-2024 Koozali Foundation Inc.
\ No newline at end of file diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_swt_theme.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_swt_theme.html.ep index 5024d79..e5aa1fa 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_swt_theme.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_swt_theme.html.ep @@ -1,40 +1,34 @@ -
- % my $btn = l('swt_THEME'); - %= form_for $c->url_for('swttheme') => (method => 'POST') => begin - % my $value = $c->session->{'CurrentTheme'}; - % $value = session 'CurrentTheme'; +
+%# content_for 'module' => begin - % param 'Theme' => $value unless param 'Theme'; - %= select_field 'Theme' => $c->theme_list(), class => "" - %= hidden_field 'From' => $c->tx->req->url - %= submit_button "$btn" -
- - - - - -%# my $value = $c->session->{'CurrentTheme'}; +% my $value = $c->session->{'CurrentTheme'}; % $value = session 'CurrentTheme'; % my $formUrl = $c->url_for('swttheme'); % param 'Theme' => $value unless param 'Theme'; -% my @themes = $c->theme_list(); + +%# my @themes = $c->theme_list(); + +%#= dumper $c + +%#= my $size = keys ($c->theme_list) + +% my @themeList = $c->theme_list(); +%# = dumper @themeList +% my @themes = $themeList[0]; +% param 'Theme' => $value unless param 'Theme';
- + + %= select_field 'Theme' => $c->theme_list(), class => "form-select" + %= hidden_field 'From' => $c->tx->req->url
@@ -45,4 +39,7 @@ -% end \ No newline at end of file +%# end +
+ + diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_list.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_list.html.ep index b736792..d2cd118 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_list.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_list.html.ep @@ -5,10 +5,9 @@ %= form_for '/useraccounts' => (method => 'POST') => begin -

-
- %= submit_button "$btn", class => "" -

+
+ +
% end @@ -23,132 +22,134 @@ % } else { - - - - - - - - - - % foreach my $user (@$users) { - - % my $username = $user->key(); - % my $first = $user->prop('FirstName'); - % my $last = $user->prop('LastName'); - % my $lockable = $user->prop('Lockable') || 'yes'; - % my $removable = $user->prop('Removable') || 'yes'; - % my $fwd = (($user->prop('EmailForward') || 'local') =~ m/^forward|both$/) ? - % $user->prop('ForwardAddress') : ''; - % my $vpnaccess = $user->prop('VPNClientAccess') || 'no'; - % $vpnaccess = $vpnaccess eq 'yes' ? $c->l('YES') : $c->l('NO'); - % my $password_set = $user->prop('PasswordSet'); - - %= t td => (class => "") => $username - %= t td => (class => "") => "$first $last" - %= t td => (class => "") => $vpnaccess - %= t td => (class => "") => $fwd - % my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = ' '; - % my $modify_text = l('MODIFY'); # Localized text - % my $csrf_token = "TOKEN"; # CSRF token for security - % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure - % my $password_text = l("PASSWORD_RESET"); - %if ($useraccounts_user_name eq 'admin') { - %$actionModify = qq{ - % - % - % - %}; - %$actionResetPw = qq{ - % - % - % - %}; - %} else { - %$actionModify = qq{ - % - % - % - %}; - %} - %if ($password_set ne 'yes') { - %$actionLock = l('ACCOUNT_LOCKED'); - %$actionResetPw = qq{ - % - % - % - %}; - %} elsif ($useraccounts_user_name ne 'admin') { - % my $lock_text = l('ACCOUNT LOCKED'); # Localized text - % my $csrf_token = "TOKEN"; # CSRF token for security - % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure - %$actionLock = qq{ - % - % - % - %}; - %$actionResetPw = qq{ - % - % - % - %}; - %} - %if ( $removable eq 'yes' ) { - % my $remove_text = l('REMOVE'); # Localized text - % my $csrf_token = "TOKEN"; # CSRF token for security - %$actionRemove = qq{ - % - % - % - %}; - %} - - % my $thisdomain = $c->req->url->to_abs->host; - % my $roundcube_text = l('Webmail'); # Localized text - % $csrf_token = "TOKEN"; # CSRF token for security - % $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure - % $actionroundcube = qq{ - % - % - % - %}; - + + + + + - % } + + + + % foreach my $user (@$users) { + + % my $username = $user->key(); + % my $first = $user->prop('FirstName'); + % my $last = $user->prop('LastName'); + % my $lockable = $user->prop('Lockable') || 'yes'; + % my $removable = $user->prop('Removable') || 'yes'; + % my $fwd = (($user->prop('EmailForward') || 'local') =~ m/^forward|both$/) ? + % $user->prop('ForwardAddress') : ''; + % my $vpnaccess = $user->prop('VPNClientAccess') || 'no'; + % $vpnaccess = $vpnaccess eq 'yes' ? $c->l('YES') : $c->l('NO'); + % my $password_set = $user->prop('PasswordSet'); + + + + + + + + % my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = ' '; + % my $modify_text = l('MODIFY'); # Localized text + % my $csrf_token = "TOKEN"; # CSRF token for security + % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure + % my $password_text = l("PASSWORD_RESET"); + %if ($useraccounts_user_name eq 'admin') { + %$actionModify = qq{ + % + % + %  + %}; + %$actionResetPw = qq{ + % + % + %  + %}; + %} else { + %$actionModify = qq{ + % + % + %  + %}; + %} + %if ($password_set ne 'yes') { + %$actionLock = l('ACCOUNT_LOCKED'); + %$actionResetPw = qq{ + % + % + %  + %}; + %} elsif ($useraccounts_user_name ne 'admin') { + % my $lock_text = l('ACCOUNT LOCKED'); # Localized text + % my $csrf_token = "TOKEN"; # CSRF token for security + % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure + %$actionLock = qq{ + % + % + %  + %}; + %$actionResetPw = qq{ + % + % + %  + %}; + %} + %if ( $removable eq 'yes' ) { + % my $remove_text = l('REMOVE'); # Localized text + % my $csrf_token = "TOKEN"; # CSRF token for security + %$actionRemove = qq{ + % + % + %  + %}; + %} + + % my $thisdomain = $c->req->url->to_abs->host; + % my $roundcube_text = l('Webmail'); # Localized text + % $csrf_token = "TOKEN"; # CSRF token for security + % $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure + % $actionroundcube = qq{ + % + % + %  + %}; + + + % }
- %=l 'ACCOUNT' - - %=l 'USER_NAME' - - %=l 'usr_VPN_CLIENT_ACCESS' - - %=l 'usr_FORWARDING_ADDRESS' - - %=l 'ACTION' -
- <%= $c->render_to_string(inline => $actionModify) %> - <%= $c->render_to_string(inline => $actionResetPw) %> - <%= $c->render_to_string(inline => $actionLock) %> - <%= $c->render_to_string(inline => $actionRemove) %> - <%= $c->render_to_string(inline => $actionroundcube) %> - + %=l 'ACCOUNT' + + %=l 'USER_NAME' + + %=l 'usr_VPN_CLIENT_ACCESS' + + %=l 'usr_FORWARDING_ADDRESS' + + %=l 'ACTION' +
<%= $username %><%=$first %> <%=$last %><%= $vpnaccess %><%= $fwd %> + <%= $c->render_to_string(inline => $actionModify) %> + <%= $c->render_to_string(inline => $actionResetPw) %> + <%= $c->render_to_string(inline => $actionLock) %> + <%= $c->render_to_string(inline => $actionRemove) %> + <%= $c->render_to_string(inline => $actionroundcube) %> +
@@ -157,3 +158,8 @@ %= hidden_field 'trt' => $usr_datas->{trt}
+ + +
+ +
\ No newline at end of file diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_upds.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_upds.html.ep index 45795cd..c6e1816 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_upds.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_upds.html.ep @@ -1,3 +1,99 @@ +% content_for 'module' => begin + +
+
+

<%= l 'usr_MODIFY_ADMIN_TITLE' %>

+ + <%= l 'usr_ACCOUNT_NAME' %> : <%= $usr_datas->{user} %> + + + +
+ % param 'FirstName' => $usr_datas->{firstname} unless param 'FirstName'; + +
+
+ +
+
+ {firstname} %> > +
+
+ + First Name + +
+
+ + + % param 'LastName' => $usr_datas->{lastname} unless param 'LastName'; + +
+
+ +
+
+ {lastname} %>> +
+
+ + Last Name + +
+
+ + % param 'EmailForward' => $usr_datas->{emailforward} unless param 'EmailForward'; + +
+
+ +
+
+ %= select_field 'EmailForward' => $c->emailForward_list(), class => "form-select" +
+ + + % param 'ForwardAddress' => $usr_datas->{forwardaddress} unless param 'ForwardAddress'; + +
+
+ +
+
+ +
+
+ + Email forwarding address + +
+
+ + + % param 'VPNClientAccess' => $usr_datas->{vpnclientaccess} unless param 'VPNClientAccess'; + +
+
+ +
+
+ %= select_field 'VPNClientAccess' => [[ (l 'NO') => 'no'], [ (l 'YES') => 'yes']], class => "form-select" +
+ +
+
+ +
+
+ + + +% end + +
+ + +
% my $btn = l('SAVE'); diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/review.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/review.html.ep index b03ac3e..b245898 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/review.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/review.html.ep @@ -3,9 +3,6 @@ % content_for 'module' => begin -%#= include 'partials/_panel_card_top' -%#= include 'partials/_panel_card_header' -

<%= $title %>

@@ -25,7 +22,5 @@
-%#= include 'partials/_panel_card_footer' -%#= include 'partials/_panel_card_bottom' % end \ No newline at end of file diff --git a/smeserver-manager-AdminLTE.spec b/smeserver-manager-AdminLTE.spec index 83c02ae..404370a 100644 --- a/smeserver-manager-AdminLTE.spec +++ b/smeserver-manager-AdminLTE.spec @@ -1,6 +1,6 @@ %define name smeserver-manager-AdminLTE %define version 11.0.0 -%define release 8 +%define release 9 Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2 Name: %{name} Version: %{version} @@ -26,6 +26,11 @@ AdminLTE is an html framework for admin consoles wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip %changelog +* Sat Apr 19 2025 John Crisp 11.0.0-9.sme +- Starting to update forms +- Moving as much formatting to simple html as possible +- Use Mojo helpers for some parts eg theme chooser - may come back to that + * Fri Apr 18 2025 John Crisp 11.0.0-8.sme - More cleanup - Add Card support across all panels except login