+#
+ % if (config->{debug} == 1) {
+
+ %= dumper $sf_data
+
+ % }
+ % my $btn = l('sf_APPLY');
+
+ % $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
+
+ %= form_for "sharesu" => (method => 'POST') => begin
+ % param 'trt' => $sf_data->{trt} unless param 'trt';
+ %= hidden_field 'trt' => $sf_data->{trt}
+ %# Inputs etc in here.
+
+
<%=l('sf_Create,_modify,_or_remove_shared')%>
+
+
<%=l('sf_Access_right_management')%>
+
+
+ %=l('sf_You_can_use_this_matrix')
+
+
+
+
+
+ <%=l('sf_Groups')%>
+ <%=l('sf_Description')%>
+ <%=l('sf_Read_/_Write')%>
+ <%=l('sf_Read_Only')%>
+
+
+
+ % my $control_data = $c->stash('Table2');
+ % foreach my $row (@$control_data) {
+
+ <%=$c->render_to_string(inline=>$row->{'Table2-Groups'})%>
+ <%=$c->render_to_string(inline=>$row->{'Table2-Description'})%>
+ <%=$c->render_to_string(inline=>$row->{'Table2-Read / Write'})%>
+ <%=$c->render_to_string(inline=>$row->{'Table2-Read Only'})%>
+
+ %}
+
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec110'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec111'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec112'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec113'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec114'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec115'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec116'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec117'
+
+
+
+
+ %=l('sf_writegroup')
+
+ % param 'writegroup' => $sf_data->{writegroup} unless param 'writegroup';
+ %=checkbox_field 'writegroup', class => 'chec118'
+
+
+
+
+ %=l('sf_readgroup')
+
+ % param 'readgroup' => $sf_data->{readgroup} unless param 'readgroup';
+ %=checkbox_field 'readgroup', class => 'chec119'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec120'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec121'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec122'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec123'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec124'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec125'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec126'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec127'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec128'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec129'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec130'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec131'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec132'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec133'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec134'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec135'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec136'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec137'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec138'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec139'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec140'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec141'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec142'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec143'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec144'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec145'
+
+
+
+
+ %=l('sf_writeuser')
+
+ % param 'writeuser' => $sf_data->{writeuser} unless param 'writeuser';
+ %=checkbox_field 'writeuser', class => 'chec146'
+
+
+
+
+ %=l('sf_readuser')
+
+ % param 'readuser' => $sf_data->{readuser} unless param 'readuser';
+ %=checkbox_field 'readuser', class => 'chec147'
+
+
+
+
+ %= submit_button l('sf_Save'), class => 'action subm148'
+
+
+ %# Probably finally by a submit.
+ %end
+
\ No newline at end of file
diff --git a/Targets/Shares/_sf_REMOVE.html.ep b/Targets/Shares/_sf_REMOVE.html.ep
new file mode 100644
index 0000000..29ea094
--- /dev/null
+++ b/Targets/Shares/_sf_REMOVE.html.ep
@@ -0,0 +1,50 @@
+%#
+%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-21 08:46:42
+%#
+
-#
+%#
% if (config->{debug} == 1) {
%= dumper $$${prefix}_data
diff --git a/html/shared-folders_list.html b/html/shared-folders_list.html
new file mode 100644
index 0000000..2a9d1ad
--- /dev/null
+++ b/html/shared-folders_list.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+SME Server mailserver.bjsystems.co.uk
+
+
+
+
+
+
+
+
+
+Create, modify, or remove shared folders
+
+
+
+
+ SME Server 10.1 Copyright 1999-2006 Mitel Corporation All rights reserved.
+
+ Copyright (c) 2013 - 2021 Koozali Foundation Inc.
+
+
+
+
\ No newline at end of file
diff --git a/html/shared-folders_modify.html b/html/shared-folders_modify.html
new file mode 100644
index 0000000..f896482
--- /dev/null
+++ b/html/shared-folders_modify.html
@@ -0,0 +1,129 @@
+
+
+
+
+
+
SME Server mailserver.bjsystems.co.uk
+
+
+
+
+
+
+
+
+
+
Create, modify, or remove shared folders
+
Create or modify a shared folder
+
+
+
+
+ SME Server 10.1 Copyright 1999-2006 Mitel Corporation All rights reserved.
+
+ Copyright (c) 2013 - 2021 Koozali Foundation Inc.
+
+
+
+
\ No newline at end of file
diff --git a/html/shared-folders_perms.html b/html/shared-folders_perms.html
new file mode 100644
index 0000000..0b1acaa
--- /dev/null
+++ b/html/shared-folders_perms.html
@@ -0,0 +1,136 @@
+
+
+
+
+
+
SME Server mailserver.bjsystems.co.uk
+
+
+
+
+
+
+
+
+
+
Create, modify, or remove shared folders
+
Access right management
+
+
+
+
+ SME Server 10.1 Copyright 1999-2006 Mitel Corporation All rights reserved.
+
+ Copyright (c) 2013 - 2021 Koozali Foundation Inc.
+
+
+
+
\ No newline at end of file
diff --git a/html/shared-folders_remove.html b/html/shared-folders_remove.html
new file mode 100644
index 0000000..9b33614
--- /dev/null
+++ b/html/shared-folders_remove.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+
SME Server mailserver.bjsystems.co.uk
+
+
+
+
+
+
+
+
+
+
Create, modify, or remove shared folders
+
Remove shared folder
+
+
+
+
+ SME Server 10.1 Copyright 1999-2006 Mitel Corporation All rights reserved.
+
+ Copyright (c) 2013 - 2021 Koozali Foundation Inc.
+
+
+
+
\ No newline at end of file
diff --git a/json5/Shares.json5 b/json5/Shares.json5
new file mode 100644
index 0000000..73892ce
--- /dev/null
+++ b/json5/Shares.json5
@@ -0,0 +1,504 @@
+{
+ PackageName: 'Shares',
+ prefix: 'sf',
+ MenuHeading: 'Network',
+ MenuDescription: 'Shared Folders',
+ MenuNavigation: '7000 400',
+ firstPanel: 'LIST',
+ signalEvent: 'smeserver-shared-folders-update',
+ html: [
+ {
+ Name: 'list',
+ route: 'LIST',
+ Header: 'Create, modify, or remove shared folders',
+ SubHeader: 'Manage shared-folders settings:',
+ Paragraph1: 'You can remove any shared folder by clicking on the corresponding command next to the shared folder.',
+ Paragraph2: 'Create a new shared folder',
+ Link1: {
+ Type: 'Link',
+ href: 'shared-folderu?trt=MODIFY',
+ title: 'Create a new shared folder'
+ },
+ Table1: {
+ Type: 'Table',
+ TableControl: 'Table1',
+ TopHeadings: [
+ 'Name',
+ 'Description',
+ 'Actionp',
+ 'Actionm',
+ 'Actionr'
+ ],
+ Columns: [
+ 'Table1-Name',
+ 'Table1-Description',
+ 'Table1-Actionp',
+ 'Table1-Actionm',
+ 'Table1-Actionr'
+ ]
+ }
+ },
+ {
+ Name: 'modify',
+ route: 'MODIFY',
+ Header: 'Create, modify, or remove shared folders',
+ SubHeader: 'Create or modify a shared folder',
+ Input100: {
+ Type: 'Text',
+ Value: 'New one',
+ Name: 'description',
+ Label: 'description'
+ },
+ Paragraph14: 'The following settings control the access of this shared folder from the local network, using the SMB/CIFS protocol.',
+ Input101: {
+ Type: 'Select',
+ Value: '',
+ Name: 'smbaccess',
+ Label: 'smbaccess',
+ Options: [
+ {
+ Value: 'browseable',
+ Text: 'Enabled, browseable'
+ },
+ {
+ Value: 'non-browseable',
+ Text: 'Enabled, hidden'
+ },
+ {
+ Value: 'none',
+ Text: 'No access'
+ }
+ ]
+ },
+ Input102: {
+ Type: 'Select',
+ Value: '',
+ Name: 'recyclebin',
+ Label: 'recyclebin',
+ Options: [
+ {
+ Value: 'disabled',
+ Text: 'disabled'
+ },
+ {
+ Value: 'enabled',
+ Text: 'Enabled, keep only the latest version'
+ },
+ {
+ Value: 'keep-versions',
+ Text: 'Enabled, keep a copy of all versions'
+ }
+ ]
+ },
+ Input103: {
+ Type: 'Select',
+ Value: '',
+ Name: 'retention',
+ Label: 'retention',
+ Options: [
+ {
+ Value: '30',
+ Text: 'one month'
+ },
+ {
+ Value: '7',
+ Text: 'one week'
+ },
+ {
+ Value: '365',
+ Text: 'one year'
+ },
+ {
+ Value: '180',
+ Text: 'six months'
+ },
+ {
+ Value: 'unlimited',
+ Text: 'unlimited'
+ }
+ ]
+ },
+ Paragraph2: 'The following settings control the access of this shared folder using the HTTP/HTTPS protocol.',
+ Input104: {
+ Type: 'Select',
+ Value: '',
+ Name: 'httpaccess',
+ Label: 'httpaccess',
+ Options: [
+ {
+ Value: 'global',
+ Text: 'Entire Internet (no password required)'
+ },
+ {
+ Value: 'global-pw',
+ Text: 'Entire Internet (password required)'
+ },
+ {
+ Value: 'global-pw-remote',
+ Text: 'Entire Internet (password required outside local network)'
+ },
+ {
+ Value: 'local',
+ Text: 'Local network (no password required)'
+ },
+ {
+ Value: 'local-pw',
+ Text: 'Local network (password required)'
+ },
+ {
+ Value: 'none',
+ Text: 'No access'
+ }
+ ]
+ },
+ Input105: {
+ Type: 'Select',
+ Value: '',
+ Name: 'webdav',
+ Label: 'webdav',
+ Options: [
+ {
+ Value: 'disabled',
+ Text: 'disabled'
+ },
+ {
+ Value: 'enabled',
+ Text: 'enabled'
+ }
+ ]
+ },
+ Input106: {
+ Type: 'Select',
+ Value: '',
+ Name: 'requireSSL',
+ Label: 'requireSSL',
+ Options: [
+ {
+ Value: 'disabled',
+ Text: 'disabled'
+ },
+ {
+ Value: 'enabled',
+ Text: 'enabled'
+ }
+ ]
+ },
+ Input107: {
+ Type: 'Select',
+ Value: '',
+ Name: 'indexes',
+ Label: 'indexes',
+ Options: [
+ {
+ Value: 'disabled',
+ Text: 'disabled'
+ },
+ {
+ Value: 'enabled',
+ Text: 'enabled'
+ }
+ ]
+ },
+ Input108: {
+ Type: 'Select',
+ Value: '',
+ Name: 'dynamic',
+ Label: 'dynamic',
+ Options: [
+ {
+ Value: 'disabled',
+ Text: 'disabled'
+ },
+ {
+ Value: 'enabled',
+ Text: 'enabled'
+ }
+ ]
+ },
+ Input109: {
+ Type: 'Submit',
+ Value: 'Save',
+ Name: 'Next',
+ Label: 'Next'
+ }
+ },
+ {
+ Name: 'permissions',
+ route: 'PERMISSIONS',
+ Header: 'Create, modify, or remove shared folders',
+ SubHeader: 'Access right management',
+ Paragraph10: 'You can use this matrix to define groups and users access permissions.',
+ Table2: {
+ Type: 'Table',
+ TableControl: 'Table2',
+ TopHeadings: [
+ 'Groups',
+ 'Description',
+ 'Read / Write',
+ 'Read Only'
+ ],
+ Columns: [
+ 'Table2-Groups',
+ 'Table2-Description',
+ 'Table2-Read / Write',
+ 'Table2-Read Only'
+ ]
+ },
+ Input110: {
+ Type: 'Checkbox',
+ Value: 'shared',
+ Name: 'writegroup',
+ Label: 'writegroup'
+ },
+ Input111: {
+ Type: 'Checkbox',
+ Value: 'shared',
+ Name: 'readgroup',
+ Label: 'readgroup'
+ },
+ Input112: {
+ Type: 'Checkbox',
+ Value: 'changeofkey',
+ Name: 'writegroup',
+ Label: 'writegroup'
+ },
+ Input113: {
+ Type: 'Checkbox',
+ Value: 'changeofkey',
+ Name: 'readgroup',
+ Label: 'readgroup'
+ },
+ Input114: {
+ Type: 'Checkbox',
+ Value: 'domainadmins',
+ Name: 'writegroup',
+ Label: 'writegroup'
+ },
+ Input115: {
+ Type: 'Checkbox',
+ Value: 'domainadmins',
+ Name: 'readgroup',
+ Label: 'readgroup'
+ },
+ Input116: {
+ Type: 'Checkbox',
+ Value: 'ecmw2023grp',
+ Name: 'writegroup',
+ Label: 'writegroup'
+ },
+ Input117: {
+ Type: 'Checkbox',
+ Value: 'ecmw2023grp',
+ Name: 'readgroup',
+ Label: 'readgroup'
+ },
+ Input118: {
+ Type: 'Checkbox',
+ Value: 'miwgrp',
+ Name: 'writegroup',
+ Label: 'writegroup'
+ },
+ Input119: {
+ Type: 'Checkbox',
+ Value: 'miwgrp',
+ Name: 'readgroup',
+ Label: 'readgroup'
+ },
+ Input120: {
+ Type: 'Checkbox',
+ Value: 'brianr',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input121: {
+ Type: 'Checkbox',
+ Value: 'brianr',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input122: {
+ Type: 'Checkbox',
+ Value: 'cok1',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input123: {
+ Type: 'Checkbox',
+ Value: 'cok1',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input124: {
+ Type: 'Checkbox',
+ Value: 'cok2',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input125: {
+ Type: 'Checkbox',
+ Value: 'cok2',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input126: {
+ Type: 'Checkbox',
+ Value: 'dmarc',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input127: {
+ Type: 'Checkbox',
+ Value: 'dmarc',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input128: {
+ Type: 'Checkbox',
+ Value: 'ecmw2025',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input129: {
+ Type: 'Checkbox',
+ Value: 'ecmw2025',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input130: {
+ Type: 'Checkbox',
+ Value: 'englishcountrymusicweekend',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input131: {
+ Type: 'Checkbox',
+ Value: 'englishcountrymusicweekend',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input132: {
+ Type: 'Checkbox',
+ Value: 'guest',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input133: {
+ Type: 'Checkbox',
+ Value: 'guest',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input134: {
+ Type: 'Checkbox',
+ Value: 'katy',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input135: {
+ Type: 'Checkbox',
+ Value: 'katy',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input136: {
+ Type: 'Checkbox',
+ Value: 'more',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input137: {
+ Type: 'Checkbox',
+ Value: 'more',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input138: {
+ Type: 'Checkbox',
+ Value: 'nikki',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input139: {
+ Type: 'Checkbox',
+ Value: 'nikki',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input140: {
+ Type: 'Checkbox',
+ Value: 'phil',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input141: {
+ Type: 'Checkbox',
+ Value: 'phil',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input142: {
+ Type: 'Checkbox',
+ Value: 'sheila',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input143: {
+ Type: 'Checkbox',
+ Value: 'sheila',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input144: {
+ Type: 'Checkbox',
+ Value: 'smeserver',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input145: {
+ Type: 'Checkbox',
+ Value: 'smeserver',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input146: {
+ Type: 'Checkbox',
+ Value: 'zara.healy',
+ Name: 'writeuser',
+ Label: 'writeuser'
+ },
+ Input147: {
+ Type: 'Checkbox',
+ Value: 'zara.healy',
+ Name: 'readuser',
+ Label: 'readuser'
+ },
+ Input148: {
+ Type: 'Submit',
+ Value: 'Save',
+ Name: 'Next',
+ Label: 'Next'
+ }
+ },
+ {
+ Name: 'remove',
+ route: 'REMOVE',
+ Header: 'Create, modify, or remove shared folders',
+ SubHeader: 'Remove shared folder',
+ Paragraph11: 'You are about to remove the following shared folder',
+ Paragraph21: 'All files belonging to this shared folder will be deleted.',
+ Paragraph31: 'Are you sure you wish to remove it ?',
+ Input149: {
+ Type: 'Submit',
+ Value: 'Cancel',
+ Name: 'cancel',
+ Label: 'cancel'
+ },
+ Input150: {
+ Type: 'Submit',
+ Value: 'Remove',
+ Name: 'remove',
+ Label: 'remove'
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/json5/shared-folders_list.json5 b/json5/shared-folders_list.json5
new file mode 100644
index 0000000..32f7b84
--- /dev/null
+++ b/json5/shared-folders_list.json5
@@ -0,0 +1,56 @@
+//
+// Generated by sm1-html-2-json5 version:0.5 Chameleon version:3.8.1 On Python:3.12.3 at 2025-05-20 15:40:23
+//
+{
+ 'PackageName': 'shared-folders_list',
+ 'prefix': '',
+ 'MenuHeading': 'Miscellaneous',
+ 'MenuDescription': 'shared-folders_list',
+ 'MenuNavigation': '2000 400',
+ 'firstPanel': 'PARAMS',
+ 'signalEvent': 'smeserver-shared-folders_list-update',
+ 'html': [
+ {
+ 'Name': 'params',
+ 'route': 'PARAMS',
+ 'Header': 'Create, modify, or remove shared folders',
+ 'SubHeader': 'Manage shared-folders_list settings:',
+ 'Paragraph1': 'You can remove any shared folder by clicking on the corresponding command next to the shared folder.',
+ 'Paragraph2': 'Create a new shared folder',
+ 'Link1': {
+ 'Type': 'Link',
+ 'href': 'shares?page=0&page_stack=&Next=Next&wherenext=CreateModify',
+ 'title': 'Create a new shared folder'
+ },
+ 'Table1': {
+ 'Type': 'Table',
+ 'TableControl': 'Table1',
+ 'TopHeadings': [
+ 'Name',
+ 'Description',
+ 'Action'
+ ],
+ 'Columns': [
+ 'Table1-Name',
+ 'Table1-Description',
+ 'Table1-Action'
+ ]
+ },
+ 'Link2': {
+ 'Type': 'Link',
+ 'href': 'shares?page=;page_stack=;wherenext=Permissions&name=africa2023',
+ 'title': 'Permissions'
+ },
+ 'Link3': {
+ 'Type': 'Link',
+ 'href': 'shares?page=;page_stack=;wherenext=CreateModify&action=modify&name=africa2023',
+ 'title': 'Modify'
+ },
+ 'Link4': {
+ 'Type': 'Link',
+ 'href': 'shares?page=;page_stack=;wherenext=Remove&name=africa2023&description=New one',
+ 'title': 'Remove'
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/json5/shared-folders_modify.json5 b/json5/shared-folders_modify.json5
new file mode 100644
index 0000000..fbfc1cc
--- /dev/null
+++ b/json5/shared-folders_modify.json5
@@ -0,0 +1,198 @@
+//
+// Generated by sm1-html-2-json5 version:0.5 Chameleon version:3.8.1 On Python:3.12.3 at 2025-05-20 15:40:34
+//
+{
+ 'PackageName': 'shared-folders_modify',
+ 'prefix': '',
+ 'MenuHeading': 'Miscellaneous',
+ 'MenuDescription': 'shared-folders_modify',
+ 'MenuNavigation': '2000 400',
+ 'firstPanel': 'PARAMS',
+ 'signalEvent': 'smeserver-shared-folders_modify-update',
+ 'html': [
+ {
+ 'Name': 'params',
+ 'route': 'PARAMS',
+ 'Header': 'Create, modify, or remove shared folders',
+ 'SubHeader': 'Create or modify a shared folder',
+ 'Input1': {
+ 'Type': 'Text',
+ 'Value': 'New one',
+ 'Name': 'description',
+ 'Label': 'description'
+ },
+ 'Paragraph1': 'The following settings control the access of this shared folder from the local network, using the SMB/CIFS protocol.',
+ 'Input2': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'smbaccess',
+ 'Label': 'smbaccess',
+ 'Options': [
+ {
+ 'Value': 'browseable',
+ 'Text': 'Enabled, browseable'
+ },
+ {
+ 'Value': 'non-browseable',
+ 'Text': 'Enabled, hidden'
+ },
+ {
+ 'Value': 'none',
+ 'Text': 'No access'
+ }
+ ]
+ },
+ 'Input3': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'recyclebin',
+ 'Label': 'recyclebin',
+ 'Options': [
+ {
+ 'Value': 'disabled',
+ 'Text': 'disabled'
+ },
+ {
+ 'Value': 'enabled',
+ 'Text': 'Enabled, keep only the latest version'
+ },
+ {
+ 'Value': 'keep-versions',
+ 'Text': 'Enabled, keep a copy of all versions'
+ }
+ ]
+ },
+ 'Input4': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'retention',
+ 'Label': 'retention',
+ 'Options': [
+ {
+ 'Value': '30',
+ 'Text': 'one month'
+ },
+ {
+ 'Value': '7',
+ 'Text': 'one week'
+ },
+ {
+ 'Value': '365',
+ 'Text': 'one year'
+ },
+ {
+ 'Value': '180',
+ 'Text': 'six months'
+ },
+ {
+ 'Value': 'unlimited',
+ 'Text': 'unlimited'
+ }
+ ]
+ },
+ 'Paragraph2': 'The following settings control the access of this shared folder using the HTTP/HTTPS protocol.',
+ 'Input5': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'httpaccess',
+ 'Label': 'httpaccess',
+ 'Options': [
+ {
+ 'Value': 'global',
+ 'Text': 'Entire Internet (no password required)'
+ },
+ {
+ 'Value': 'global-pw',
+ 'Text': 'Entire Internet (password required)'
+ },
+ {
+ 'Value': 'global-pw-remote',
+ 'Text': 'Entire Internet (password required outside local network)'
+ },
+ {
+ 'Value': 'local',
+ 'Text': 'Local network (no password required)'
+ },
+ {
+ 'Value': 'local-pw',
+ 'Text': 'Local network (password required)'
+ },
+ {
+ 'Value': 'none',
+ 'Text': 'No access'
+ }
+ ]
+ },
+ 'Input6': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'webdav',
+ 'Label': 'webdav',
+ 'Options': [
+ {
+ 'Value': 'disabled',
+ 'Text': 'disabled'
+ },
+ {
+ 'Value': 'enabled',
+ 'Text': 'enabled'
+ }
+ ]
+ },
+ 'Input7': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'requireSSL',
+ 'Label': 'requireSSL',
+ 'Options': [
+ {
+ 'Value': 'disabled',
+ 'Text': 'disabled'
+ },
+ {
+ 'Value': 'enabled',
+ 'Text': 'enabled'
+ }
+ ]
+ },
+ 'Input8': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'indexes',
+ 'Label': 'indexes',
+ 'Options': [
+ {
+ 'Value': 'disabled',
+ 'Text': 'disabled'
+ },
+ {
+ 'Value': 'enabled',
+ 'Text': 'enabled'
+ }
+ ]
+ },
+ 'Input9': {
+ 'Type': 'Select',
+ 'Value': '',
+ 'Name': 'dynamic',
+ 'Label': 'dynamic',
+ 'Options': [
+ {
+ 'Value': 'disabled',
+ 'Text': 'disabled'
+ },
+ {
+ 'Value': 'enabled',
+ 'Text': 'enabled'
+ }
+ ]
+ },
+ 'Input10': {
+ 'Type': 'Submit',
+ 'Value': 'Save',
+ 'Name': 'Next',
+ 'Label': 'Next'
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/json5/shared-folders_perms.json5 b/json5/shared-folders_perms.json5
new file mode 100644
index 0000000..4815453
--- /dev/null
+++ b/json5/shared-folders_perms.json5
@@ -0,0 +1,271 @@
+//
+// Generated by sm1-html-2-json5 version:0.5 Chameleon version:3.8.1 On Python:3.12.3 at 2025-05-20 15:41:06
+//
+{
+ 'PackageName': 'shared-folders_perms',
+ 'prefix': '',
+ 'MenuHeading': 'Miscellaneous',
+ 'MenuDescription': 'shared-folders_perms',
+ 'MenuNavigation': '2000 400',
+ 'firstPanel': 'PARAMS',
+ 'signalEvent': 'smeserver-shared-folders_perms-update',
+ 'html': [
+ {
+ 'Name': 'params',
+ 'route': 'PARAMS',
+ 'Header': 'Create, modify, or remove shared folders',
+ 'SubHeader': 'Access right management',
+ 'Paragraph1': 'You can use this matrix to define groups and users access permissions.',
+ 'Table1': {
+ 'Type': 'Table',
+ 'TableControl': 'Table1',
+ 'TopHeadings': [
+ 'Groups',
+ 'Description',
+ 'Read / Write',
+ 'Read Only'
+ ],
+ 'Columns': [
+ 'Table1-Groups',
+ 'Table1-Description',
+ 'Table1-Read / Write',
+ 'Table1-Read Only'
+ ]
+ },
+ 'Input1': {
+ 'Type': 'Checkbox',
+ 'Value': 'shared',
+ 'Name': 'writegroup',
+ 'Label': 'writegroup'
+ },
+ 'Input2': {
+ 'Type': 'Checkbox',
+ 'Value': 'shared',
+ 'Name': 'readgroup',
+ 'Label': 'readgroup'
+ },
+ 'Input3': {
+ 'Type': 'Checkbox',
+ 'Value': 'changeofkey',
+ 'Name': 'writegroup',
+ 'Label': 'writegroup'
+ },
+ 'Input4': {
+ 'Type': 'Checkbox',
+ 'Value': 'changeofkey',
+ 'Name': 'readgroup',
+ 'Label': 'readgroup'
+ },
+ 'Input5': {
+ 'Type': 'Checkbox',
+ 'Value': 'domainadmins',
+ 'Name': 'writegroup',
+ 'Label': 'writegroup'
+ },
+ 'Input6': {
+ 'Type': 'Checkbox',
+ 'Value': 'domainadmins',
+ 'Name': 'readgroup',
+ 'Label': 'readgroup'
+ },
+ 'Input7': {
+ 'Type': 'Checkbox',
+ 'Value': 'ecmw2023grp',
+ 'Name': 'writegroup',
+ 'Label': 'writegroup'
+ },
+ 'Input8': {
+ 'Type': 'Checkbox',
+ 'Value': 'ecmw2023grp',
+ 'Name': 'readgroup',
+ 'Label': 'readgroup'
+ },
+ 'Input9': {
+ 'Type': 'Checkbox',
+ 'Value': 'miwgrp',
+ 'Name': 'writegroup',
+ 'Label': 'writegroup'
+ },
+ 'Input10': {
+ 'Type': 'Checkbox',
+ 'Value': 'miwgrp',
+ 'Name': 'readgroup',
+ 'Label': 'readgroup'
+ },
+ 'Input11': {
+ 'Type': 'Checkbox',
+ 'Value': 'brianr',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input12': {
+ 'Type': 'Checkbox',
+ 'Value': 'brianr',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input13': {
+ 'Type': 'Checkbox',
+ 'Value': 'cok1',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input14': {
+ 'Type': 'Checkbox',
+ 'Value': 'cok1',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input15': {
+ 'Type': 'Checkbox',
+ 'Value': 'cok2',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input16': {
+ 'Type': 'Checkbox',
+ 'Value': 'cok2',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input17': {
+ 'Type': 'Checkbox',
+ 'Value': 'dmarc',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input18': {
+ 'Type': 'Checkbox',
+ 'Value': 'dmarc',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input19': {
+ 'Type': 'Checkbox',
+ 'Value': 'ecmw2025',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input20': {
+ 'Type': 'Checkbox',
+ 'Value': 'ecmw2025',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input21': {
+ 'Type': 'Checkbox',
+ 'Value': 'englishcountrymusicweekend',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input22': {
+ 'Type': 'Checkbox',
+ 'Value': 'englishcountrymusicweekend',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input23': {
+ 'Type': 'Checkbox',
+ 'Value': 'guest',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input24': {
+ 'Type': 'Checkbox',
+ 'Value': 'guest',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input25': {
+ 'Type': 'Checkbox',
+ 'Value': 'katy',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input26': {
+ 'Type': 'Checkbox',
+ 'Value': 'katy',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input27': {
+ 'Type': 'Checkbox',
+ 'Value': 'more',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input28': {
+ 'Type': 'Checkbox',
+ 'Value': 'more',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input29': {
+ 'Type': 'Checkbox',
+ 'Value': 'nikki',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input30': {
+ 'Type': 'Checkbox',
+ 'Value': 'nikki',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input31': {
+ 'Type': 'Checkbox',
+ 'Value': 'phil',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input32': {
+ 'Type': 'Checkbox',
+ 'Value': 'phil',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input33': {
+ 'Type': 'Checkbox',
+ 'Value': 'sheila',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input34': {
+ 'Type': 'Checkbox',
+ 'Value': 'sheila',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input35': {
+ 'Type': 'Checkbox',
+ 'Value': 'smeserver',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input36': {
+ 'Type': 'Checkbox',
+ 'Value': 'smeserver',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input37': {
+ 'Type': 'Checkbox',
+ 'Value': 'zara.healy',
+ 'Name': 'writeuser',
+ 'Label': 'writeuser'
+ },
+ 'Input38': {
+ 'Type': 'Checkbox',
+ 'Value': 'zara.healy',
+ 'Name': 'readuser',
+ 'Label': 'readuser'
+ },
+ 'Input39': {
+ 'Type': 'Submit',
+ 'Value': 'Save',
+ 'Name': 'Next',
+ 'Label': 'Next'
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/json5/shared-folders_remove.json5 b/json5/shared-folders_remove.json5
new file mode 100644
index 0000000..1ae9679
--- /dev/null
+++ b/json5/shared-folders_remove.json5
@@ -0,0 +1,35 @@
+//
+// Generated by sm1-html-2-json5 version:0.5 Chameleon version:3.8.1 On Python:3.12.3 at 2025-05-20 15:41:15
+//
+{
+ 'PackageName': 'shared-folders_remove',
+ 'prefix': '',
+ 'MenuHeading': 'Miscellaneous',
+ 'MenuDescription': 'shared-folders_remove',
+ 'MenuNavigation': '2000 400',
+ 'firstPanel': 'PARAMS',
+ 'signalEvent': 'smeserver-shared-folders_remove-update',
+ 'html': [
+ {
+ 'Name': 'params',
+ 'route': 'PARAMS',
+ 'Header': 'Create, modify, or remove shared folders',
+ 'SubHeader': 'Remove shared folder',
+ 'Paragraph1': 'You are about to remove the following shared folder',
+ 'Paragraph2': 'All files belonging to this shared folder will be deleted.',
+ 'Paragraph3': 'Are you sure you wish to remove it ?',
+ 'Input1': {
+ 'Type': 'Submit',
+ 'Value': 'Cancel',
+ 'Name': 'cancel',
+ 'Label': 'cancel'
+ },
+ 'Input2': {
+ 'Type': 'Submit',
+ 'Value': 'Remove',
+ 'Name': 'remove',
+ 'Label': 'remove'
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/json5_fix_format.py b/json5_fix_format.py
new file mode 100644
index 0000000..bdebd04
--- /dev/null
+++ b/json5_fix_format.py
@@ -0,0 +1,96 @@
+import re
+import json5
+
+def fix_json5_syntax(text):
+ # Remove comments
+ text = re.sub(r'//.*', '', text)
+ text = re.sub(r'/\*.*?\*/', '', text, flags=re.DOTALL)
+ # Replace single quotes with double quotes
+ text = re.sub(r"'", '"', text)
+ # Add missing commas between objects in arrays (naive)
+ text = re.sub(r'(\})(\s*\{)', r'\1,\2', text)
+ # Remove trailing commas before closing } or ]
+ text = re.sub(r',(\s*[}\]])', r'\1', text)
+ return text
+
+def renumber_inputs(obj, start=100):
+ """
+ Recursively renumber InputN keys to Input{start}, Input{start+1}, ...
+ Returns the new object and the next available number.
+ """
+ if isinstance(obj, dict):
+ new_obj = {}
+ for k, v in obj.items():
+ m = re.match(r'Input(\d+)', k)
+ if m:
+ new_key = f"Input{start}"
+ start += 1
+ else:
+ new_key = k
+ new_obj[new_key], start = renumber_inputs(v, start)
+ return new_obj, start
+ elif isinstance(obj, list):
+ new_list = []
+ for item in obj:
+ new_item, start = renumber_inputs(item, start)
+ new_list.append(new_item)
+ return new_list, start
+ else:
+ return obj, start
+
+def dict_to_json5(obj, indent=0):
+ """Convert a dict to JSON5-like text with unquoted field names."""
+ IND = ' '
+ if isinstance(obj, dict):
+ items = []
+ for k, v in obj.items():
+ # Only quote keys if necessary (not a valid identifier)
+ if re.match(r'^[A-Za-z_]\w*$', k):
+ key = k
+ else:
+ key = f'"{k}"'
+ items.append(f"{IND* (indent+1)}{key}: {dict_to_json5(v, indent+1)}")
+ return '{\n' + ',\n'.join(items) + f'\n{IND*indent}' + '}'
+ elif isinstance(obj, list):
+ items = [f"{IND*(indent+1)}{dict_to_json5(v, indent+1)}" for v in obj]
+ return '[\n' + ',\n'.join(items) + f'\n{IND*indent}' + ']'
+ elif isinstance(obj, str):
+ # Always single-quote strings for JSON5 style
+ return "'" + obj.replace("'", "\\'") + "'"
+ elif obj is True:
+ return 'true'
+ elif obj is False:
+ return 'false'
+ elif obj is None:
+ return 'null'
+ else:
+ return str(obj)
+
+def main():
+ input_file = 'json5/shared-folders.json5'
+ output_file = 'json5/shared-folders-renumbered.json5'
+
+ # Read and fix the JSON5 input
+ with open(input_file, 'r', encoding='utf-8') as f:
+ raw = f.read()
+
+ fixed = fix_json5_syntax(raw)
+
+ # Parse with json5
+ try:
+ data = json5.loads(fixed)
+ except Exception as e:
+ print("Error parsing JSON5:", e)
+ return
+
+ # Renumber Input fields
+ data, _ = renumber_inputs(data, 100)
+
+ # Write out as JSON5 with unquoted field names
+ with open(output_file, 'w', encoding='utf-8') as f:
+ f.write(dict_to_json5(data, indent=0))
+
+ print(f"Renumbered file written to: {output_file}")
+
+if __name__ == '__main__':
+ main()
\ No newline at end of file