This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new c3c5db9 frontend: display chroot comments on create project page
c3c5db9 is described below
commit c3c5db9a42264faa1a571e729406885a0894e195
Author: Dominik Turecek <dturecek(a)redhat.com>
AuthorDate: Mon Dec 2 10:24:28 2019 +0100
frontend: display chroot comments on create project page
Fixes: #1126
Merges: #1128
---
frontend/coprs_frontend/coprs/templates/coprs/add.html | 2 +-
frontend/coprs_frontend/coprs/templates/coprs/group_add.html | 2 +-
frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py | 7 +++++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/add.html
b/frontend/coprs_frontend/coprs/templates/coprs/add.html
index 57efa85..a2d7af0 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/add.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/add.html
@@ -23,6 +23,6 @@
<p>
You agree to build only <a
href="https://docs.pagure.org/copr.copr/user_documentation.html#what...
content</a> in Copr. Check if your <a
href="https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Goo...
is allowed.
</p>
- {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name) }}
+ {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name,
comments=comments) }}
{% endblock %}
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/group_add.html
b/frontend/coprs_frontend/coprs/templates/coprs/group_add.html
index 2a7923b..0de9155 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/group_add.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/group_add.html
@@ -26,6 +26,6 @@
<p>
You agree to build only <a
href="https://docs.pagure.org/copr.copr/user_documentation.html#what...
content</a> in Copr. Check if your <a
href="https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Goo...
is allowed.
</p>
- {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name,
group=group) }}
+ {{ copr_form(form, view = 'coprs_ns.copr_new', username=g.user.name,
group=group, comments=comments) }}
{% endblock %}
diff --git a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
index 9420f2e..979eea1 100644
--- a/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
+++ b/frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py
@@ -148,10 +148,13 @@ def coprs_fulltext_search(page=1):
@login_required
def copr_add(username=None, group_name=None):
form = forms.CoprFormFactory.create_form_cls()()
+ comments = {}
+ for chroot in MockChrootsLogic.get_multiple(active_only=True):
+ comments[chroot.name] = chroot.comment
if group_name:
group = ComplexLogic.get_group_by_name_safe(group_name)
- return flask.render_template("coprs/group_add.html", form=form,
group=group)
- return flask.render_template("coprs/add.html", form=form)
+ return flask.render_template("coprs/group_add.html", form=form,
group=group, comments=comments)
+ return flask.render_template("coprs/add.html", form=form,
comments=comments)
@coprs_ns.route("/<username>/new/", methods=["POST"])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.