<commit_before>[% 
    PROCESS "maps/${map.type}.html";

    problem_title = problem.title _ ' - ' _ loc('Viewing a problem') | html;
    INCLUDE 'header.html'
        title = problem_title
        rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ]
        robots = 'index, nofollow'
        bodyclass = 'mappage'
%]

[% map_html %]

</div>


[% IF banner.id %]
    <div class="banner">
        <p id="[% banner.id %]">[% banner.text %]</p>
    </div>
[% END %]

[% INCLUDE 'report/_main.html' %]

<div class="shadow-wrap">
    <ul id="key-tools">
        <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
        <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
        <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
    </ul>

<div id="report-updates-data" class="hidden-js">
    <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
        <p><a href="[% c.uri_for( '/rss', problem.id ) %]">
            <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float: right">
        </a></p>
        <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
        <fieldset>
        <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
        <div class="form-txt-submit-box">
            <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
            <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
        </div>
        <input type="hidden" name="id" value="[% problem.id %]">
        <input type="hidden" name="type" value="updates">
        </fieldset>
    </form>
</div>

</div>

[% INCLUDE 'report/updates.html' %]

<div id="update_form">
    <h2>[% loc( 'Provide an update') %]</h2>

    [% IF c.cobrand.moniker != 'emptyhomes' %]
    <div class="general-sidebar-notes">
        <p>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p>
    </div>
    [% END %]

    [% INCLUDE 'errors.html' %]

    <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
        <fieldset>
            <input type="hidden" name="submit_update" value="1">
            <input type="hidden" name="id" value="[% problem.id | html %]">

            <label for="form_update">[% loc( 'Update' ) %]</label>
            [% IF field_errors.update %]
                <div class='form-error'>[% field_errors.update %]</div>
            [% END %]
            <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>

            [% IF c.user && c.user.belongs_to_council( problem.council ) %]
                <label for="form_state">[% loc( 'State' ) %]</label>
                <select name="state" id="form_state">
                [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
                loc('Investigating')], ['planned', loc('Planned')], ['in progress',
                loc('In Progress')], ['closed', loc('Closed')], ['fixed', loc('Fixed')] ] %]
                    <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
                [% END %]
                </select>
            [% ELSE %]
                [% IF problem.is_fixed AND c.user_exists AND c.user.id == problem.user_id %]
                
                <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
                <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
                
                [% ELSIF !problem.is_fixed %]
                
                <div class="checkbox-group">
                    <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
                    <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
                </div>

                [% END %]
            [% END %]

        [% IF c.cobrand.allow_photo_upload %]
            <div 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 update, attaching another one will replace it.') %]</p>
                <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
            [% END %]
                <label for="form_photo">[% loc('Photo') %]</label>
                [% IF field_errors.photo %]
                    <p class='form-error'>[% field_errors.photo %]</p>
                [% END %]
                <input type="file" name="photo" id="form_photo">
            </div>
        [% END %]

        [% IF c.user_exists %]

            [% INCLUDE name %]
            
            <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
                

        [% ELSE %]

            <label for="form_rznvy">[% loc('Email' ) %]</label>
            [% IF field_errors.email %]
                <p class='form-error'>[% field_errors.email %]</p>
            [% END %]
            <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>

            <div id="form_sign_in">
                <h3>[% loc("Now to submit your update&hellip;") %]</h3>
                <h2>[% loc("Do you have a FixMyStreet password?") %]</h2>

                <div id="form_sign_in_yes" class="form-box">
                    <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>

                    <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
                    [% IF field_errors.password %]
                        <p class='form-error'>[% field_errors.password %]</p>
                    [% END %]
                    <div class="form-txt-submit-box">
                        <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
                        <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
                    </div>

                    <div class="checkbox-group">
                        <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
                        <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
                    </div>
                </div>
                <div id="form_sign_in_no" class="form-box">
                    <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>

                    [% INCLUDE name %]
                    
                    <label for="password_register">[% loc('Password (optional)') %]</label>

                    <div class="form-txt-submit-box">
                        <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
                        <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
                    </div>
                </div>
            </div>

        [% END %]
        </fieldset>
    </form>
</div>



[% INCLUDE 'footer.html' %]

[% BLOCK name %]
    <label for="form_name">[% loc('Name') %]</label>
    [% IF field_errors.name %]
        <p class='form-error'>[% field_errors.name %]</p>
    [% END %]
    <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">

    <div class="general-sidebar-notes">
        <p class="dark">[% loc('We never show your email') %]</p>
        <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
    </div>

    <div class="checkbox-group">
        <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' UNLESS update.anonymous %]>
        <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
    </div>
    <div class="checkbox-group">
        <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
        <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
    </div>
[% END %]
<commit_msg>Move password help to where it won't be shown when logged in. Fixes #278.<commit_after>[% 
    PROCESS "maps/${map.type}.html";

    problem_title = problem.title _ ' - ' _ loc('Viewing a problem') | html;
    INCLUDE 'header.html'
        title = problem_title
        rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ]
        robots = 'index, nofollow'
        bodyclass = 'mappage'
%]

[% map_html %]

</div>


[% IF banner.id %]
    <div class="banner">
        <p id="[% banner.id %]">[% banner.text %]</p>
    </div>
[% END %]

[% INCLUDE 'report/_main.html' %]

<div class="shadow-wrap">
    <ul id="key-tools">
        <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
        <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
        <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
    </ul>

<div id="report-updates-data" class="hidden-js">
    <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
        <p><a href="[% c.uri_for( '/rss', problem.id ) %]">
            <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float: right">
        </a></p>
        <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
        <fieldset>
        <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
        <div class="form-txt-submit-box">
            <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
            <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
        </div>
        <input type="hidden" name="id" value="[% problem.id %]">
        <input type="hidden" name="type" value="updates">
        </fieldset>
    </form>
</div>

</div>

[% INCLUDE 'report/updates.html' %]

<div id="update_form">
    <h2>[% loc( 'Provide an update') %]</h2>

    [% IF c.cobrand.moniker != 'emptyhomes' %]
    <div class="general-sidebar-notes">
        <p>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</p>
    </div>
    [% END %]

    [% INCLUDE 'errors.html' %]

    <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
        <fieldset>
            <input type="hidden" name="submit_update" value="1">
            <input type="hidden" name="id" value="[% problem.id | html %]">

            <label for="form_update">[% loc( 'Update' ) %]</label>
            [% IF field_errors.update %]
                <div class='form-error'>[% field_errors.update %]</div>
            [% END %]
            <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>

            [% IF c.user && c.user.belongs_to_council( problem.council ) %]
                <label for="form_state">[% loc( 'State' ) %]</label>
                <select name="state" id="form_state">
                [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
                loc('Investigating')], ['planned', loc('Planned')], ['in progress',
                loc('In Progress')], ['closed', loc('Closed')], ['fixed', loc('Fixed')] ] %]
                    <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
                [% END %]
                </select>
            [% ELSE %]
                [% IF problem.is_fixed AND c.user_exists AND c.user.id == problem.user_id %]
                
                <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
                <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
                
                [% ELSIF !problem.is_fixed %]
                
                <div class="checkbox-group">
                    <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
                    <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
                </div>

                [% END %]
            [% END %]

        [% IF c.cobrand.allow_photo_upload %]
            <div 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 update, attaching another one will replace it.') %]</p>
                <input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
            [% END %]
                <label for="form_photo">[% loc('Photo') %]</label>
                [% IF field_errors.photo %]
                    <p class='form-error'>[% field_errors.photo %]</p>
                [% END %]
                <input type="file" name="photo" id="form_photo">
            </div>
        [% END %]

        [% IF c.user_exists %]

            [% INCLUDE name %]
            
            <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
                

        [% ELSE %]

            <label for="form_rznvy">[% loc('Email' ) %]</label>
            [% IF field_errors.email %]
                <p class='form-error'>[% field_errors.email %]</p>
            [% END %]
            <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>

            <div id="form_sign_in">
                <h3>[% loc("Now to submit your update&hellip;") %]</h3>
                <h2>[% loc("Do you have a FixMyStreet password?") %]</h2>

                <div id="form_sign_in_yes" class="form-box">
                    <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>

                    <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
                    [% IF field_errors.password %]
                        <p class='form-error'>[% field_errors.password %]</p>
                    [% END %]
                    <div class="form-txt-submit-box">
                        <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
                        <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
                    </div>

                    <div class="checkbox-group">
                        <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
                        <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
                    </div>
                </div>
                <div id="form_sign_in_no" class="form-box">
                    <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>

                    [% INCLUDE name %]
                    
                    <div class="general-sidebar-notes">
                        <p class="dark">[% loc('We never show your email') %]</p>
                        <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
                    </div>

                    <label for="password_register">[% loc('Password (optional)') %]</label>

                    <div class="form-txt-submit-box">
                        <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
                        <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
                    </div>
                </div>
            </div>

        [% END %]
        </fieldset>
    </form>
</div>



[% INCLUDE 'footer.html' %]

[% BLOCK name %]
    <label for="form_name">[% loc('Name') %]</label>
    [% IF field_errors.name %]
        <p class='form-error'>[% field_errors.name %]</p>
    [% END %]
    <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">

    <div class="checkbox-group">
        <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' UNLESS update.anonymous %]>
        <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
    </div>
    <div class="checkbox-group">
        <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
        <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
    </div>
[% END %]

{'fraction_non_alphanumeric': 0.19121888687106078, 'fraction_numerical': 0.0032581989103728235, 'mean_word_length': 2.2698218651763886, 'pattern_counts': {'":': 0, '<': 309, '<?xml version=': 0, '>': 317, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7549375', 'n_tokens_mistral': 6221, 'n_tokens_neox': 5893, 'n_words': 1371}