Skip to content

Commit

Permalink
if the workspace is admin managed, hide the form elements from regula…
Browse files Browse the repository at this point in the history
…r users
  • Loading branch information
Adam Forsythe-Cheasley committed Jun 26, 2014
1 parent 39e25f8 commit 8495fca
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/ploneintranet/workspace/browser/templates/roster-edit.pt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
tal:define="context_state context/@@plone_context_state;
user_cannot_manage python:
not view.can_manage_workspace();
can_remove_users view/can_manage_workspace;
can_manage_workspace view/can_manage_workspace;
can_remove_users can_manage_workspace;
can_add_users view/can_add_users;
admin_managed_workspace view/admin_managed_workspace;
">

<h1 class="documentFirstHeading"
Expand All @@ -26,6 +28,10 @@

<div id="content-core">
<form method="post"
tal:condition="python:
can_manage_workspace
or
not admin_managed_workspace"
tal:attributes="action string:${context/absolute_url}/@@edit-roster">

<input type="hidden" name="form.submitted:boolean" value="True" />
Expand Down Expand Up @@ -138,7 +144,14 @@
</table>
</div>

<input id="edit-roster-save-button" class="context allowMultiSubmit" type="submit" name="form.button.Save" value="Save" i18n:attributes="value label_save" />
<input id="edit-roster-save-button"
class="context allowMultiSubmit"
type="submit"
name="form.button.Save" value="Save"
tal:condition="python:
can_manage_workspace
or not admin_managed_workspace"
i18n:attributes="value label_save" />
<input tal:replace="structure context/@@authenticator/authenticator" />

</form>
Expand Down

0 comments on commit 8495fca

Please sign in to comment.