diff options
author | Simo Sorce <simo@redhat.com> | 2014-05-27 16:13:28 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2014-05-29 09:49:14 -0400 |
commit | 4d45b3dbc7d7549e8f87fe4ab8b11c76d6d4b72e (patch) | |
tree | 3aee1da13fcfe5b0c4c41618cb5b6549a40e265f /templates | |
parent | ff115ef3155071dacf65c9f74192c4acb2b5989f (diff) | |
download | ipsilon-4d45b3dbc7d7549e8f87fe4ab8b11c76d6d4b72e.tar.gz ipsilon-4d45b3dbc7d7549e8f87fe4ab8b11c76d6d4b72e.tar.xz ipsilon-4d45b3dbc7d7549e8f87fe4ab8b11c76d6d4b72e.zip |
Show the Save button only if it useful
If the user cannot perform any action there is no reason to show the
save button.
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/providers/saml2_sp.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/admin/providers/saml2_sp.html b/templates/admin/providers/saml2_sp.html index 50d38ed..0b7385b 100644 --- a/templates/admin/providers/saml2_sp.html +++ b/templates/admin/providers/saml2_sp.html @@ -52,10 +52,12 @@ </div> {% endif %} - <button id="submit" class="btn btn-primary" name="submit" type="submit" value="Submit"> - Save - </button> - <a href="{{ backurl }}" class="btn btn-default" title="Back">Back</a> + {% if user.name == data.owner or user.is_admin %} + <button id="submit" class="btn btn-primary" name="submit" type="submit" value="Submit"> + Save + </button> + {% endif %} + <a href="{{ backurl }}" class="btn btn-default" title="Back">Back</a> </form> </div> {% endblock %} |