{% from "_helpers.html" import render_field, render_checkbox_field, render_form_errors, copr_details_href, copr_url, render_dropdown_field, render_bootstrap_options %} {% macro copr_form(form, view, copr = None, username = None, group = None, comments = 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.csrf_token }} {{ render_field(form.id, hidden = True) }}

{{ counter('instructions') }}. 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.") }}

{{ counter('instructions')}}. Build options

{% if form.errors["chroots"] %}
{% else %}
{% endif %}
{% for ch in form.chroots %}
{% endfor %} {% if form.errors["chroots"] %} {{ form.errors["chroots"] |join(". ") }} {% 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
{% if copr is none %}{# we're creating the copr, so display initial builds area #}

{{ counter('instructions') }}. (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 %}

{{ counter('instructions') }}. Other options

{{ render_checkbox_field( "Booleans", [ [form.disable_createrepo], [form.build_enable_net], [form.auto_prune, g.user.admin], [form.unlisted_on_hp], [form.persistent, g.user.admin], [form.follow_fedora_branching], [form.multilib], [form.module_hotfixes], [form.fedora_review], [form.appstream], ])}} {{ render_field(form.delete_after_days, class="short-input-field", placeholder='Optional', info='Delete the project after the specfied period of time (empty = disabled)') }} {{ render_field(form.repo_priority, class="short-input-field", placeholder='Optional', info='Use the priority=<INT> config option for repositories in this project, see man dnf.conf(5) for more info.') }} {{ render_field(form.isolation, placeholder='default') }} {{ render_bootstrap_options(form) }} {{ render_field(form.runtime_dependencies, rows=5, cols=50, placeholder='Optional - URL to additional yum repos, which can be used as runtime dependencies. 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/') }} {{ render_field(form.packit_forge_projects_allowed, rows=5, cols=50, placeholder='Optional - forge projects, which can build in this project via Packit. Space separated. E.g.: github.com/packit/ogr', info='These projects will be allowed to build in this project via Packit.') }}
{% 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 %}