Skip to content

Commit

Permalink
adding self modify page
Browse files Browse the repository at this point in the history
  • Loading branch information
kakwa committed May 31, 2015
1 parent f8b3df8 commit d1e0c4b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ldapcherry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def reload(self, config = None):
self.temp_searchuser = self.temp_lookup.get_template('searchuser.tmpl')
self.temp_adduser = self.temp_lookup.get_template('adduser.tmpl')
self.temp_form = self.temp_lookup.get_template('form.tmpl')
self.temp_selfmodify = self.temp_lookup.get_template('selfmodify.tmpl')

self._init_auth(config)

Expand Down Expand Up @@ -463,4 +464,5 @@ def modify(self, **params):
def selfmodify(self, **params):
""" self modify user page """
self._check_auth(must_admin=False)
pass
form = self.temp_form.render(attributes=self.attributes.get_selfattributes())
return self.temp_selfmodify.render(form=form)
18 changes: 18 additions & 0 deletions resources/templates/selfmodify.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<%inherit file="navbar.tmpl"/>
<%block name="core">
<div class="row clearfix top-buffer bottom-buffer">
<div class="col-md-12 column">
<div class="well well-sm">
<form method='POST' action='/selfmodify' role="form" class="form-signin">
${form}
<div class="form-group">
<div class="input-group">
<button type="submit" class="btn btn-default blue">
<span class="glyphicon glyphicon-cog"></span> Modify</button>
</div>
</div>
</form>
</div>
</div>
</div>
</%block>

0 comments on commit d1e0c4b

Please sign in to comment.