mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-11 20:18:52 +01:00
implementing forms to add user
This commit is contained in:
parent
fb0bfb48cc
commit
1dd3f2a73d
18
resources/templates/adduser.tmpl
Normal file
18
resources/templates/adduser.tmpl
Normal file
@ -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='/adduser' role="form" class="form-signin">
|
||||
${form}
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<button class="btn btn-default green" type="submit">
|
||||
<span class="glyphicon glyphicon-plus-sign"> Add User</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</%block>
|
23
resources/templates/form.tmpl
Normal file
23
resources/templates/form.tmpl
Normal file
@ -0,0 +1,23 @@
|
||||
% for a in attributes:
|
||||
<% attr = attributes[a] %>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">${attr['display_name']}</span>
|
||||
% if attr['type'] == 'string':
|
||||
<input type="text" class="form-control" placeholder="Username" aria-describedby="basic-addon1" required>
|
||||
% elif attr['type'] == 'email':
|
||||
<input type="email" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
||||
% elif attr['type'] == 'int':
|
||||
<input type="number" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
||||
% elif attr['type'] == 'fix':
|
||||
<input type="text" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
||||
% elif attr['type'] == 'stringlist':
|
||||
<input type="text" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
||||
% elif attr['type'] == 'password':
|
||||
<input type="password" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
||||
<span class="input-group-addon" id="basic-addon1">Retype ${attr['display_name']}</span>
|
||||
<input type="password" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
% endfor
|
Loading…
Reference in New Issue
Block a user