From 087875571464e7c8968c3f7905692575aa78aac3 Mon Sep 17 00:00:00 2001 From: John Crisp Date: Sun, 18 May 2025 12:18:20 +0200 Subject: [PATCH] Ibays done. Add some consistency elsewhere --- .../themes/AdminLTE/templates/ibays.html.ep | 8 +- .../templates/partials/_grp_list.html.ep | 4 +- .../templates/partials/_grp_upd.html.ep | 12 +- .../templates/partials/_iba_list.html.ep | 199 ++++++++--------- .../templates/partials/_iba_pwd.html.ep | 89 +++++--- .../templates/partials/_iba_upd.html.ep | 207 ++++++++++-------- .../templates/partials/_pse_upd.html.ep | 11 +- .../templates/partials/_usr_pwd.html.ep | 34 +-- smeserver-manager-AdminLTE.spec | 5 +- 9 files changed, 308 insertions(+), 261 deletions(-) diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/ibays.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/ibays.html.ep index a981ff2..d1c2fca 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/ibays.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/ibays.html.ep @@ -6,17 +6,17 @@ % if (config->{debug} == 1) {
- %= dumper $c->current_route - %= dumper $iba_datas + %= dumper $c->current_route + %= dumper $iba_datas
% } % if ( stash 'error' ) {
-
+
<%= $c->render_to_string(inline => stash 'error') %>
- %} + % }

<%= $title%>

diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_list.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_list.html.ep index cd72aaa..eec8c77 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_list.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_list.html.ep @@ -3,18 +3,18 @@ % my $btn = l('GROUP_ADD');
- <%= hidden_field 'trt' => 'ADD' %>
+ <%= hidden_field 'trt' => 'ADD' %>

<%=l 'grp_CURRENT_LIST' %>



% my $numGroups = @$groups; - % if ($numGroups == 0){ + % if ($numGroups == 0){ <%= l 'ACCOUNT_GROUP_NONE' %> % } else { diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_upd.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_upd.html.ep index d7f39e4..1c11bf2 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_upd.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_grp_upd.html.ep @@ -1,18 +1,20 @@ -
+
% my $btn = l('SAVE');
-

+
-

<%= l 'MODIFY_USER_GROUP' %>

+
+

<%= l 'MODIFY_USER_GROUP' %>

+
-

+
- +
diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_list.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_list.html.ep index 98ea6ae..3318d7d 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_list.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_list.html.ep @@ -3,111 +3,112 @@ % my $btn = l('iba_ADD_IBAY'); - %= form_for '/ibays' => (method => 'POST') => begin + +
+
+ +
+ <%= hidden_field 'trt' => 'ADD'; %> + -


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

- %= hidden_field 'trt' => 'ADD'; +
+ <%= l 'iba_FIRSTPAGE_DESC' %> +
- % end +
-

- %=l 'iba_FIRSTPAGE_DESC' -

-

- - % my $numIbays = @$ibays; - % if ($numIbays == 0){ - %=l 'iba_NO_IBAYS' - % } else { -
- - - - - - - - - % foreach my $ibay (@$ibays) - % { - % my $modifiable = $ibay->prop('Modifiable') || 'yes'; - % my $passwordable = $ibay->prop('Passwordable') || 'yes'; - % my $removable = $ibay->prop('Removable') || 'yes'; - % my $needPassword = grep { $_ eq $ibay->prop('PublicAccess') } - % qw(local-pw global-pw global-pw-remote); +
+

Current List of i-bays - translation string required

+
- - %= t td => (class => "") => $ibay->key - %= t td => (class => "") => $ibay->prop('Name') - - - % } - -
- %=l 'NAME' - - %=l 'DESCRIPTION' - - %=l 'ACTION' -
- %my ($actionModify, $actionResetPw, $actionRemove) = ' '; - %if ($modifiable eq 'yes') { - %my $modify_text = l('MODIFY'); # Localized text - %my $csrf_token = "TOKEN"; # CSRF token for security - %my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure - %$actionModify = qq{ - % - % - % - %}; - %} - - %if ($passwordable eq 'yes') { - %my $password_text = l('PASSWORD_RESET'); # Localized text - %my $csrf_token = "TOKEN"; # CSRF token for security - %my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure - %if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) { - %$actionResetPw = qq{ - % - % - % - %}; - %} else { - %$actionResetPw = qq{ - % - % - % - %}; - %} - - %} +
- %if ($removable eq 'yes') { - %my $remove_text = l('REMOVE'); # Localized text - %my $csrf_token = "TOKEN"; # CSRF token for security - %my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure - %$actionRemove = qq{ - % - % - % - %}; - %} - <%= $c->render_to_string(inline => $actionModify) %> - <%= $c->render_to_string(inline => $actionResetPw)%> - <%= $c->render_to_string(inline => $actionRemove) %> -
- <%} %> + % my $numIbays = @$ibays; + % if ($numIbays == 0){ + <%= l 'iba_NO_IBAYS' %> + % } else { + + + + + + + + + + + % foreach my $ibay (@$ibays) + % { + % my $modifiable = $ibay->prop('Modifiable') || 'yes'; + % my $passwordable = $ibay->prop('Passwordable') || 'yes'; + % my $removable = $ibay->prop('Removable') || 'yes'; + % my $needPassword = grep { $_ eq $ibay->prop('PublicAccess') } + % qw(local-pw global-pw global-pw-remote); + + + + + + + + % } + +
<%= l 'NAME' %><%= l 'DESCRIPTION' %><%= l 'ACTION' %>
<%= $ibay->key %> + <%= $ibay->prop('Name') %> + + % my ($actionModify, $actionResetPw, $actionRemove) = ' '; + % if ($modifiable eq 'yes') { + %my $modify_text = l('MODIFY'); # Localized text + %my $csrf_token = "TOKEN"; # CSRF token for security + %my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure + %$actionModify = qq{ + % + % + % + %}; + % } + + % if ($passwordable eq 'yes') { + %my $password_text = l('PASSWORD_RESET'); # Localized text + %my $csrf_token = "TOKEN"; # CSRF token for security + %my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure + %if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) { + %$actionResetPw = qq{ + % + % + % + % }; + % } else { + %$actionResetPw = qq{ + % + % + % + %}; + % } + + % } + + % if ($removable eq 'yes') { + %my $remove_text = l('REMOVE'); # Localized text + %my $csrf_token = "TOKEN"; # CSRF token for security + %my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure + %$actionRemove = qq{ + % + % + % + %}; + % } + <%= $c->render_to_string(inline => $actionModify) %><%= $c->render_to_string(inline => $actionResetPw)%><%= $c->render_to_string(inline => $actionRemove) %>
+ % }
diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_pwd.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_pwd.html.ep index f5796b7..e13f2ab 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_pwd.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_pwd.html.ep @@ -2,43 +2,62 @@ % my $btn = l('SAVE'); - %= form_for '/ibaysd' => (method => 'POST') => begin -

-

- %=l 'PASSWORD_RESET' -

- -

- %=l 'iba_PASSWORD_DESC' - %= $iba_datas->{ibay} -

- -

- - %=l 'PASSWORD_NEW', class => "" - - - %= password_field 'newPass', class => "" , class=> 'sme-password' - -

+
-

- - %=l 'PASSWORD_VERIFY_NEW', class => "" - - - %= password_field 'newPassVerify', class => "", class=> 'sme-password' - -

+
-

-

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

+
+

<%= l 'PASSWORD_RESET' %>

+
- %= hidden_field 'trt' => $iba_datas->{trt} - %= hidden_field 'ibay' => $iba_datas->{ibay} - - % end +
+
+ <%= l 'iba_PASSWORD_DESC' %> <%= $iba_datas->{ibay} %> +
+ +
+ + +
+ <%= l 'PASSWORD_NEW' %> +
+ +
+ +
+
+ +
+
+ +
+ +
+ <%= l 'PASSWORD_VERIFY_NEW' %> +
+ +
+ +
+
+ +
+
+ +
+ +

+ +
+
+ +
+
+ + <%= hidden_field 'trt' => $iba_datas->{trt} %> + <%= hidden_field 'ibay' => $iba_datas->{ibay} %> + + +
diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_upd.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_upd.html.ep index 472fb6f..c499999 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_upd.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_iba_upd.html.ep @@ -3,106 +3,125 @@ % my $btn = l('ADD'); - %= form_for '/ibaysd' => (method => 'POST') => begin -

-

- %=l 'iba_ADD_TITLE' -

+
+ + +
+

<%=l 'iba_ADD_TITLE' %>

+
+
- %=l 'iba_NAME_FIELD_DESC' -

-

- - %=l 'iba_NAME_LABEL', class => "" - - - % if ( $iba_datas->{trt} eq 'ADD' ) { - % param 'ibay' => $iba_datas->{ibay} unless param 'ibay'; - %= text_field 'ibay', class => "" - % } else { - % $btn = l('SAVE'); - %= $iba_datas->{ibay}, class => "" - % } - -

+ <%=l 'iba_NAME_FIELD_DESC'%> -

- - %=l 'DESCRIPTION', class => "" - - - % param 'ibayDesc' => $iba_datas->{description} unless param 'ibayDesc'; - %= text_field 'ibayDesc', class => "" - -

- -

- - %=l 'GROUP' - - - % param 'group' => $iba_datas->{group} unless param 'group'; - %= select_field 'group' => $c->group_list_m(), class => "" -
-
-

- -

- - %=l 'iba_USER_ACCESS' - - - % param 'userAccess' => $iba_datas->{userAccess} unless param 'userAccess'; - %= select_field 'userAccess' => $c->userAccess_list_m(), class => "" - -
-
-

- -

- - %=l 'iba_PUBLIC_ACCESS' - - - % param 'publicAccess' => $iba_datas->{publicAccess} unless param 'publicAccess'; - %= select_field 'publicAccess' => $c->publicAccess_list_m(), class => "" -
-
-

- -

- - %=l 'iba_ALLOW_DYNAMIC_CONTENT' - - - % param 'CgiBin' => $iba_datas->{CgiBin} unless param 'CgiBin'; - %= select_field 'CgiBin' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "" -
-
-

- -

- - %=l 'iba_HTTPS_Only' - - - % param 'SSL' => $iba_datas->{SSL} unless param 'SSL'; - %= select_field 'SSL' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "" -
-
-

- -



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

- %= hidden_field 'trt' => $iba_datas->{trt} +
+
+ +
+ +
+ % if ( $iba_datas->{trt} eq 'ADD' ) { + % param 'ibay' => $iba_datas->{ibay} unless param 'ibay'; + + % } else { + % $btn = l('SAVE'); + <%= $iba_datas->{ibay} %> + % } +
+
+ +
+ +
+
+ +
+
+ % param 'ibayDesc' => $iba_datas->{description} unless param 'ibayDesc'; + +
+
+ +
+ +
+
+ <%= l 'GROUP' %> +
+ +
+ % param 'group' => $iba_datas->{group} unless param 'group'; + %= select_field 'group' => $c->group_list_m(), class => "form-select" +
+
+ +
+ +
+
+ <%= l 'iba_USER_ACCESS' %> +
+ +
+ % param 'userAccess' => $iba_datas->{userAccess} unless param 'userAccess'; + %= select_field 'userAccess' => $c->userAccess_list_m(), class => "form-select" +
+
+ +
+ +
+
+ %=l 'iba_PUBLIC_ACCESS' +
+ +
+ % param 'publicAccess' => $iba_datas->{publicAccess} unless param 'publicAccess'; + %= select_field 'publicAccess' => $c->publicAccess_list_m(), class => "form-select" +
+
+ +
+ +
+
+ <%=l 'iba_ALLOW_DYNAMIC_CONTENT' %> +
+ +
+ % param 'CgiBin' => $iba_datas->{CgiBin} unless param 'CgiBin'; + %= select_field 'CgiBin' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" +
+
+ +
+ +
+
+ <%=l 'iba_HTTPS_Only' %> +
+ +
+ % param 'SSL' => $iba_datas->{SSL} unless param 'SSL'; + %= select_field 'SSL' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" +
+
+ +

+ +
+
+ +
+
+ + <%= hidden_field 'trt' => $iba_datas->{trt} %> % if ( $iba_datas->{trt} eq 'UPD' ) { - %= hidden_field 'ibay' => $iba_datas->{ibay} + <%= hidden_field 'ibay' => $iba_datas->{ibay} %> % } - - % end + +
diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_pse_upd.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_pse_upd.html.ep index 07b5a77..d8c3559 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_pse_upd.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_pse_upd.html.ep @@ -1,10 +1,15 @@
- % my $btn = l('SAVE'); + % my $btn = l('SAVE');
-

<%=l 'pse_MODIFY_PSEUDONYM' %>

+
+ +
+

<%=l 'pse_MODIFY_PSEUDONYM' %>

+
+
@@ -26,7 +31,6 @@
-
<%=l 'pse_SELECT_ACCOUNT' %>
@@ -35,7 +39,6 @@ % param 'Account' => $pse_datas->{account} unless param 'Account'; <%= select_field 'Account' => $c->existing_accounts_list(); %>
-
diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_pwd.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_pwd.html.ep index 4fa6e09..48c3d35 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_pwd.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/partials/_usr_pwd.html.ep @@ -3,16 +3,17 @@ % my $btn = l('SAVE'); - %#= form_for '/useraccountsd' => (method => 'POST') => begin + +
-

<%= l 'RESET_PASSWORD_TITLE' %>

+

<%= l 'RESET_PASSWORD_TITLE' %>


- %= $c->l('usr_RESET_DESC', $usr_datas->{user}, $usr_datas->{name} ); + <%= $c->l('usr_RESET_DESC', $usr_datas->{user}, $usr_datas->{name} ); %>

@@ -35,21 +36,21 @@ - +
- +
- <%= l 'usr_RESET_DESC2' %> + <%= l 'usr_RESET_DESC2' %>

- +
- <%= l 'PASSWORD_NEW' %> + <%= l 'PASSWORD_NEW' %>
- +
- +
@@ -57,18 +58,18 @@

- +
- <%= l 'PASSWORD_VERIFY_NEW' %> + <%= l 'PASSWORD_VERIFY_NEW' %>

- +
-
+

@@ -81,8 +82,7 @@ %= hidden_field 'trt' => $usr_datas->{trt} %= hidden_field 'user' => $usr_datas->{user} %= hidden_field 'name' => $usr_datas->{name} - -
- %# end + +
diff --git a/smeserver-manager-AdminLTE.spec b/smeserver-manager-AdminLTE.spec index e5dec13..93fbba0 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 19 +%define release 20 Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2 Name: %{name} Version: %{version} @@ -26,6 +26,9 @@ AdminLTE is an html framework for admin consoles wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip %changelog +* Sun May 18 2025 John Crisp 11.0.0-20.sme +- Ibays done. Updating some consistency elsewhere. + * Fri May 16 2025 John Crisp 11.0.0-19.sme - Fix more stuff with usr templates