1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-12-25 14:20:04 +01:00

implementing form on two column

This commit is contained in:
kakwa 2015-06-10 22:45:04 +02:00
parent 9c2c4e425e
commit d755a6fc8f
2 changed files with 14 additions and 1 deletions

View File

@ -3,7 +3,7 @@
<div class="row clearfix top-buffer bottom-buffer">
<div class="col-md-2 column">
</div>
<div class="col-md-8 column">
<div class="col-md-12 column">
<div class="well well-sm">
<form method='POST' action='/adduser' role="form" class="form-signin" data-toggle="validator">
<h2 class="h3">Fill user attributes:</h2>

View File

@ -1,3 +1,9 @@
<%
len_second_column = len(attributes) / 2
counter = -1
%>
<div class="row">
<div class="col-md-6 column">
% for a in sorted(attributes.keys(), key=lambda attr: attributes[attr]['weight']):
<% attr = attributes[a] %>
<div class="form-group">
@ -10,6 +16,7 @@
value = ''
value2 = ''
%>
<% counter = counter + 1 %>
<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 ${value}>
@ -34,4 +41,10 @@
% endif
</div>
</div>
% if counter == len_second_column:
</div>
<div class="col-md-6 column">
% endif
% endfor
</div>
</div>