aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm2
-rw-r--r--templates/web/default/report/new/fill_in_details.html203
-rw-r--r--templates/web/default/report/new/fill_in_details_form.html208
-rw-r--r--templates/web/default/report/new/fill_in_details_text.html2
4 files changed, 211 insertions, 204 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 75bdff4a6..176f2fb3b 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -907,7 +907,7 @@ sub generate_map : Private {
( $c->stash->{latitude}, $c->stash->{longitude} );
# Don't do anything if the user skipped the map
- unless ( $c->req->param('skipped') ) {
+ if ( $c->stash->{report}->used_map ) {
$c->stash->{page} = 'new';
FixMyStreet::Map::display_map(
$c,
diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html
index 8150ba894..a9a113283 100644
--- a/templates/web/default/report/new/fill_in_details.html
+++ b/templates/web/default/report/new/fill_in_details.html
@@ -28,211 +28,10 @@
<div id="skipped-map">
[% END %]
-<h1>[% loc('Reporting a problem') %]</h1>
-
-[% IF report.used_map %]
- [% IF partial_token %]
- <p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
- [% END %]
-<p>[% loc('You have located the problem at the point marked with a purple pin on the map. If this is not the correct location, simply click on the map again. ') %]</p>
-[% END %]
-
-[% IF area_ids_to_list.size == 0 %]
- [% INCLUDE 'report/new/no_councils_text.html' %]
-[% ELSIF area_ids_to_list.size == all_councils.size %]
- [% INCLUDE 'report/new/all_councils_text.html' %]
-[% ELSE %]
- [% INCLUDE 'report/new/some_councils_text.html' %]
-[% END %]
-
-<p>
-[% IF skipped %]
- [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %]
-[% ELSE %]
- [% INCLUDE 'report/new/fill_in_details_text.html' %]
-[% END %]
-</p>
-
-[% INCLUDE 'errors.html' %]
-
-<div id="problem_form">
-
-[% INCLUDE 'report/new/form_heading.html' %]
-
-<div id="fieldset">
-
-
-
-
-
-[% IF field_errors.council %]
- <div class='form-error'>[% field_errors.council %]</div>
-[% END %]
-
-[% IF category_options.size %]
- [% IF field_errors.category %]
- <div class='form-error'>[% field_errors.category %]</div>
- [% END %]
-
- <div class="form-field">
- <label for="form_category">[% category_label | html %]</label>
- <select name="category" id="form_category">
- [%- FOREACH cat_op IN category_options %]
- <option value="[% cat_op | html %]"[% ' selected' IF report.category == cat_op %]>[% cat_op | html %]</option>
- [%- END %]
- </select>
- </div>
-[% END %]
-
-[% IF field_errors.title %]
- <div class='form-error'>[% field_errors.title %]</div>
-[% END %]
-
-<div class="form-field">
- <label for="form_title">[% loc('Subject:') %]</label>
- <input type="text" value="[% report.title | html %]" name="title" id="form_title" size="25">
-</div>
-
-[% IF field_errors.detail %]
- <div class='form-error'>[% field_errors.detail %]</div>
-[% END %]
-
-<div class="form-field">
- <label for="form_detail">[% loc('Details:') %]</label>
- <textarea name="detail" id="form_detail" rows="7" cols="26">[% report.detail | html %]</textarea>
-</div>
-
-[% IF c.cobrand.allow_photo_upload %]
- [% IF field_errors.photo %]
- <div class='form-error'>[% field_errors.photo %]</div>
- [% END %]
-
- <div class='form-field'>
- [% IF upload_fileid || report.photo %]
- <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p>
- [% IF upload_fileid %]
- <input type="hidden" name="upload_fileid" value="[% upload_fileid %]" />
- [% END %]
- [% IF report.photo %]
- <img align="right" src="/photo?id=[% report.id %]" hspace="5">
- [% END %]
- [% END %]
-
- <label for="form_photo">[% loc('Photo:') %]</label>
- <input type="file" name="photo" id="form_photo" style="width:20em">
- </div>
-[% END %]
-
-[% IF c.user_exists %]
-
- [% INCLUDE name_phone %]
-
- [% INCLUDE 'report/new/notes.html' %]
-
- <p id="problem_submit">
- <input type="submit" value="[% loc('Submit') %]">
- </p>
-
-[% ELSE %]
-
- [% IF field_errors.email %]
- <div class='form-error'>[% field_errors.email %]</div>
- [% END %]
-
- <div class="form-field">
- <label for="form_email">[% loc('Your email:') %]</label>
- <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" size="25">
- </div>
-
-[% INCLUDE 'report/new/notes.html' %]
-
-<div id="form_sign_in">
- <h3>[% loc("Now to submit your report&hellip; do you have a FixMyStreet password?") %]</h3>
-
- <div id="form_sign_in_yes">
-
- [% IF field_errors.password %]
- <div class='form-error'>[% field_errors.password %]</div>
- [% END %]
-
- <p>
- <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong>, I have a password:') %]</label>
- <input type="password" name="password_sign_in" id="password_sign_in" value="" size="25">
- </p>
-
- <p>
- <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
- <label class="n" for="remember_me">
- [% loc('Keep me signed in on this computer') %]
- </label>
- </p>
-
- <p>
- <input type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
- </p>
-
- </div>
- <div id="form_sign_in_no">
-
- <p>[% loc('<strong>No</strong>, let me confirm my report by email:') %]</p>
-
- <div id="fieldset">
-
- [% INCLUDE name_phone %]
-
- <div class="form-field">
- <label for="password_register">[% loc('Enter a new password:') %]</label>
- <input type="password" name="password_register" id="password_register" value="" size="25">
- </div>
- </div>
-
- <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p>
-
- <p>
- <input type="submit" name="submit_register" value="[% loc('Submit') %]">
- </p>
-
- </div>
-
-</div>
-
-[% END %]
-
-[% IF partial_token %]
- <input type="hidden" name="partial" value="[% partial_token.token %]">
-[% END %]
-
-<input type="hidden" name="submit_problem" value="1">
-
-</div>
-</div>
+[% PROCESS 'report/new/fill_in_details_form.html' %]
</div>
</form>
[% INCLUDE 'footer.html' %]
-[% BLOCK name_phone %]
- [% IF field_errors.name %]
- <div class='form-error'>[% field_errors.name %]</div>
- [% END %]
-
- <div class="form-field">
- <label for="form_name">[% loc('Your name:') %]</label>
- <input type="text" value="[% report.name | html %]" name="name" id="form_name" size="25">
- </div>
-
- <div class="checkbox">
- [%# if there is nothing in the name field then set check box as default on form %]
- <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous || !report.name %]>
- <label for="form_may_show_name">[% loc('Show my name publicly') %]</label>
- <br><small>[% loc('(we never show your email address or phone number)') %]</small>
- </div>
-
- <div>
- <label for="form_phone">[% loc('Phone:') %]</label>
- <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" size="15">
- <small>[% loc('(optional)') %]</small>
- </div>
-[% END %]
-
diff --git a/templates/web/default/report/new/fill_in_details_form.html b/templates/web/default/report/new/fill_in_details_form.html
new file mode 100644
index 000000000..d2609f400
--- /dev/null
+++ b/templates/web/default/report/new/fill_in_details_form.html
@@ -0,0 +1,208 @@
+<h1>[% loc('Reporting a problem') %]</h1>
+
+[% IF report.used_map %]
+ [% IF partial_token %]
+ <p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p>
+ [% END %]
+<p>[% loc('You have located the problem at the point marked with a purple pin on the map. If this is not the correct location, simply click on the map again. ') %]</p>
+[% END %]
+
+[% IF js %]
+ <p id="council_text">COUNCIL TEXT HERE</p>
+[% ELSE %]
+ [% IF area_ids_to_list.size == 0 %]
+ [% INCLUDE 'report/new/no_councils_text.html' %]
+ [% ELSIF area_ids_to_list.size == all_councils.size %]
+ [% INCLUDE 'report/new/all_councils_text.html' %]
+ [% ELSE %]
+ [% INCLUDE 'report/new/some_councils_text.html' %]
+ [% END %]
+[% END %]
+
+<p>
+[% IF report.used_map %]
+ [% INCLUDE 'report/new/fill_in_details_text.html' %]
+[% ELSE %]
+ [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %]
+[% END %]
+</p>
+
+[% INCLUDE 'errors.html' %]
+
+<div id="problem_form">
+
+[% INCLUDE 'report/new/form_heading.html' %]
+
+<div id="fieldset">
+
+
+
+
+
+[% IF field_errors.council %]
+ <div class='form-error'>[% field_errors.council %]</div>
+[% END %]
+
+[% IF category_options.size %]
+ [% IF field_errors.category %]
+ <div class='form-error'>[% field_errors.category %]</div>
+ [% END %]
+
+ <div class="form-field">
+ <label for="form_category">[% category_label | html %]</label>
+ <select name="category" id="form_category">
+ [%- FOREACH cat_op IN category_options %]
+ <option value="[% cat_op | html %]"[% ' selected' IF report.category == cat_op %]>[% cat_op | html %]</option>
+ [%- END %]
+ </select>
+ </div>
+[% END %]
+
+[% IF field_errors.title %]
+ <div class='form-error'>[% field_errors.title %]</div>
+[% END %]
+
+<div class="form-field">
+ <label for="form_title">[% loc('Subject:') %]</label>
+ <input type="text" value="[% report.title | html %]" name="title" id="form_title" size="25">
+</div>
+
+[% IF field_errors.detail %]
+ <div class='form-error'>[% field_errors.detail %]</div>
+[% END %]
+
+<div class="form-field">
+ <label for="form_detail">[% loc('Details:') %]</label>
+ <textarea name="detail" id="form_detail" rows="7" cols="26">[% report.detail | html %]</textarea>
+</div>
+
+[% IF c.cobrand.allow_photo_upload %]
+ [% IF field_errors.photo %]
+ <div class='form-error'>[% field_errors.photo %]</div>
+ [% END %]
+
+ <div class='form-field'>
+ [% IF upload_fileid || report.photo %]
+ <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p>
+ [% IF upload_fileid %]
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]" />
+ [% END %]
+ [% IF report.photo %]
+ <img align="right" src="/photo?id=[% report.id %]" hspace="5">
+ [% END %]
+ [% END %]
+
+ <label for="form_photo">[% loc('Photo:') %]</label>
+ <input type="file" name="photo" id="form_photo" style="width:20em">
+ </div>
+[% END %]
+
+[% IF c.user_exists %]
+
+ [% INCLUDE name_phone %]
+
+ [% INCLUDE 'report/new/notes.html' %]
+
+ <p id="problem_submit">
+ <input type="submit" value="[% loc('Submit') %]">
+ </p>
+
+[% ELSE %]
+
+ [% IF field_errors.email %]
+ <div class='form-error'>[% field_errors.email %]</div>
+ [% END %]
+
+ <div class="form-field">
+ <label for="form_email">[% loc('Your email:') %]</label>
+ <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" size="25">
+ </div>
+
+[% INCLUDE 'report/new/notes.html' %]
+
+<div id="form_sign_in">
+ <h3>[% loc("Now to submit your report&hellip; do you have a FixMyStreet password?") %]</h3>
+
+ <div id="form_sign_in_yes">
+
+ [% IF field_errors.password %]
+ <div class='form-error'>[% field_errors.password %]</div>
+ [% END %]
+
+ <p>
+ <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong>, I have a password:') %]</label>
+ <input type="password" name="password_sign_in" id="password_sign_in" value="" size="25">
+ </p>
+
+ <p>
+ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
+ <label class="n" for="remember_me">
+ [% loc('Keep me signed in on this computer') %]
+ </label>
+ </p>
+
+ <p>
+ <input type="submit" name="submit_sign_in" value="[% loc('Submit') %]">
+ </p>
+
+ </div>
+ <div id="form_sign_in_no">
+
+ <p>[% loc('<strong>No</strong>, let me confirm my report by email:') %]</p>
+
+ <div id="fieldset">
+
+ [% INCLUDE name_phone %]
+
+ <div class="form-field">
+ <label for="password_register">[% loc('Enter a new password:') %]</label>
+ <input type="password" name="password_register" id="password_register" value="" size="25">
+ </div>
+ </div>
+
+ <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p>
+
+ <p>
+ <input type="submit" name="submit_register" value="[% loc('Submit') %]">
+ </p>
+
+ </div>
+
+</div>
+
+[% END %]
+
+[% IF partial_token %]
+ <input type="hidden" name="partial" value="[% partial_token.token %]">
+[% END %]
+
+<input type="hidden" name="submit_problem" value="1">
+
+</div>
+</div>
+
+
+[% BLOCK name_phone %]
+ [% IF field_errors.name %]
+ <div class='form-error'>[% field_errors.name %]</div>
+ [% END %]
+
+ <div class="form-field">
+ <label for="form_name">[% loc('Your name:') %]</label>
+ <input type="text" value="[% report.name | html %]" name="name" id="form_name" size="25">
+ </div>
+
+ <div class="checkbox">
+ [%# if there is nothing in the name field then set check box as default on form %]
+ <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous || !report.name %]>
+ <label for="form_may_show_name">[% loc('Show my name publicly') %]</label>
+ <br><small>[% loc('(we never show your email address or phone number)') %]</small>
+ </div>
+
+ <div>
+ <label for="form_phone">[% loc('Phone:') %]</label>
+ <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" size="15">
+ <small>[% loc('(optional)') %]</small>
+ </div>
+[% END %]
+
diff --git a/templates/web/default/report/new/fill_in_details_text.html b/templates/web/default/report/new/fill_in_details_text.html
index 44c60ed6e..9ebb8107b 100644
--- a/templates/web/default/report/new/fill_in_details_text.html
+++ b/templates/web/default/report/new/fill_in_details_text.html
@@ -1,5 +1,5 @@
[%
- IF details != 'none';
+ IF area_ids_to_list.size != 0;
loc('Please fill in details of the problem below. The council won\'t be able
to help unless you leave as much detail as you can, so please describe the exact location of
the problem (e.g. on a wall), what it is, how long it has been there, a description (and a