diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-01-15 14:56:00 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-01-15 14:56:00 +0000 |
commit | 3d5e0210feacf96e21e1916ab0df84b83f5f05e2 (patch) | |
tree | c9f82ab699f4f4b589345a55a70880ebf5089c90 /templates/web/base/questionnaire/index.html | |
parent | 0e257b2201998d428b3624a15dfeeb03a5559371 (diff) | |
parent | b8685054be0e16bc836dc568c0687a6f86400f38 (diff) |
Merge branch '1300-multiple-update-photos'
Diffstat (limited to 'templates/web/base/questionnaire/index.html')
-rw-r--r-- | templates/web/base/questionnaire/index.html | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/templates/web/base/questionnaire/index.html b/templates/web/base/questionnaire/index.html index ab3bde9ad..82f0534f4 100644 --- a/templates/web/base/questionnaire/index.html +++ b/templates/web/base/questionnaire/index.html @@ -71,15 +71,27 @@ <p><textarea name="update" rows="7" cols="30" placeholder="[% loc('What was your experience of getting the problem fixed?') %]">[% update | html %]</textarea></p> [% IF c.cobrand.allow_photo_upload %] -<p id="fileupload_normalUI"> - [% IF upload_fileid %] - <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> - <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> - <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + <label for="form_photo">[% loc('Photo') %]</label> + + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] + + <div id="form_photos"> + [% IF upload_fileid %] + <script> + fixmystreet.uploaded_files = "[% upload_fileid %]".split(','); + </script> + <p>[% loc('You have already attached photos to this update. Note that you can attach a maximum of 3 to this update (if you try to upload more, the oldest will be removed).') %]</p> + [% FOREACH id IN upload_fileid.split(',') %] + <img align="right" src="/photo/[% id %].temp.jpeg" alt=""> + [% END %] [% END %] - <label for="form_photo">[% loc('Photo:') %]</label> - <input type="file" name="photo" id="form_photo"> -</p> + <input type="file" name="photo1" id="form_photo"> + <input type="file" name="photo2" id="form_photo2"> + <input type="file" name="photo3" id="form_photo3"> + </div> [% END %] [% IF c.cobrand.moniker != 'emptyhomes' %] |