{% from "_helpers.html" import render_field, render_form_errors, copr_details_href, copr_url %} {% macro copr_form(form, view, copr = None, username = None, group = None) %} {# if using for updating, we need to pass name to url_for, but otherwise we need to pass nothing #} {{ render_form_errors(form, [form._mock_chroots_error]) }}
{{ form.csrf_token }} {{ render_field(form.id, hidden = True) }}

1. Project information

{% if group %} {% endif %} {% 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.', info='You can use markdown syntax, inline HTML is forbidden.') }} {{ render_field(form.instructions, rows=5, cols=50, placeholder='Optional - describe how your project can be installed. Where users can report bugs and issues. Link to wiki is good as well.', info='You can use markdown syntax, inline HTML is forbidden.') }} {{ render_field(form.homepage, label='Homepage', placeholder='Optional - project homepage') }} {{ render_field(form.contact, label='Contact', placeholder='Optional - email address or contact url', info="Use e-mail address or a link to your issue tracker. This information will be shown publicly.") }}

2. Build options

{% if form._mock_chroots_error %}
{% else %}
{% endif %}
{% for group_set, chs in form.chroots_sets.items() %}{% for ch in chs %}
{% endfor %}{% endfor %} {% if form._mock_chroots_error %} {{ form._mock_chroots_error }} {% endif %}
{{ render_field(form.repos, rows=5, cols=50, placeholder='Optional - URL to additional yum repos, which can be used during build. Space separated. This should be baseurl from .repo file. E.g.: http://copr-be.cloud.fedoraproject.org/results/rhughes/f20-gnome-3-12/fedora-$releasever-$basearch/') }}
Available variables to expand (with example value):
  • $chroot (fedora-21-x86_64)
  • $releasever (21)
  • $basearch (x86-64)
  • $distname (fedora)

To reference another Copr use:
  • copr://user/project
{{ form.disable_createrepo }} Create repositories manually
Repository meta data is refreshed after each build. If you want to do this manually, check the option above.
{{ form.build_enable_net }} Enable internet access during builds
{{ form.unlisted_on_hp }} Project will not be listed on home page
{% if copr is none %}{# we're creating the copr, so display initial builds area #}

3. (Optional) initial builds

{{ 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 }} {{ render_form_errors(form) }}
{{ form.verify(class="form-control") }}
{% endmacro %} {% macro copr_permissions_form(form, copr, permissions) %} {% if permissions %}
{{ form.csrf_token }} {% for perm in permissions %} {% endfor %}
Username Is Builder Is 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 %} {% macro copr_fork_form(form, copr, confirm) %}
{% if confirm %} {% endif %} {{ render_field(form.source, disabled = True) }} {{ render_field(form.source, hidden = True) }} {{ render_field(form.owner) }} {{ render_field(form.name, info="If you enter the name of your existing project, then only new packages and builds from source project will be forked into yours.") }} {{ form.csrf_token }}
{% endmacro %}