aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm7
-rw-r--r--templates/web/zurich/report/new/fill_in_details_form.html136
2 files changed, 143 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index ba45a90ab..7759bb938 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -927,6 +927,13 @@ sub check_for_errors : Private {
%{ $c->stash->{report}->check_for_errors },
);
+ # Zurich, we don't care about title or name
+ # There is no title, and name is optional
+ if ( $c->cobrand->moniker eq 'zurich' ) {
+ delete $field_errors{title};
+ delete $field_errors{name};
+ }
+
# FIXME: need to check for required bromley fields here
# if they're got the login details wrong when signing in then
diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html
new file mode 100644
index 000000000..a4029c527
--- /dev/null
+++ b/templates/web/zurich/report/new/fill_in_details_form.html
@@ -0,0 +1,136 @@
+<div id="report-a-problem-main">
+ <h1>[% loc('Reporting a problem') %]</h1>
+
+ [% IF js %]
+ <p id="councils_text">
+ [%
+ tprintf(
+ loc('All the information you provide here will be sent to <strong>%s</strong>.'),
+ loc('the local council')
+ );
+ %]
+ [% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %]
+ </p>
+ [% ELSE %]
+ [% PROCESS 'report/new/councils_text.html' %]
+ [% END %]
+
+ <div id="report-a-problem-sidebar">
+ <!--
+ The text for this section needs checking, but I can't work out which bit comes from where
+ -->
+ <div class="sidebar-tips">
+ [% 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 green pin on the map. If this is not the correct location, simply click on the map again. ') %]</p>
+ [% 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>
+ </div>
+
+ <div class="sidebar-notes">
+ [% INCLUDE 'report/new/notes.html' %]
+ </div>
+
+ </div>
+
+ [% INCLUDE 'errors.html' %]
+ <fieldset>
+ <div id="problem_form">
+
+ [% INCLUDE 'report/new/form_heading.html' %]
+
+
+ [% IF field_errors.council %]
+ <p class='form-error'>[% field_errors.council %]</p>
+ [% END %]
+
+ <label for="form_detail">[% loc('Details') %]</label>
+ [% IF field_errors.detail %]
+ <p class='form-error'>[% field_errors.detail %]</p>
+ [% END %]
+ <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea>
+
+ [% IF js %]
+ <div id="form_category_row">
+ <label for="form_category">[% loc('Category') %]</label>
+ <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select>
+ </div>
+ [% ELSE %]
+ [% IF category_options.size %]
+ [% IF field_errors.category %]
+ <p class='form-error'>[% field_errors.category %]</p>
+ [% END %]
+
+ [% PROCESS "report/new/category.html" %]
+ [% END %]
+ [% END %]
+
+ [%- IF category_extras %]
+ [% PROCESS "report/new/category_extras.html" %]
+ [%- END %]
+
+ [% IF c.cobrand.allow_photo_upload %]
+ <label for="form_photo">[% loc('Photo') %]</label>
+ [% IF upload_fileid || report.photo %]
+ [% IF upload_fileid %]
+ <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt="">
+ <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
+ [% END %]
+
+ <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p>
+
+ [% IF report.photo %]
+ <img align="right" src="/photo/[% report.id %].jpeg">
+ [% END %]
+ [% END %]
+
+ [% IF field_errors.photo %]
+ <p class='form-error'>[% field_errors.photo %]</p>
+ [% END %]
+ <input type="file" name="photo" id="form_photo">
+ [% END %]
+
+ <label for="form_email">[% loc('Your email') %]</label>
+ [% IF field_errors.email %]
+ <p class='form-error'>[% field_errors.email %]</p>
+ [% END %]
+ <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required>
+
+ <!--
+ <div class="general-sidebar-notes">
+ <p class="dark">[% loc('We never show your email address or phone number.') %]</p>
+ </div>
+ -->
+
+ <label for="form_name">[% loc('Name') %] [% loc('(optional)') %]</label>
+ [% IF field_errors.name %]
+ <p class='form-error'>[% field_errors.name %]</p>
+ [% END %]
+ <input type="text" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]">
+
+ <label for="form_phone">[% loc('Phone number (optional)') %]</label>
+ <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]">
+
+ <div class="form-txt-submit-box">
+ [%# ID of submit_sign_in so name can be option, name of submit_register so it doesn't try and sign us in %]
+ <p><input class="green-btn" type="submit" id="submit_sign_in" name="submit_register" value="[% loc('Submit') %]">
+ </div>
+
+ </div>
+ </fieldset>
+
+ [% IF partial_token %]
+ <input type="hidden" name="partial" value="[% partial_token.token %]">
+ [% END %]
+
+ <input type="hidden" name="submit_problem" value="1">
+</div>