aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/report/update-form.html
blob: 97e0df779754fc13a2d210f56a2c8af735948a1c (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
[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
[% RETURN IF NOT allow_creation %]

<div id="update_form">
  [% IF NOT login_success AND NOT oauth_need_email %]
    <h2>[% loc( 'Provide an update') %]</h2>

    [% IF c.cobrand.moniker != 'stevenage' %]
    <div class="general-notes">
        [% INCLUDE 'report/updates-sidebar-notes.html' %]
    </div>
    [% END %]
  [% END %]

    [% INCLUDE 'errors.html' %]

    <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
        <input type="hidden" name="token" value="[% csrf_token %]">
        <fieldset>
          [% IF NOT login_success AND NOT oauth_need_email %]
            [% INCLUDE 'report/update/form_update.html' %]
          [% END %]
          [% IF c.user_exists %]
            [% INCLUDE 'report/update/form_name.html' %]
            <div class="clearfix"><input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]"></div>
          [% ELSIF oauth_need_email %]
            [% INCLUDE 'report/update/form_user_loggedout_email.html' required = 1 %]
            <div id="form_sign_in">
                <h3>[% loc("Now to submit your update&hellip;") %]</h3>
                <h2>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h2>
                [% INCLUDE 'report/update/form_user_loggedout_by_email.html' %]
                [% INCLUDE 'report/update/form_user_loggedout_password.html' %]
                <input type="hidden" name="oauth_need_email" value="1">
            </div>
          [% ELSE %]
            [% INCLUDE 'report/update/form_user_loggedout.html' %]
          [% END %]
          [% IF login_success OR oauth_need_email %]
            [% INCLUDE 'report/update/form_update.html' %]
          [% END %]
        </fieldset>
    </form>
</div>