Skip to content

Commit

Permalink
Rework of listLocalRoles to use bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jhinghaus authored and dwt committed Jun 12, 2018
1 parent 56d4aee commit ab7018c
Showing 1 changed file with 30 additions and 35 deletions.
65 changes: 30 additions & 35 deletions src/OFS/dtml/listLocalRoles.dtml
Expand Up @@ -2,60 +2,53 @@
<dtml-with "_(management_view='Security')">
<dtml-if manage_tabs><dtml-var manage_tabs></dtml-if>
</dtml-with>

<main>

<dtml-if stat>
<hr>
<font color="red">&dtml-stat;</font>
<hr>
</dtml-if>

<p class="form-help">
Local roles allow you to give particular users extra roles in the context
of this object, in addition to the roles they already have.
Local roles allow you to give particular users extra roles in the context
of this object, in addition to the roles they already have.
</p>

<dtml-if has_local_roles>
<p class="form-help">
The following users have been given local roles. To modify the local roles
given to a particular user, click on the name of the user. To remove all
local roles from a user, select the checkbox next to the name of the user
The following users have been given local roles. To modify the local roles
given to a particular user, click on the name of the user. To remove all
local roles from a user, select the checkbox next to the name of the user
and click the <em>Remove</em> button.
</p>
<form action="manage_delLocalRoles" method="POST">
<table cellspacing="0" cellpadding="2" border="0">

<form action="manage_delLocalRoles" method="POST" class="zmi-localroles-delete">
<dtml-in get_local_roles>
<tr>
<td align="left" valign="top">
<input type="checkbox" name="userids:list" value="&dtml-sequence-key;" />
</td>
<td align="left" valign="top">
<div class="form-text">
<a href="manage_editLocalRoles?userid=&dtml.url_quote-sequence-key;">&dtml-sequence-key;</a> (<dtml-in
sequence-item>&dtml-sequence-item;<dtml-unless
<div class="form-check">
<input type="checkbox" class="form-check-input" name="userids:list" value="&dtml-sequence-key;" id="&dtml-sequence-key;_&dtml-sequence-item;" />
<label for="&dtml-sequence-key;_&dtml-sequence-item;" class="form-check-label">
<a href="manage_editLocalRoles?userid=&dtml.url_quote-sequence-key;">&dtml-sequence-key;</a> (<dtml-in
sequence-item>&dtml-sequence-item;<dtml-unless
sequence-end>, </dtml-unless></dtml-in>)
</label>
</div>
</td>
</tr>
</dtml-in>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit" value="Remove" />
<div class="controls">
<input class="btn btn-primary" type="submit" name="submit" value="Remove" />
</div>
</td>
</tr>
</table>
</form>

</dtml-if>

<p>
To give a user extra roles when accessing this object (and its children),
select a user from the <em>User</em> list below, select the extra
To give a user extra roles when accessing this object (and its children),
select a user from the <em>User</em> list below, select the extra
roles that should be given to that user from the <em>Roles</em> list.
</p>

<form action="manage_setLocalRoles" method="POST">
<form action="manage_setLocalRoles" method="POST" class="zmi-localroles-add">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td align="left" valign="top">
Expand All @@ -73,22 +66,22 @@ roles that should be given to that user from the <em>Roles</em> list.
<td align="left" valign="top">
<div class="form-element">
<dtml-try>
<select name="userid" size="5">
<select name="userid" class="form-control" size="5">
<dtml-in get_valid_userids>
<option value="&dtml-sequence-item;">&dtml-sequence-item;</option>
</dtml-in>
</select>
<dtml-except OverflowError>

<input name="userid" size=10>

</dtml-try>
</div>
</td>
<td align="left" valign="top">
<div class="form-element">
<select name="roles:list" size="5" multiple>
<dtml-in valid_roles><dtml-if
<select name="roles:list" class="form-control" size="5" multiple>
<dtml-in valid_roles><dtml-if
"_vars['sequence-item'] not in ('Anonymous', 'Shared', 'Authenticated')">
<option value="&dtml-sequence-item;">&dtml-sequence-item;</option>
</dtml-if>
Expand All @@ -99,13 +92,15 @@ roles that should be given to that user from the <em>Roles</em> list.
</tr>
<tr>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit" value=" Add " />
<div class="controls">
<input class="btn btn-primary" type="submit" name="submit" value=" Add " />
</div>
</td>
<td></td>
</tr>
</table>
</form>

</main>

<dtml-var manage_page_footer>

0 comments on commit ab7018c

Please sign in to comment.