From 2ff5681988b37a5eae854e4eb65ca2551ecf8a4e Mon Sep 17 00:00:00 2001 From: Brian Read Date: Tue, 9 Apr 2024 15:36:30 +0100 Subject: [PATCH] placeholder and regexp --- Targets/_nfs_PARAMS.html.ep | 16 ++++----- Templates/html_controls.html.ep.xml | 51 +++++++++++++++++++++++++++-- nfsshare.json5 | 3 +- 3 files changed, 58 insertions(+), 12 deletions(-) diff --git a/Targets/_nfs_PARAMS.html.ep b/Targets/_nfs_PARAMS.html.ep index f7927bc..1d901a5 100644 --- a/Targets/_nfs_PARAMS.html.ep +++ b/Targets/_nfs_PARAMS.html.ep @@ -45,10 +45,10 @@

For writing permissions,allowing the root user and using insecure ports, you must configure a list of one IP per line, being part of the local network(s).

- %=l('NFS Client(s) allowed.') + %=l('NFS Client(s) allowed') % param 'NFSClientsAllowed' => $nfs_data->{NFSClientsAllowed} unless param 'NFSClientsAllowed'; - %= text_area 'NFSClientsAllowed', cols=>50, rows=>15 + %= text_area 'NFSClientsAllowed', cols=>40, rows=>5

@@ -103,20 +103,20 @@ %=l('Set the UID.') % param 'SetUID' => $nfs_data->{SetUID} unless param 'SetUID'; - %= text_field 'SetUID', size => '60', class => 'input' + %= text_field 'SetUID', size => '50', class => 'input' , pattern=>'.*' , placeholder=>'SetUID'

%=l('Set the GID.') % param 'SetGID' => $nfs_data->{SetGID} unless param 'SetGID'; - %= text_field 'SetGID', size => '60', class => 'input' + %= text_field 'SetGID', size => '50', class => 'input' , pattern=>'.*' , placeholder=>'SetGID'

- - %= submit_button l('Save'), class => 'action' - - + + %= submit_button l('Save'), class => 'action' + + %# Probably finally by a submit. % end diff --git a/Templates/html_controls.html.ep.xml b/Templates/html_controls.html.ep.xml index 11ff964..684a20e 100644 --- a/Templates/html_controls.html.ep.xml +++ b/Templates/html_controls.html.ep.xml @@ -22,7 +22,7 @@ %=l('${Label}') % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; - %= text_area '${Name}', cols=>50, rows=>15 + %= text_area '${Name}', cols=>${cols | 40}, rows=>${rows | 10}
]]> @@ -30,7 +30,7 @@ %=$%=l('${Label}') - %=date_field '${Name}' =>$$${Name} + %=date_field '${Name}' =>$$${Name}, pattern=>${regexp | .*}
]]> @@ -39,7 +39,7 @@ %=l('${Label}') % param '${Name}' => $$${prefix}_data->{${Name}} unless param '${Name}'; - %= text_field '${Name}', size => '60', class => 'input' + %= text_field '${Name}', size => '${size | 50}', class => 'input' , pattern=>'${regexp | ".*"}' , placeholder=>'${placeholder | Name}'

]]> @@ -51,4 +51,49 @@ %= submit_button l('${value}'), class => 'action' ]]> + + + %=l('${Label}') + + span>

+ ]]> +
+ + + %=l('${Label}') + + span>

+ ]]> +
+ + + %=l('${Label}') + + span>

+ ]]> +
+ + + %=l('${Label}') + + span>

+ ]]> +
+ + + %=l('${Label}') + + span>

+ ]]> +
+ + + + diff --git a/nfsshare.json5 b/nfsshare.json5 index f2d16d8..0dc9140 100644 --- a/nfsshare.json5 +++ b/nfsshare.json5 @@ -53,7 +53,8 @@ Input5: { Name: 'NFSClientsAllowed', Type: 'Textarea', - Label: 'NFS Client(s) allowed.' + Label: 'NFS Client(s) allowed', + rows : 5 }, Input6: { Name: 'FileSystemPermissions',