{% from "_helpers.html" import render_field %} {% macro copr_form(form, view, copr = None, username = None) %} {# if using for updating, we need to pass name to url_for, but otherwise we need to pass nothing #}
{{ form.csrf_token }} {{ render_field(form.id, hidden = True) }} {% if copr is none %} {{ render_field(form.name, label='Project Name', required = True, class="required") }} {% else %} {{ render_field(form.name, hidden = True) }} {{ render_field(form.name, label='Project Name', disabled = True) }} {% endif %} {{ render_field(form.description, rows=5, cols=50, placeholder='Optional - describe your project briefly.') }} {{ render_field(form.instructions, rows=5, cols=50, placeholder='Optional - describe how your project can be installed. Link to wiki is good as well.') }}
You can use markdown syntax, inline HTML is forbidden..
Chroots
{% if form._mock_chroots_error %}

{{ form._mock_chroots_error }}

{% endif %} {% for group_set, chs in form.chroots_sets.items() %} {% for ch in chs %} {% endfor %}
{{ form|attr(ch)|attr('label') }} {% if form|attr(ch)|attr('label') %} {% else %} {{ form|attr(ch)|attr('label') }} {% endif %} {{ form|attr(ch) }} {% if copr and form|attr(ch)|attr('data') %} [Edit] {% endif %}
{% endfor %} {{ render_field(form.repos, rows=5, cols=50, placeholder='Optional - URL to additional yum repos, which can be used during build. Space separated.') }} {% if copr is none %}{# we're creating the copr, so display initial builds area #} {{ render_field(form.initial_pkgs, rows=5, cols=50, placeholder='Optional - list of src.rpm to build initially. Can be skipped and submitted later.') }} {% endif %}
{% endmacro %} {% macro copr_delete_form(form, copr) %}
{{ form.csrf_token }}
{% if form.verify.errors %} {% for error in form.verify.errors %}

{{ error }}

{% endfor %} {% endif %}
{{ form.verify }}
{% endmacro %} {% macro copr_permissions_form(form, copr, permissions) %} {% if permissions %}
{{ form.csrf_token }} {% for perm in permissions %} {% endfor %}
UsernameIs BuilderIs Admin
{{ perm.user.name }} {{ perm.copr_builder|perm_type_from_num }} {% if perm.copr_builder != 0 %} {{ form['copr_builder_{0}'.format(perm.user.id)] }} {% endif %} {{ perm.copr_admin|perm_type_from_num }} {% if perm.copr_admin != 0 %} {{ form['copr_admin_{0}'.format(perm.user.id)] }} {% endif %}
{% endif %} {% endmacro %} {% macro copr_legal_flag_form(form, copr) %} {% endmacro %}