This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
/
review_add_box.html
65 lines (62 loc) · 2.53 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{# 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 %}
{# TODO uncakeify #}
<form class="addon-feedback" method="post"
action="{{ remora_url('/reviews/add/') }}/{{ addon.id }}">
{{ cake_csrf_token() }}
{% with disabled = ('' if user.is_authenticated() else ' disabled') %}
<div class="container">
<label for="review">{{ _('Review') }}</label>
<textarea name="data[Review][body]" id="review"{{ disabled }}
cols="30" rows="6"></textarea>
</div>
<div class="container">
<label for="review-rating">{{ _('Rating', 'advanced_search_form_rating') }}</label>
<select id="review-rating" name="data[Review][rating]">
<option></option>
<option value="1" class="worst">*</option>
<option value="2" class="bad">**</option>
<option value="3" class="fair">***</option>
<option value="4" class="good">****</option>
<option value="5" class="best">*****</option>
</select>
<input type="hidden" name="data[Review][id]" value="" id="ReviewId"/>
<input type="hidden" name="data[Review][title]" value=" " id="ReviewTitle"/>
<button type="submit"{{ disabled }}>{{ _('Post Review') }}</button>
</div>
{% endwith %}
</form>
<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>
{# TODO reverse url #}
<a href="{{ remora_url('/reviews/add/{0}'|f(addon.id)) }}">
{{ _('Detailed Review') }}</a>
</p>
</div>{# /#review-box #}
{% endif %}{# /is_author #}