added uikit markup for priv, chmod, chown winix functions

WIP: #2
This commit is contained in:
Tomasz Sowa 2021-01-26 15:46:47 +01:00
parent 0139919d14
commit fdcefae264
3 changed files with 117 additions and 73 deletions

View File

@ -2,126 +2,172 @@
[# this template is for following functions: priv, chmod, chown] [# this template is for following functions: priv, chmod, chown]
<h1>{priv_header}</h1> <h1>{priv_header}</h1>
[if winix_function_param_is "r"]
<p>{priv_change_in_dir}: [dir]</p>
[end]
[if not [winix_function_param_is "r"]] [if not [winix_function_param_is "r"]]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end][winix_function]"> <form class="uk-form-stacked uk-width-1-2@s" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end][winix_function]">
<fieldset>
<legend>{priv_form_legend}</legend>
<table class="withoutborder">
[if priv_show_form_chown] [if priv_show_form_chown]
<tr><th>{user}:</th><td> <div class="uk-margin">
<select name="user" class="users"> <label class="uk-form-label" for="winix_user_select">{user}</label>
[for priv_user_tab]
<option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option> <div class="uk-form-controls">
[end] <select class="uk-select" id="winix_user_select" name="user">
</select> [for priv_user_tab]
</td></tr> <option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>
[end]
<tr><th>{group}: </th><td> </select>
<select name="group" class="groups"> </div>
[for priv_group_tab] </div>
<option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
</select>
</td></tr>
<div class="uk-margin">
<label class="uk-form-label" for="winix_group_select">{group}</label>
<div class="uk-form-controls">
<select class="uk-select" id="winix_group_select" name="group">
[for priv_group_tab]
<option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
</select>
</div>
</div>
[end] [end]
[if priv_show_form_chmod] [if priv_show_form_chmod]
<tr><th>{permissions}:</th><td><input class="privileges" type="text" name="privileges" value="[priv_privileges]"></td></tr> <div class="uk-margin">
<label class="uk-form-label" for="winix_user_permissions">{permissions}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_user_permissions" type="text" name="privileges" value="[priv_privileges]">
</div>
</div>
[end] [end]
</table>
[if winix_function_param_is "postredirect"] [if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]"> <input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end] [end]
<input class="submit" type="submit" value="{change}"> <div class="uk-margin">
</fieldset> <input class="uk-button uk-button-primary" type="submit" value="{change}">
</div>
</form> </form>
[else] [else]
<form id="additem" method="post" action="[doc_base_url][dir][winix_function]/r"> <form class="uk-form-stacked uk-width-1-2@s" method="post" action="[doc_base_url][dir][winix_function]/r">
<fieldset>
<legend>{priv_form_legend}</legend>
<p class="withnext">{priv_change_in_dir}: [dir]</p>
<h2>{priv_for_all_files}:</h2> <h2>{priv_for_all_files}</h2>
<table class="withoutborder">
[if priv_show_form_chown] [if priv_show_form_chown]
<tr><th>{user}:</th><td> <div class="uk-margin">
<select name="userfile" class="users"> <label class="uk-form-label" for="winix_files_user_select">{user}</label>
[for priv_user_tab]
<option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option> <div class="uk-form-controls">
[end] <select class="uk-select" id="winix_files_user_select" name="userfile">
</select> [for priv_user_tab]
</td></tr> <option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>
[end]
</select>
</div>
</div>
<tr><th>{group}: </th><td> <div class="uk-margin">
<select name="groupfile" class="groups"> <label class="uk-form-label" for="winix_files_group_select">{group}</label>
[for priv_group_tab]
<option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option> <div class="uk-form-controls">
[end] <select class="uk-select" id="winix_files_group_select" name="groupfile">
</select> [for priv_group_tab]
</td></tr> <option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
</select>
</div>
</div>
[end] [end]
[if priv_show_form_chmod] [if priv_show_form_chmod]
<tr><th>{permissions}:</th><td><input class="privileges" type="text" name="privilegesfile" value="[priv_privileges_for_files]"></td></tr> <div class="uk-margin">
<label class="uk-form-label" for="winix_files_permissions">{permissions}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_files_permissions" type="text" name="privilegesfile" value="[priv_privileges_for_files]">
</div>
</div>
[end] [end]
</table>
<h2>{priv_for_all_dirs}:</h2> <h2>{priv_for_all_dirs}</h2>
<table class="withoutborder">
[if priv_show_form_chown] [if priv_show_form_chown]
<tr><th>{user}:</th><td> <div class="uk-margin">
<select name="userdir" class="users"> <label class="uk-form-label" for="winix_dirs_user_select">{user}</label>
[for priv_user_tab]
<option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option> <div class="uk-form-controls">
[end] <select class="uk-select" id="winix_dirs_user_select" name="userdir">
</select> [for priv_user_tab]
</td></tr> <option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>
[end]
</select>
</div>
</div>
<tr><th>{group}: </th><td> <div class="uk-margin">
<select name="groupdir" class="groups"> <label class="uk-form-label" for="winix_dirs_group_select">{group}</label>
[for priv_group_tab]
<option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option> <div class="uk-form-controls">
[end] <select class="uk-select" id="winix_dirs_group_select" name="groupdir">
</select> [for priv_group_tab]
</td></tr> <option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
</select>
</div>
</div>
[end] [end]
[if priv_show_form_chmod] [if priv_show_form_chmod]
<tr><th>{permissions}:</th><td><input class="privileges" type="text" name="privilegesdir" value="[priv_privileges_for_dirs]"></td></tr> <div class="uk-margin">
<label class="uk-form-label" for="winix_dirs_permissions">{permissions}</label>
<div class="uk-form-controls">
<input class="uk-input" id="winix_dirs_permissions" type="text" name="privilegesdir" value="[priv_privileges_for_dirs]">
</div>
</div>
[end] [end]
</table>
<label><input class="check" type="checkbox" name="changesubdirs">{priv_change_all}</label> <div class="uk-margin-medium-top">
<label><input class="check" type="checkbox" name="changecurrentdir">{priv_change_current_dir}: [dir_without_slash]</label> <div class="uk-form-controls">
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="changesubdirs">{priv_change_all}</label>
</div>
<div class="uk-form-controls uk-margin-small-top">
[# !! improve me: for root directory dir_without_slash returns nothing, may would be better to show a slash?]
<label><input class="uk-checkbox uk-margin-small-right" type="checkbox" name="changecurrentdir">{priv_change_current_dir}: [dir_without_slash]</label>
</div>
</div>
[if winix_function_param_is "postredirect"] [if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]"> <input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end] [end]
<input class="submit" type="submit" value="{change}"> <div class="uk-margin-medium-top">
<input class="uk-button uk-button-primary" type="submit" value="{change}">
</div>
</fieldset>
</form> </form>
[end] [end]

View File

@ -224,7 +224,6 @@ passwd_password_changed = The password has been changed
priv_header = Permissions priv_header = Permissions
priv_form_legend = Permissions
priv_change_in_dir = Change permissions for all items in the following directory priv_change_in_dir = Change permissions for all items in the following directory
priv_for_all_files = For all files to priv_for_all_files = For all files to
priv_for_all_dirs = For all directories to priv_for_all_dirs = For all directories to

View File

@ -247,7 +247,6 @@ passwd_password_changed = Hasło zostało zmienione
priv_header = Zmień uprawnienia dostępu priv_header = Zmień uprawnienia dostępu
priv_form_legend = Uprawnienia
priv_change_in_dir = Zmień hurtowo uprawnienia w katalogu priv_change_in_dir = Zmień hurtowo uprawnienia w katalogu
priv_for_all_files = Dla wszystkich plików na priv_for_all_files = Dla wszystkich plików na
priv_for_all_dirs = Dla wszystkich katalogów na priv_for_all_dirs = Dla wszystkich katalogów na