diff options
author | Simon Rettberg | 2018-02-23 18:41:49 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-02-23 18:41:49 +0100 |
commit | 00851bd25e57938a79356d2efb36c2bea1697760 (patch) | |
tree | 11a759430f5a9ddc3b7977bb6c4451aa71287622 /modules-available/adduser/templates | |
parent | [adduser] Extend module to simple user manager (add/edit/remove) (diff) | |
download | slx-admin-00851bd25e57938a79356d2efb36c2bea1697760.tar.gz slx-admin-00851bd25e57938a79356d2efb36c2bea1697760.tar.xz slx-admin-00851bd25e57938a79356d2efb36c2bea1697760.zip |
[adduser] Support setting user's roles on add/edit
Diffstat (limited to 'modules-available/adduser/templates')
3 files changed, 119 insertions, 99 deletions
diff --git a/modules-available/adduser/templates/page-adduser.html b/modules-available/adduser/templates/page-adduser.html index 58d705f8..bd16dbbf 100644 --- a/modules-available/adduser/templates/page-adduser.html +++ b/modules-available/adduser/templates/page-adduser.html @@ -1,39 +1,37 @@ -<form class="form-adduser" action="?do=AddUser" method="post"> - <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="position:absolute;top:-2000px" tabindex="-1"> - <input type="password" name="password_fake" id="password_fake" value="" style="position:absolute;top:-2000px" tabindex="-1"> - <h2>{{lang_createUser}}</h2> - <div class="row"> - <div class="col-md-4"><label for="login">{{lang_login}} *</label></div> - <div class="col-md-4"><input id="label" type="text" name="login" value="{{login}}" class="form-control" placeholder="{{lang_username}}" autofocus></div> +<input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="position:absolute;top:-2000px" tabindex="-1"> +<input type="password" name="password_fake" id="password_fake" value="" style="position:absolute;top:-2000px" tabindex="-1"> +<h2>{{lang_createUser}}</h2> +<div class="row"> + <div class="col-md-4"><label for="login">{{lang_login}} *</label></div> + <div class="col-md-4"><input id="label" type="text" name="login" value="{{login}}" class="form-control" placeholder="{{lang_username}}" autofocus></div> +</div> +<br> +<div class="row"> + <div class="col-md-4"><label for="pass1">{{lang_password}} *</label></div> + <div class="col-md-4"><input id="pass1" type="password" name="pass1" class="form-control" placeholder="{{lang_password}}"></div> + <div class="col-md-4"><input type="password" name="pass2" class="form-control" placeholder="{{lang_confirmation}}"></div> +</div> +<br> +<div class="row"> + <div class="col-md-4"><label for="fullname">{{lang_fullName}} *</label></div> + <div class="col-md-4"><input id="fullname" type="text" name="fullname" value="{{fullname}}" class="form-control" placeholder="{{lang_fullName}}"></div> +</div> +<br> +<div class="row"> + <div class="col-md-4"><label for="phone">{{lang_phone}}</label></div> + <div class="col-md-4"><input id=phone" type="text" name="phone" value="{{phone}}" class="form-control" placeholder="{{lang_phone}}"></div> +</div> +<br> +<div class="row"> + <div class="col-md-4"><label for="email">{{lang_email}}</label></div> + <div class="col-md-4"><input id="email" type="text" name="email" value="{{email}}" class="form-control" placeholder="{{lang_email}}"></div> +</div> +<br> +<div class="row"> + <div class="col-md-4"></div> + <div class="col-md-8"> + <button class="btn btn-lg btn-primary btn-block" type="submit">{{lang_createUser}}</button> </div> - <br> - <div class="row"> - <div class="col-md-4"><label for="pass1">{{lang_password}} *</label></div> - <div class="col-md-4"><input id="pass1" type="password" name="pass1" class="form-control" placeholder="{{lang_password}}"></div> - <div class="col-md-4"><input type="password" name="pass2" class="form-control" placeholder="{{lang_confirmation}}"></div> - </div> - <br> - <div class="row"> - <div class="col-md-4"><label for="fullname">{{lang_fullName}} *</label></div> - <div class="col-md-4"><input id="fullname" type="text" name="fullname" value="{{fullname}}" class="form-control" placeholder="{{lang_fullName}}"></div> - </div> - <br> - <div class="row"> - <div class="col-md-4"><label for="phone">{{lang_phone}}</label></div> - <div class="col-md-4"><input id=phone" type="text" name="phone" value="{{phone}}" class="form-control" placeholder="{{lang_phone}}"></div> - </div> - <br> - <div class="row"> - <div class="col-md-4"><label for="email">{{lang_email}}</label></div> - <div class="col-md-4"><input id="email" type="text" name="email" value="{{email}}" class="form-control" placeholder="{{lang_email}}"></div> - </div> - <br> - <div class="row"> - <div class="col-md-4"></div> - <div class="col-md-8"> - <button class="btn btn-lg btn-primary btn-block" type="submit">{{lang_createUser}}</button> - </div> - </div> - <input type="hidden" name="action" value="adduser"> - <input type="hidden" name="token" value="{{token}}"> -</form> +</div> +<input type="hidden" name="action" value="adduser"> +<input type="hidden" name="token" value="{{token}}"> diff --git a/modules-available/adduser/templates/page-edituser.html b/modules-available/adduser/templates/page-edituser.html index b8e51b5c..36293b11 100644 --- a/modules-available/adduser/templates/page-edituser.html +++ b/modules-available/adduser/templates/page-edituser.html @@ -1,72 +1,70 @@ -<form class="form-adduser" action="?do=AddUser" method="post"> - <input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="position:absolute;top:-2000px" tabindex="-1"> - <input type="password" name="password_fake" id="password_fake" value="" style="position:absolute;top:-2000px" tabindex="-1"> - <h2>{{lang_editUser}}</h2> +<input type="text" name="prevent_autofill" id="prevent_autofill" value="" style="position:absolute;top:-2000px" tabindex="-1"> +<input type="password" name="password_fake" id="password_fake" value="" style="position:absolute;top:-2000px" tabindex="-1"> +<h2>{{lang_editUser}}</h2> - <div class="row"> - <div class="col-md-4"><label for="login">{{lang_login}}</label></div> - <div class="col-md-4"><input id="label" type="text" name="login" value="{{login}}" class="form-control" - placeholder="{{lang_username}}" autofocus></div> - </div> - <div class="row"> - <div class="col-md-4"></div> - <div class="col-md-8"> - <p> - {{lang_changeLoginHint}} - </p> - </div> +<div class="row"> + <div class="col-md-4"><label for="login">{{lang_login}}</label></div> + <div class="col-md-4"><input id="label" type="text" name="login" value="{{login}}" class="form-control" + placeholder="{{lang_username}}" autofocus></div> +</div> +<div class="row"> + <div class="col-md-4"></div> + <div class="col-md-8"> + <p> + {{lang_changeLoginHint}} + </p> </div> +</div> - <div class="row"> - <div class="col-md-4"><label for="pass1">{{lang_changePassword}}</label></div> - <div class="col-md-4"><input id="pass1" {{password_disabled}} type="password" name="pass1" class="form-control" placeholder="{{lang_password}}"> - </div> - <div class="col-md-4"><input {{password_disabled}} type="password" name="pass2" class="form-control" - placeholder="{{lang_confirmation}}"></div> +<div class="row"> + <div class="col-md-4"><label for="pass1">{{lang_changePassword}}</label></div> + <div class="col-md-4"><input id="pass1" {{password_disabled}} type="password" name="pass1" class="form-control" placeholder="{{lang_password}}"> </div> - {{#password_disabled}} - <div class="row"> - <div class="col-md-4"></div> - <div class="col-md-8"> - <p> - {{lang_changeOwnPasswordHint}} - </p> - </div> + <div class="col-md-4"><input {{password_disabled}} type="password" name="pass2" class="form-control" + placeholder="{{lang_confirmation}}"></div> +</div> +{{#password_disabled}} +<div class="row"> + <div class="col-md-4"></div> + <div class="col-md-8"> + <p> + {{lang_changeOwnPasswordHint}} + </p> </div> - {{/password_disabled}} - <br> +</div> +{{/password_disabled}} +<br> - <div class="row"> - <div class="col-md-4"><label for="fullname">{{lang_fullName}}</label></div> - <div class="col-md-4"><input id="fullname" type="text" name="fullname" value="{{fullname}}" class="form-control" - placeholder="{{lang_fullName}}"></div> - </div> - <br> +<div class="row"> + <div class="col-md-4"><label for="fullname">{{lang_fullName}}</label></div> + <div class="col-md-4"><input id="fullname" type="text" name="fullname" value="{{fullname}}" class="form-control" + placeholder="{{lang_fullName}}"></div> +</div> +<br> - <div class="row"> - <div class="col-md-4"><label for="phone">{{lang_phone}}</label></div> - <div class="col-md-4"><input id=phone" type="text" name="phone" value="{{phone}}" class="form-control" - placeholder="{{lang_phone}}"></div> - </div> - <br> +<div class="row"> + <div class="col-md-4"><label for="phone">{{lang_phone}}</label></div> + <div class="col-md-4"><input id=phone" type="text" name="phone" value="{{phone}}" class="form-control" + placeholder="{{lang_phone}}"></div> +</div> +<br> - <div class="row"> - <div class="col-md-4"><label for="email">{{lang_email}}</label></div> - <div class="col-md-4"><input id="email" type="text" name="email" value="{{email}}" class="form-control" placeholder="{{lang_email}}"> - </div> +<div class="row"> + <div class="col-md-4"><label for="email">{{lang_email}}</label></div> + <div class="col-md-4"><input id="email" type="text" name="email" value="{{email}}" class="form-control" placeholder="{{lang_email}}"> </div> - <br> +</div> +<br> - <div class="row"> - <div class="col-md-4"></div> - <div class="col-md-8"> - <button class="btn btn-lg btn-primary btn-block" type="submit"> - <span class="glyphicon glyphicon-floppy-disk"></span> - {{lang_save}} - </button> - </div> +<div class="row"> + <div class="col-md-4"></div> + <div class="col-md-8"> + <button class="btn btn-lg btn-primary btn-block" type="submit"> + <span class="glyphicon glyphicon-floppy-disk"></span> + {{lang_save}} + </button> </div> - <input type="hidden" name="action" value="edituser"> - <input type="hidden" name="userid" value="{{userid}}"> - <input type="hidden" name="token" value="{{token}}"> -</form> +</div> +<input type="hidden" name="action" value="edituser"> +<input type="hidden" name="userid" value="{{userid}}"> +<input type="hidden" name="token" value="{{token}}"> diff --git a/modules-available/adduser/templates/user-permissions.html b/modules-available/adduser/templates/user-permissions.html new file mode 100644 index 00000000..ce51630f --- /dev/null +++ b/modules-available/adduser/templates/user-permissions.html @@ -0,0 +1,24 @@ +<h3>{{lang_assignRoles}}</h3> + +<table class="table table-condensed table-hover"> + <thead> + <tr> + <th data-sort="string">{{lang_role}}</th> + <th class="text-center slx-smallcol"></th> + </tr> + </thead> + + <tbody> + {{#roles}} + <tr> + <td class="rolename">{{rolename}}</td> + <td class="text-center"> + <div class="checkbox"> + <input type="checkbox" name="roles[]" value="{{roleid}}" {{#hasRole}}checked{{/hasRole}}> + <label></label> + </div> + </td> + </tr> + {{/roles}} + </tbody> +</table>
\ No newline at end of file |