forked from mozilla/zamboni
/
review_add_box.html
47 lines (44 loc) · 1.69 KB
/
review_add_box.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{# TODO(jbalogh): make this a global fix: bug 551748 #}
{% set amo_user = user.get_profile() if user.is_authenticated() else None %}
{% if not addon.has_author(amo_user) %}
<h3>{{ _('What do you think?') }}</h3>
<div id="review-box" class="highlight">
{% if not user.is_authenticated() %}
<p>
{% trans login=login_link() %}
Please <a href="{{ login }}">log in</a> to submit a review
{% endtrans %}
</p>
{% endif %}
<form disabled method="post" action="{{ url('reviews.add', addon.slug) }}">
{% set attrs = {} if user.is_authenticated() else {'disabled': 'disabled'} %}
{{ csrf() }}
{{ field(review_form.body, _('Review:'), **attrs) }}
{{ field(review_form.rating, _('Rating:'), **attrs) }}
<input type="submit" value="{{ _('Submit review') }}" {{ attrs|xmlattr }}>
</form>
<div>
<p>
{% trans %}
Please do not post bug reports in reviews. We do not make your email
address available to add-on developers and they may need to contact
you to help resolve your issue.
{% endtrans %}
</p>
{% if addon.support_url or addon.support_email %}
<p>
{% trans support='#support' %}
See the <a href="{{ support }}">support section</a> to find out
where to get assistance for this add-on.
{% endtrans %}
</p>
{% endif %}
{# TODO reverse url #}
<p><a href="{{ remora_url('/pages/review_guide') }}">{{ _('Review Guidelines') }}</a></p>
<p>
<a href="{{ url('reviews.add', addon.slug) }}">
{{ _('Detailed Review') }}</a>
</p>
</div>
</div>{# /#review-box #}
{% endif %}{# /is_author #}