Add in original html - play with sanitising paragraphs

This commit is contained in:
2024-09-14 18:08:48 +01:00
parent 3813f55f68
commit 3b6e1930a0
30 changed files with 562 additions and 167 deletions

View File

@@ -0,0 +1,63 @@
#
# Routines to be edited by the developer to provide validation for parameters
# and provison of the control data for table(s)
#
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 17:41
#
use esmith::util;
use esmith::HostsDB;
use esmith::AccountsDB;
use esmith::NetworksDB;
use esmith::HostsDB;
use esmith::DomainsDB;
#The most common ones
our $cdb = esmith::ConfigDB->open() || die("Couldn't open config db");
our $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
our $ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
our $hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db");
our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
# Validation routines - parameters for each panel
sub validate_PARAMS {
my $c = shift;
my $prefix_data = shift; #Data hash as parameter
my $ret = 'ok';
return $ret;
}
# Get control data for tables(s)
# Return hash with values from row in which link clicked on table
sub get_selected_PARAMS {
my $c = shift;
my $selected = shift; #Parameter is name of selected row.
my $is_new_record = shift; #Indicates new record required (defaults)
my %ret = {};
return $ret;
}
#after sucessful modify or create or whatever and submit then perfom (if the params validate)
sub perform_PARAMS {
my $c = shift;
my $prefix_data = shift; #Data hash as parameter
my $ret = 'ok';
return $ret;
}
sub create_link{
# WIP
my ($c,$route, $panel, $index) = shift;
my $link = "$route?trt=$panel&Selected=$index";
return $link;
}
1;

View File

@@ -1,6 +1,6 @@
package SrvMngr::Controller::CreateStarterWebsite;
#
# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-13 19:20
# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 17:41
#
#----------------------------------------------------------------------
# heading : Miscellaneous

View File

@@ -1,6 +1,6 @@
% layout 'default', title => "Sme server 2 - Create Starter Website", share_dir => './';
%#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-13 19:20
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 17:41
%#
% content_for 'module' => begin
<div id="module" class="module CreateStarterWebsite-panel">

View File

@@ -1,8 +1,16 @@
'csw_APPLY' => 'Apply',
'csw_Do_you_wish_to_proceed?' => 'Do you wish to proceed?',
'csw_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'csw_Manage_CreateStarterWebsite_settings:' => 'Manage CreateStarterWebsite settings:',
'csw_Do_not_use_this_optionif' => 'Do not use this optionif you have already customized your web site, Since it will overwrite the \'index. Htm\' file in your web site directory. ',
'csw_Second_header,_typically_used_for' => 'Second header, Typically used for short phrases such as \'For more information\' or \'To order our products\':',
'csw_Hello_PARAMS' => 'Hello PARAMS',
'csw_' => '',
'csw_To_create_a_simple_web' => 'To create a simple web page for your company, Fill in the fields below and click onCreate. ',
'csw_The_text_that_you_enter' => 'The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need to force a line break without starting a new paragraph (for example after each line of a mailing address), Then type the four-character sequence',
'csw_You_can_leave_any_field' => 'You can leave any field blank if you do not need it. ',
'csw_Text_following_first_header,_typically' => 'Text following first header, Typically used for a paragraph of marketing information. ',
'csw_Do_you_wish_to_proceed?' => 'Do you wish to proceed?',
'csw_Manage_CreateStarterWebsite_settings:' => 'Manage CreateStarterWebsite settings:',
'csw_When_you_create_this_web' => 'When you create this web page, The file \'index. Htm\' will be overwritten in your web site directory. ',
'csw_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'csw_Create_Starter_Website' => 'Create Starter Website',
'csw_First_header,_typically_used_for' => 'First header, Typically used for short phrases such as \'Leader in the field of textile manufacturing\'',
'csw_' => '',
'csw_APPLY' => 'Apply',
'csw_Text_following_second_header,_typically' => 'Text following second header, Typically used for contact or ordering information:',

View File

@@ -0,0 +1,96 @@
%#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 17:41
%#
<div id="CreateStarterWebsite-PARAMS" class="partial CreateStarterWebsite-PARAMS">
<script>
window.onload = function() {
SelectInput();
};
</script>
<h2>
%= l('csw_Hello_PARAMS');
</h2>
% my $btn = l('csw_APPLY');
%= form_for "CreateStarterWebsited" => (method => 'POST') => begin
% param 'trt' => $csw_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $csw_data->{trt}
%# Inputs etc in here.
<h2><%=l('csw_Manage_CreateStarterWebsite_settings:')%></h2>
<p>
%=l('csw_To_create_a_simple_web')
</p>
<p>
%=l('csw_You_can_leave_any_field')
</p>
<p>
%=l('csw_The_text_that_you_enter')
</p>
<p>
%=l('csw_Do_not_use_this_optionif')
</p>
<p><span class=label>
%=l('csw_')
</span><span class=data>
%=
</span></p>
<p>
%=l('csw_First_header,_typically_used_for')
</p>
<p><span class=label>
%=l('csw_')
</span><span class=data>
%=
</span></p>
<p>
%=l('csw_Text_following_first_header,_typically')
</p>
<span class=label>
%=l('csw_')
</span><span class=data>
% param 'text1' => $csw_data->{text1} unless param 'text1';
%= text_area 'text1', cols=>40, rows=>10
</span><br>
<p>
%=l('csw_Second_header,_typically_used_for')
</p>
<p><span class=label>
%=l('csw_')
</span><span class=data>
%=
</span></p>
<p>
%=l('csw_Text_following_second_header,_typically')
</p>
<span class=label>
%=l('csw_')
</span><span class=data>
% param 'text2' => $csw_data->{text2} unless param 'text2';
%= text_area 'text2', cols=>40, rows=>10
</span><br>
<p>
%=l('csw_When_you_create_this_web')
</p>
<p>
%=l('csw_Do_you_wish_to_proceed?')
</p>
%# Probably finally by a submit.
%end
</div>

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Приложи",
'du_Usage' => "Употреба",
'du_Path' => "Път",
'du_Wed_Sep_11_19:01:00_BST' => "Сряда, 11 септември 19:01:00 BST 2024",
'du_PARAMS_panel_action_was_successful' => "Панелът PARAMS беше успешен",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Управление на настройките за използване на диска:",
'du_Disk_Usage' => "Дисково използване",
'du_Hello_PARAMS' => "~~~Здравейте PARAMS~~~",
'du_I-bays' => "I-бейове",
'du_Users' => "~~~Потребители~~~",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Anwenden",
'du_Usage' => "~~~Verwendung~~~",
'du_Path' => "Pfad",
'du_Wed_Sep_11_19:01:00_BST' => "~~~Mi Sep 11 19:01:00 BST 2024~~~",
'du_PARAMS_panel_action_was_successful' => "Die PARAMS-Panel-Aktion war erfolgreich",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Festplattennutzungs-Einstellungen verwalten:",
'du_Disk_Usage' => "~~~Festplattennutzung~~~",
'du_Hello_PARAMS' => "~~~Hallo PARAMS~~~",
'du_I-bays' => "I-Bays",
'du_Users' => "Benutzer",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Anvend",
'du_Usage' => "Brug",
'du_Path' => "Sti",
'du_Wed_Sep_11_19:01:00_BST' => "Ons d. 11. sep 2024 19:01:00 BST",
'du_PARAMS_panel_action_was_successful' => "~~~PARAMS-panelets handling var vellykket~~~",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Administrer indstillinger for diskforbrug:",
'du_Disk_Usage' => "Diskforbrug",
'du_Hello_PARAMS' => "Hej PARAMS",
'du_I-bays' => "I-bays",
'du_Users' => "Brugere",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Εφαρμογή",
'du_Usage' => "Χρήση",
'du_Path' => "Διαδρομή",
'du_Wed_Sep_11_19:01:00_BST' => "~~~Τετ 11 Σεπ 19:01:00 EET 2024~~~",
'du_PARAMS_panel_action_was_successful' => "Η ενέργεια του πίνακα PARAMS ήταν επιτυχής",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Διαχείριση ρυθμίσεων Χρήσης Δίσκου:",
'du_Disk_Usage' => "Χρήση Δίσκου",
'du_Hello_PARAMS' => "Γειά σου PARAMS",
'du_I-bays' => "Κόλποι I",
'du_Users' => "Χρήστες",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Aplicar",
'du_Usage' => "Uso",
'du_Path' => "Ruta",
'du_Wed_Sep_11_19:01:00_BST' => "Mié Sep 11 19:01:00 BST 2024",
'du_PARAMS_panel_action_was_successful' => "La acción del panel PARAMS fue exitosa",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Administrar configuraciones de uso de disco:",
'du_Disk_Usage' => "Uso de Disco",
'du_Hello_PARAMS' => "Hola PARAMS",
'du_I-bays' => "I-bays",
'du_Users' => "Usuarios",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Rakenda",
'du_Usage' => "Kasutus",
'du_Path' => "Tee",
'du_Wed_Sep_11_19:01:00_BST' => "Kolm, 11. september 2024, 19:01:00 BST",
'du_PARAMS_panel_action_was_successful' => "PARAMS paneeli toiming oli edukas",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Halda kettakasutuse seadeid:",
'du_Disk_Usage' => "Kettakasutus",
'du_Hello_PARAMS' => "Tere PARAMS",
'du_I-bays' => "I-lahed",
'du_Users' => "Kasutajad",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Appliquer",
'du_Usage' => "Utilisation",
'du_Path' => "Chemin",
'du_Wed_Sep_11_19:01:00_BST' => "Mer 11 Sep 19:01:00 BST 2024",
'du_PARAMS_panel_action_was_successful' => "L\'action du panneau PARAMS a été réussie",
'du_&amp;nbsp' => "&nbsp",
'du_Manage_DiskUsage_settings:' => "Gérer les paramètres d\'utilisation du disque :",
'du_Disk_Usage' => "Utilisation du disque",
'du_Hello_PARAMS' => "~~~Bonjour PARAMÈTRES~~~",
'du_I-bays' => "Baies I",
'du_Users' => "Utilisateurs",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Alkalmazás",
'du_Usage' => "Használat",
'du_Path' => "Útvonal",
'du_Wed_Sep_11_19:01:00_BST' => "2024. szeptember 11., szerda, 19:01:00 BST",
'du_PARAMS_panel_action_was_successful' => "~~~PARAMS panel művelet sikeres volt~~~",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Lemezhasználati beállítások kezelése:",
'du_Disk_Usage' => "Lemezhasználat",
'du_Hello_PARAMS' => "~~~Helló PARAMS~~~",
'du_I-bays' => "I-bayok",
'du_Users' => "Felhasználók",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Terapkan",
'du_Usage' => "Penggunaan",
'du_Path' => "Jalur",
'du_Wed_Sep_11_19:01:00_BST' => "~~~Rab 11 Sep 19:01:00 WIB 2024~~~",
'du_PARAMS_panel_action_was_successful' => "Panel PARAMS berhasil dijalankan",
'du_&amp;nbsp' => "~~~&nbsp~~~",
'du_Manage_DiskUsage_settings:' => "Kelola pengaturan Penggunaan Disk:",
'du_Disk_Usage' => "Penggunaan Disk",
'du_Hello_PARAMS' => "~~~Halo PARAMS~~~",
'du_I-bays' => "I-bays",
'du_Users' => "Pengguna",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "החל",
'du_Usage' => "שימוש",
'du_Path' => "נתיב",
'du_Wed_Sep_11_19:01:00_BST' => "~~~ד׳ ספטמבר 11 19:01:00 שעון קיץ בריטי 2024~~~",
'du_PARAMS_panel_action_was_successful' => "פעולת לוח PARAMS הצליחה",
'du_&amp;nbsp' => "&nbsp",
'du_Manage_DiskUsage_settings:' => "נהל הגדרות שימוש בדיסק:",
'du_Disk_Usage' => "שימוש בדיסק",
'du_Hello_PARAMS' => "שלום PARAMS",
'du_I-bays' => "מפרצים",
'du_Users' => "משתמשים",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "Applica",
'du_Usage' => "Utilizzo",
'du_Path' => "Percorso",
'du_Wed_Sep_11_19:01:00_BST' => "Mer 11 Set 19:01:00 BST 2024",
'du_PARAMS_panel_action_was_successful' => "L\'azione del pannello PARAMS è stata completata con successo",
'du_&amp;nbsp' => "&nbsp",
'du_Manage_DiskUsage_settings:' => "Gestisci impostazioni di utilizzo del disco:",
'du_Disk_Usage' => "Utilizzo del Disco",
'du_Hello_PARAMS' => "Ciao PARAMS",
'du_I-bays' => "I-bay",
'du_Users' => "Utenti",

View File

@@ -1,11 +0,0 @@
'du_APPLY' => "適用",
'du_Usage' => "使用",
'du_Path' => "パス",
'du_Wed_Sep_11_19:01:00_BST' => "2024年9月11日(水) 19:01:00 BST",
'du_PARAMS_panel_action_was_successful' => "~~~PARAMSパネルの操作が成功しました~~~",
'du_&amp;nbsp' => "&nbsp",
'du_Manage_DiskUsage_settings:' => "ディスク使用量設定の管理:",
'du_Disk_Usage' => "ディスク使用量",
'du_Hello_PARAMS' => "こんにちは PARAMS",
'du_I-bays' => "I-bays",
'du_Users' => "ユーザー",

View File

@@ -2,7 +2,7 @@
# Routines to be edited by the developer to provide validation for parameters
# and provison of the control data for table(s)
#
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-13 19:18
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 11:53
#
use esmith::util;

View File

@@ -0,0 +1,79 @@
#
# Routines to be edited by the developer to provide validation for parameters
# and provison of the control data for table(s)
#
# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 12:09
#
use esmith::util;
use esmith::HostsDB;
use esmith::AccountsDB;
use esmith::NetworksDB;
use esmith::HostsDB;
use esmith::DomainsDB;
#The most common ones
our $cdb = esmith::ConfigDB->open() || die("Couldn't open config db");
our $adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
our $ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
our $hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db");
our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
# Validation routines - parameters for each panel
sub validate_PARAMS {
my $c = shift;
my $prefix_data = shift; #Data hash as parameter
my $ret = 'ok';
return $ret;
}
# Get control data for tables(s)
sub get_Table1 {
# Return an array of hashes of the contents for each row and column for Table1
# default is a single row of strings "col1header-1, col2header-1, col3Header-1 etc"
my $c = shift;
my @ret = {};
return \@ret
}
sub get_Table2 {
# Return an array of hashes of the contents for each row and column for Table2
# default is a single row of strings "col1header-1, col2header-1, col3Header-1 etc"
my $c = shift;
my @ret = {};
return \@ret
}
# Return hash with values from row in which link clicked on table
sub get_selected_PARAMS {
my $c = shift;
my $selected = shift; #Parameter is name of selected row.
my $is_new_record = shift; #Indicates new record required (defaults)
my %ret = {};
return $ret;
}
#after sucessful modify or create or whatever and submit then perfom (if the params validate)
sub perform_PARAMS {
my $c = shift;
my $prefix_data = shift; #Data hash as parameter
my $ret = 'ok';
return $ret;
}
sub create_link{
# WIP
my ($c,$route, $panel, $index) = shift;
my $link = "$route?trt=$panel&Selected=$index";
return $link;
}
1;

View File

@@ -1,6 +1,6 @@
package SrvMngr::Controller::Diskusage;
#
# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-13 19:18
# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 12:09
#
#----------------------------------------------------------------------
# heading : Miscellaneous

View File

@@ -1,6 +1,6 @@
% layout 'default', title => "Sme server 2 - Disk Usage", share_dir => './';
%#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-13 19:18
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 12:09
%#
% content_for 'module' => begin
<div id="module" class="module Diskusage-panel">

View File

@@ -1,11 +1,11 @@
'du_APPLY' => 'Apply',
'du_&amp;nbsp' => '&amp;nbsp',
'du_I-bays' => 'I-bays',
'du_Usage' => 'Usage',
'du_Disk_Usage' => 'Disk Usage',
'du_Path' => 'Path',
'du_Wed_Sep_11_19:01:00_BST' => 'Wed Sep 11 19:01:00 BST 2024',
'du_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'du_&amp;nbsp' => '&amp;nbsp',
'du_Manage_DiskUsage_settings:' => 'Manage DiskUsage settings:',
'du_Disk_Usage' => 'Disk Usage',
'du_Hello_PARAMS' => 'Hello PARAMS',
'du_I-bays' => 'I-bays',
'du_Users' => 'Users',
'du_APPLY' => 'Apply',
'du_Hello_PARAMS' => 'Hello PARAMS',
'du_Manage_DiskUsage_settings:' => 'Manage DiskUsage settings:',
'du_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',

View File

@@ -1,5 +1,5 @@
%#
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-13 19:18
%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.12.3 at 2024-09-14 12:09
%#
<div id="Diskusage-PARAMS" class="partial Diskusage-PARAMS">
<script>
@@ -75,9 +75,9 @@ tmpfs 2.0G 648K 2.0G 1% /run
% my $control_data = $self->stash('Table2');
% foreach my $row (@$control_data) {
<tr class='table-row'>
<td class='sme-border table-col table-col-Table2-Users'><%=$c->render_to_string(inline=>$row->{Table2-Users})%></td>
<td class='sme-border table-col table-col-Table2-Usage'><%=$c->render_to_string(inline=>$row->{Table2-Usage})%></td>
<td class='sme-border table-col table-col-Table2-Path'><%=$c->render_to_string(inline=>$row->{Table2-Path})%></td>
<td class='sme-border table-col table-col-Table2-Users'><%=$c->render_to_string(inline=>$row->{'Table2-Users'})%></td>
<td class='sme-border table-col table-col-Table2-Usage'><%=$c->render_to_string(inline=>$row->{'Table2-Usage'})%></td>
<td class='sme-border table-col table-col-Table2-Path'><%=$c->render_to_string(inline=>$row->{'Table2-Path'})%></td>
</tr>
%}
</tbody>