diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-27 17:58:09 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-27 18:52:23 +0100 |
| commit | 5e4613a6ef78180f208b0cd58aeffb63f1e19853 (patch) | |
| tree | c874ceae225b17159328abbf7194da040ab704e0 /app/templates/macros/forms.html | |
| parent | f4c9348b7f36b31980f7629478fdc8b2877801cc (diff) | |
| download | cheatdb-5e4613a6ef78180f208b0cd58aeffb63f1e19853.tar.xz | |
Add ability to edit provides
Diffstat (limited to 'app/templates/macros/forms.html')
| -rw-r--r-- | app/templates/macros/forms.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/templates/macros/forms.html b/app/templates/macros/forms.html index b23711a..e0ad2de 100644 --- a/app/templates/macros/forms.html +++ b/app/templates/macros/forms.html @@ -39,6 +39,25 @@ </div> {% endmacro %} +{% macro render_mpackage_field(field, label=None, label_visible=true, right_url=None, right_label=None) -%} + <div class="form-group {% if field.errors %}has-error{% endif %} {{ kwargs.pop('class_', '') }}"> + {% if field.type != 'HiddenField' and label_visible %} + {% if not label %}{% set label=field.label.text %}{% endif %} + <label for="{{ field.id }}" class="control-label">{{ label|safe }}</label> + {% endif %} + <div class="metapackage_selector"> + <input type="text" placeholder="Start typing to see suggestions"> + <div class="clearboth"></div> + </div> + {{ field(class_='form-control', **kwargs) }} + {% if field.errors %} + {% for e in field.errors %} + <p class="help-block">{{ e }}</p> + {% endfor %} + {% endif %} + </div> +{% endmacro %} + {% macro render_checkbox_field(field, label=None) -%} {% if not label %}{% set label=field.label.text %}{% endif %} <div class="checkbox"> |
