"Fossies" - the Fresh Open Source Software Archive

Member "roundup-2.0.0/share/roundup/templates/jinja2/html/layout/edit.tmpl" (29 Feb 2020, 2252 Bytes) of package /linux/www/roundup-2.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {% macro field_large(text, id, name, required=False) %}
    2   <div class="col col-lg-12 row">
    3     <dt class="col col-4 col-md-3 col-lg-2">
    4       <label class="col-form-label" for="{{ id }}">{{ i18n.gettext(text)|u|safe }}</label>
    5     </dt>
    6     <dd class="col col-8 col-md-9 col-lg-10">
    7       {{ context[name].field(class='form-control', id=id, **({'required': ''} if required else {}))|u|safe }}
    8     </dd>
    9   </div>
   10 {% endmacro -%}
   11 {% macro field_small(text, id, name, required=False) %}
   12   <div class="col row mr-1">
   13     <dt class="col col-4 col-md-3 col-lg-4">
   14       <label class="col-form-label" for="{{ id }}">{{ i18n.gettext(text)|u|safe }}</label>
   15       </dt>
   16     <dd class="col col-8 col-md-9 col-lg-8">
   17       {{ context[name].field(class='form-control', id=id, **({'required': ''} if required else {}))|u|safe }}
   18     </dd>
   19   </div>
   20 {% endmacro -%}
   21 {% macro file(text, id, name) %}
   22   <div class="col row mr-1">
   23     <dt class="col col-4 col-md-3 col-lg-4">
   24       <label class="col-form-label" for="{{ id }}">{{ i18n.gettext(text)|u|safe }}</label>
   25     </dt>
   26     <dd class="col col-8 col-md-9 col-lg-8">
   27       <input class="form-control btn btn-sm btn-outline-secondary" name="{{ name }}" id="{{ id }}" type="file" {%- if required %}required="required"{% endif %} />
   28     </dd>
   29   </div>
   30 {% endmacro -%}
   31 {% macro option(text, id, required=False) %}
   32   <div class="col row mr-1">
   33     <dt class="col col-4 col-md-3 col-lg-4">
   34       <label class="col-form-label" for="{{ id }}">{{ i18n.gettext(text)|u|safe }}</label>
   35     </dt>
   36     <dd class="col col-8 col-md-9 col-lg-8">
   37 	{% set kwargs = { 'required' : 'required' } %}
   38       {{ context[id].menu(html_kwargs=dict([('class', 'custom-select form-control'), ('id', id)] + ([('required', 'required')] if required else [])))|u|safe }}
   39     </dd>
   40   </div>
   41 {% endmacro -%}
   42 {% macro textarea(text, id, name, required=False) %}
   43   <div class="col col-lg-12 row">
   44     <dt class="col col-4 col-md-3 col-lg-2">
   45       <label class="col-form-label" for="{{ id }}">{{ i18n.gettext(text)|u|safe }}</label>
   46     </dt>
   47     <dd class="col col-8 col-md-9 col-lg-10">
   48       <textarea class="form-control" name="{{ name }}" id="{{ id }}" rows="5">{{ request.form.getvalue(name, '')|u }}</textarea>
   49     </dd>
   50   </div>
   51 {% endmacro -%}