aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin/update_edit.html
blob: 06bee6010f0f9d3fdc1a037cb15b0aff099ab627 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing update %d'), update.id ) -%]
[% PROCESS 'admin/report_blocks.html' %]

[% status_message %]

<form method="post" action="[% c.uri_for( 'update_edit', update.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
    <input type="hidden" name="token" value="[% csrf_token %]" >
    <input type="hidden" name="submit" value="1" >
<ul>
    [%- cobrand_data = update.cobrand_data;
        cobrand_data = c.data_for_generic_update IF !update.cobrand;
        IF cobrand_data;
            uri = c.uri_for_email( '/report', update.problem_id, cobrand_data );
        ELSE;
            uri = c.uri_for_email( '/report', update.problem_id );
        END;
    %]
<li><a href="[% uri %]#update_[% update.id %]" class="admin-offsite-link">[% loc('View report on site' )%]</a></li>

<li><label for='detail'>[% loc('Text:') %]</label>
<textarea name='text' id='text' cols=60 rows=10>[% update.text | html %]</textarea></li>

<li><label for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous"  id="anonymous">
<option [% 'selected ' IF update.anonymous %]value="1">[% loc('Yes') %]</option>
<option [% 'selected ' IF !update.anonymous %]value="0">[% loc('No') %]</option>
</select></li>
<li><label for="state">[% loc('State:') %]</label> <select name="state"  id="state">
    [% FOREACH state IN [ ['confirmed', loc('Open')], ['hidden', loc('Hidden')], ['unconfirmed',loc('Unconfirmed')] ] %]
        <option [% 'selected ' IF state.0 == update.state %] value="[% state.0 %]">[% state.1 %]</option>
    [% END %]
</select></li>
<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% update.name | html %]'></li>
<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% update.user.email | html %]'>
[%- IF update.user.from_body && update.user.from_body.id == update.problem.bodies_str %]
[% ' (' _ tprintf(loc('user is from same council as problem - %d'), update.user.from_body.id ) _')' %]
[% END -%]
[%- IF update.user.id == update.problem.user.id %]
[% ' (' _ loc('user is problem owner') _')' %]
[% END -%]
</li>
[% IF update.problem_state %]
<li>[% tprintf(loc('Update changed problem state to %s'), update.problem_state) %]</li>
[% ELSIF update.mark_fixed %]
<li>[% loc('Update marked problem as fixed') %]</li>
[% ELSIF update.user.id == update.problem.user.id && update.mark_open %]
<li>[% loc('Update reopened problem') %]</li>
[% END %]
[% PROCESS abuse_button %] [% PROCESS flag_button user=update.user %]</li>
<li>[% loc('Cobrand:') %] [% update.cobrand %]</li>
<li>[% loc('Cobrand data:') %] [% update.cobrand_data %]</li>
<li>[% loc('Created:') %] [% PROCESS format_time time=update.created %]</li>

[% IF update.photo %]
<li>
<ul>
  [% FOR photo IN update.photos %]
    <li>
        <div class="update-img">
            <a href="[% c.cobrand.base_url %][% photo.url_temp_full %]" rel="fancy">
                <img alt="Photo of this update" src="[% c.cobrand.base_url %][% photo.url_temp %]">
                <span>zoom</span>
            </a>
        </div>
        <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Left') %]">
        <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Right') %]">
        <input type="checkbox" id="remove_photo_[% loop.index %]" name="remove_photo_[% loop.index %]" value="1">
        <label class="inline" for="remove_photo_[% loop.index %]">[% loc("Remove photo (can't be undone!)") %]</label></li>
    </li>
  [% END %]
</ul>
</li>
[% END %]

</ul>
<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form>

[% INCLUDE 'admin/footer.html' %]