From 1b1b99955bcf25757f937146f856c34d24e9ca67 Mon Sep 17 00:00:00 2001
From: Brian Read
Date: Sun, 15 Dec 2024 10:15:38 +0000
Subject: [PATCH] Fix yp html warnings from w3c - mainly empty paragraphs, but
also domain lists recast buttons
---
.../default/templates/bugreport.html.ep | 13 +++---
.../default/templates/bugreport2.html.ep | 3 +-
.../themes/default/templates/datetime.html.ep | 3 +-
.../default/templates/directory.html.ep | 10 ++---
.../templates/partials/_dom_list.html.ep | 43 +++++++++++++------
.../themes/default/templates/printers.html.ep | 7 ++-
.../default/templates/remoteaccess.html.ep | 21 +++------
7 files changed, 51 insertions(+), 49 deletions(-)
diff --git a/root/usr/share/smanager/themes/default/templates/bugreport.html.ep b/root/usr/share/smanager/themes/default/templates/bugreport.html.ep
index 8b745c6..5aceec2 100644
--- a/root/usr/share/smanager/themes/default/templates/bugreport.html.ep
+++ b/root/usr/share/smanager/themes/default/templates/bugreport.html.ep
@@ -13,11 +13,10 @@
<%= $title %>
-
-
+
%=l ('bugr_DO_NOT_PANIC')
-
+
%=l ('bugr_SME_EXPERIENCE')
@@ -49,7 +48,7 @@
%=l ('bugr_YUM_REPOS')
%=l ('bugr_PRIVACY')
-
+
<% my $btn = l('bugr_CREATE_REPORT'); %>
@@ -57,7 +56,7 @@
%= submit_button "$btn", class => 'action'
% end
-
+
%=l ('bugr_DONATING')
%=l ('bugr_AWARE_SME')
@@ -66,6 +65,7 @@
%=l ('bugr_CONSIDER_DONATING')
+
%= link_to 'https://wiki.koozali.org/Donate' => begin
%= image '/images/btn_donateCC_LG.gif'
@@ -76,8 +76,7 @@
%=l ('bugr_THANK_YOU')
-
-%end
+%end
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/bugreport2.html.ep b/root/usr/share/smanager/themes/default/templates/bugreport2.html.ep
index 71eedb7..de882f7 100644
--- a/root/usr/share/smanager/themes/default/templates/bugreport2.html.ep
+++ b/root/usr/share/smanager/themes/default/templates/bugreport2.html.ep
@@ -15,7 +15,6 @@
<%= $modul %>
-
<% my $btn = l('bugr_Download this report'); %>
%= form_for 'bugreportD' => (method => 'POST') => begin
@@ -25,4 +24,4 @@
-%end
+%end
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/datetime.html.ep b/root/usr/share/smanager/themes/default/templates/datetime.html.ep
index ebe1553..4e0f459 100644
--- a/root/usr/share/smanager/themes/default/templates/datetime.html.ep
+++ b/root/usr/share/smanager/themes/default/templates/datetime.html.ep
@@ -45,6 +45,7 @@
%= $dat_datas->{now_string}
+
%=l 'dat_NTP_SERVER'
@@ -121,4 +122,4 @@
% end
-%end
+%end
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/directory.html.ep b/root/usr/share/smanager/themes/default/templates/directory.html.ep
index d2e03fe..3aa9db3 100644
--- a/root/usr/share/smanager/themes/default/templates/directory.html.ep
+++ b/root/usr/share/smanager/themes/default/templates/directory.html.ep
@@ -44,25 +44,25 @@
%= text_field 'department' => $dir_datas->{department}, class => 'input'
-
+
%=l 'dir_COMPANY', class => 'label'
%= text_field 'company', $dir_datas->{company}, class => 'input'
-
+
%=l 'dir_STREET', class => 'label'
%= text_field 'street' => $dir_datas->{street}, class => 'input'
-
+
%=l 'dir_CITY', class => 'label'
%= text_field 'city', $dir_datas->{city}, class => 'input'
-
+
%=l 'dir_PHONENUMBER', class => 'label'
@@ -85,4 +85,4 @@
% end
-%end
+%end
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/partials/_dom_list.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_dom_list.html.ep
index 40f39b4..cd66808 100644
--- a/root/usr/share/smanager/themes/default/templates/partials/_dom_list.html.ep
+++ b/root/usr/share/smanager/themes/default/templates/partials/_dom_list.html.ep
@@ -46,19 +46,34 @@
%= t td => (class => 'sme-border') => $domain->{'Content'}
%= t td => (class => 'sme-border') => l('dom_' . $domain->{'Nameservers'})
- % my $actionModify = "" . "" . "";
-
- % my $removable = ($domain->{Removable} || 'yes');
- % my $actionRemove = ' ';
-
- % if ($removable eq 'yes') {
- % $actionRemove = "" . "" . "";
- % }
-
-
- <%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
- |
-
+ %# my $actionModify = "" . "" . "";
+ %my $modify_text = l('MODIFY'); # Localized text
+ %my $csrf_token = "TOKEN"; # CSRF token for security
+ %my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
+ %my $actionModify = qq{
+ %
+ %};
+ %my $removable = ($domain->{Removable} || 'yes');
+ %my $actionRemove = ' ';
+ %if ($removable eq 'yes') {
+ %my $remove_text = l('REMOVE'); # Localized text
+ %my $csrf_token = "TOKEN"; # CSRF token for security
+ %my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
+ %$actionRemove = qq{
+ %
+ %};
+ %# $actionRemove = "" . "" . "";
+ %};
+
+ <%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
+ |
+
% }
@@ -102,4 +117,4 @@
-
+
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/printers.html.ep b/root/usr/share/smanager/themes/default/templates/printers.html.ep
index dd9b278..d55e732 100644
--- a/root/usr/share/smanager/themes/default/templates/printers.html.ep
+++ b/root/usr/share/smanager/themes/default/templates/printers.html.ep
@@ -12,8 +12,8 @@
% if ( stash 'error' ) {
- %= $c->render_to_string(inline => stash 'error')
-
+ %= $c->render_to_string(inline => stash 'error')
+
%}
<%= $title%>
@@ -29,5 +29,4 @@
%}
-%end
-
+%end
\ No newline at end of file
diff --git a/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep b/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep
index a7b2185..55161ba 100644
--- a/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep
+++ b/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep
@@ -52,12 +52,11 @@
-
%}
-
+
%= $c->l('rma_VALIDFROM_TITLE', $c->l('rma_REMOTE_MANAGEMENT'));
%=l 'rma_VALIDFROM_DESC'
@@ -86,7 +85,7 @@
%= t td => (class => 'sme-border') => $net
%= t td => (class => 'sme-border') => $mask
%= t td => (class => 'sme-border') => $numhosts
- '> |
+ '> |
% }
@@ -102,9 +101,6 @@
%= l('rma_NO_ENTRIES_YET');
%}
-
-
-
%=l 'rma_DESC_VALID_FROM_ENTRIES'
@@ -118,11 +114,10 @@
%= text_field 'ValidFromMask', class => 'input'
-
-
+
%=l 'rma_TITLE_SSH'
%=l 'rma_DESC_SSH'
@@ -158,11 +153,10 @@
%= text_field 'SshTCPPort', class => 'input'
-
-
+
%=l 'rma_TITLE_FTP_ACCESS'
%= $c->render_to_string(inline => $c->l('rma_DESC_FTP_ACCESS'));
@@ -186,11 +180,9 @@
%= select_field 'FtpPasswordAccess' => $c->passwordLogin_list(), class => 'input'
-
% my $mode = $c->get_telnet_mode();
% if ( $mode ne 'off') {
-
@@ -210,16 +202,13 @@
-
%}
-
%= submit_button "$btn", class => 'action'
-
% end
-% end
+% end
\ No newline at end of file