blob: 4293215cd1df49a7d8ac2cb7bbaecf525966db56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{% extends "layout.html" %}
{% block content %}
<div class="container">
<div class="well">
<h3>{{ action }}</h3>
<form action="" method="post" name="save" class="form-horizontal">
{{ form.hidden_tag() }}
<div class="form-group">
<label for="{{ form.name.id }}" class="col-sm-3 control-label">{{ form.name.label }}</label>
<div class="col-sm-9">
{{ form.name(class_="form-control", size="100%") }}
</div>
{% for error in form.name.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
</div>
<div class="form-group">
<label for="{{ form.name.id }}" class="col-sm-3 control-label">{{ form.feeds.label }}</label>
<div class="col-sm-9">
{{ form.feeds(class_="selectpicker", **{'data-live-search':'true', 'data-width':'auto'}) }}
</div>
{% for error in form.feeds.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
{{ form.submit(class_="btn btn-primary") }}
</div>
</div>
</form>
</div>
</div><!-- /.container -->
<script>
(function() {
// document.getElementById("selectpicker").selectpicker();
var selectpickers = document.getElementsByClassName('selectpicker');
Array.prototype.map.call(selectpickers, function(picker) {
picker.selectpicker('render');
})
// $('.selectpicker').selectpicker();
})();
</script>
{% endblock %}
|