mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-05 09:08:53 +01:00
28 lines
1.5 KiB
Cheetah
28 lines
1.5 KiB
Cheetah
% for a in sorted(attributes.keys(), key=lambda attr: attributes[attr]['weight']):
|
|
<% 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" name="${a}" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
|
% elif attr['type'] == 'email':
|
|
<input type="email" name="${a}" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
|
% elif attr['type'] == 'int':
|
|
<input type="number" name="${a}" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
|
% elif attr['type'] == 'fix':
|
|
<input type="text" name="${a}" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
|
% elif attr['type'] == 'stringlist':
|
|
<select class="form-control" name="type">
|
|
%for val in attr['values']:
|
|
<option>${val}</option>
|
|
%endfor
|
|
</select>
|
|
% elif attr['type'] == 'password':
|
|
<input type="password" name="${a}1" 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" name="${a}2" class="form-control" placeholder="${attr['description']}" aria-describedby="basic-addon1" required>
|
|
% endif
|
|
</div>
|
|
</div>
|
|
% endfor
|