<commit_before>
<!DOCTYPE html>
<html class="no-js" lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
    <head>
        <th:block th:insert="fragments/layout :: head" th:with="pageTitle='Finance contact'" />
    </head>

    <body th:with="context='project'" class="project-detail finance-contact">
        <th:block th:insert="fragments/layout :: body-start" />
        <th:block th:insert="fragments/layout :: global-header" />

        <main id="content">
            <th:block th:insert="fragments/layout :: main-content-start" />
            <th:block th:insert="fragments/layout :: header-sub" th:with="linkTitle='Project details',linkClass='link-back',linkUrl=@{/project/{projectId}/details(projectId=${model.projectId})}" />

            <div class="page-title">
                <th:block th:insert="fragments/elements :: project-title (projectId=${model.app.id}, projectName=${model.projectName})" />
                <h1 class="heading-xlarge">Finance contact</h1>
            </div>

            <p>We will ask the finance contact to:</p>

            <ul class="list list-bullet">
                <li>provide bank details for your organisation</li>
                <li>confirm any queries we have with your project costs</li>
                <li>review the spend profile of your project costs</li>
            </ul>

            <form method="POST" th:action="@{/project/{projectId}/details/finance-contact(projectId=${model.projectId})}" th:object="${form}" novalidate="novalidate">
                <input type="hidden" th:field="*{organisation}" />

                <div class="form-group extra-margin" id="finance-contact-section" th:classappend="${#fields.hasErrors('*') ? 'error' : ''}">
                    <fieldset>
                        <legend>
                            <span class="heading-medium">Finance contact</span>
                            <th:block th:if="${#fields.hasErrors('*')}">
                               <span class="error-message" th:each="err : ${#fields.errors('*')}" th:text="${err}" />
                           </th:block>
                        </legend>

                        <p class="form-hint">Please select the person responsible for finances in your organisation</p>

                        <th:block th:each="user : ${model.organisationUsers}">
                            <label data-set-section-valid="#finance-contact-section" data-clear-inputs="#name-finance-contact,#email-finance-contact" th:for="${#ids.next('financeContact')}" class="block-label selection-button-radio">
                                <input type="radio" th:field="*{financeContact}" th:value="${user.id}" th:attr="data-required-errormessage=#{validation.financecontactform.financecontact.required}" required="required" />
                                <th:block th:text="${user.name}" />
                            </label>
                        </th:block>

                        <th:block th:each="user : ${model.invitedUsers}">
                            <label data-set-section-valid="#finance-contact-section" data-clear-inputs="#name-finance-contact,#email-finance-contact" th:for="${#ids.next('financeContact')}" class="block-label selection-button-radio">
                                <input type="radio" th:unless="${user == null or user.status != 'EXISTING'}" th:field="*{financeContact}" th:value="${user.id}" th:attr="data-required-errormessage=#{validation.financecontactform.financecontact.required}" required="required" />
                                <th:block th:text="${user.name}" />
                            </label>
                        </th:block>

                        <label for="new" class="block-label selection-button-radio" data-target="finance-contact-table" data-target-hide-error-messages="true">
                            <input id="new" name="financeContact" th:checked="${model.inviteAction} or *{financeContact == -1}" type="radio" value="-1" th:attr="data-required-errormessage=#{validation.financecontactform.financecontact.required}" required="required" />
                            Add new team member
                            <span class="form-hint">A new team member will be invited to join the project</span>
                        </label>

                        <div id="finance-contact-table" class="panel">
                            <table>
                                <thead>
                                <tr>
                                    <th scope="col" id="finance-contact-name">Name</th>
                                    <th scope="col" colspan="2" id="finance-contact-email">E-mail</th>
                                </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <label for="name-finance-contact" class="visuallyhidden">name</label>
                                            <input type="text" class="form-control width-full" th:value="*{name}" th:classappend="${#fields.hasErrors('name') ? 'field-error' : ''}" name="name" id="name-finance-contact" th:attr="data-required-errormessage=#{validation.project.invite.name.required}" required="required"/>
                                        </td>
                                        <td>
                                            <label for="email-finance-contact" class="visuallyhidden">email</label>
                                            <input type="email" class="form-control width-full" th:value="*{email}" th:classappend="${#fields.hasErrors('email') ? 'field-error' : ''}" name="email" id="email-finance-contact" th:attr="data-required-errormessage=#{validation.project.invite.email.required}" required="required"/>
                                        </td>
                                        <td class="alignright">
                                            <button class="buttonlink no-margin-bottom" name="invite_fc" id="invite-finance-contact">Invite to project</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </fieldset>
                </div>

                <p>If you add a new team member this section will show as pending until they have accepted. Once the team member has accepted and created their account, they will automatically be submitted as your finance contact.</p>

                <button class="button extra-margin" type="submit"  name="save_fc" id="save">Save finance contact</button>
            </form>



            <th:block th:insert="fragments/layout :: main-content-end" />
        </main>

        <th:block th:insert="fragments/layout :: footer" />
        <th:block th:insert="fragments/layout :: body-end" />
    </body>
</html><commit_msg>#4891-content replaced<commit_after>
<!DOCTYPE html>
<html class="no-js" lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
    <head>
        <th:block th:insert="fragments/layout :: head" th:with="pageTitle='Finance contact'" />
    </head>

    <body th:with="context='project'" class="project-detail finance-contact">
        <th:block th:insert="fragments/layout :: body-start" />
        <th:block th:insert="fragments/layout :: global-header" />

        <main id="content">
            <th:block th:insert="fragments/layout :: main-content-start" />
            <th:block th:insert="fragments/layout :: header-sub" th:with="linkTitle='Project details',linkClass='link-back',linkUrl=@{/project/{projectId}/details(projectId=${model.projectId})}" />

            <div class="page-title">
                <th:block th:insert="fragments/elements :: project-title (projectId=${model.app.id}, projectName=${model.projectName})" />
                <h1 class="heading-xlarge">Finance contact</h1>
            </div>

            <p>We will ask the finance contact to:</p>

            <ul class="list list-bullet">
                <li>provide bank details for your organisation</li>
                <li>confirm any queries we have with your project costs</li>
                <li>review the spend profile of your project costs</li>
            </ul>

            <form method="POST" th:action="@{/project/{projectId}/details/finance-contact(projectId=${model.projectId})}" th:object="${form}" novalidate="novalidate">
                <input type="hidden" th:field="*{organisation}" />

                <div class="form-group extra-margin" id="finance-contact-section" th:classappend="${#fields.hasErrors('*') ? 'error' : ''}">
                    <fieldset>
                        <legend>
                            <span class="heading-medium">Finance contact</span>
                            <th:block th:if="${#fields.hasErrors('*')}">
                               <span class="error-message" th:each="err : ${#fields.errors('*')}" th:text="${err}" />
                           </th:block>
                        </legend>

                        <p class="form-hint">Please select the person responsible for finances in your organisation</p>

                        <th:block th:each="user : ${model.organisationUsers}">
                            <label data-set-section-valid="#finance-contact-section" data-clear-inputs="#name-finance-contact,#email-finance-contact" th:for="${#ids.next('financeContact')}" class="block-label selection-button-radio">
                                <input type="radio" th:field="*{financeContact}" th:value="${user.id}" th:attr="data-required-errormessage=#{validation.financecontactform.financecontact.required}" required="required" />
                                <th:block th:text="${user.name}" />
                            </label>
                        </th:block>

                        <th:block th:each="user : ${model.invitedUsers}">
                            <label data-set-section-valid="#finance-contact-section" data-clear-inputs="#name-finance-contact,#email-finance-contact" th:for="${#ids.next('financeContact')}" class="block-label selection-button-radio">
                                <input type="radio" th:unless="${user == null or user.status != 'EXISTING'}" th:field="*{financeContact}" th:value="${user.id}" th:attr="data-required-errormessage=#{validation.financecontactform.financecontact.required}" required="required" />
                                <th:block th:text="${user.name}" />
                            </label>
                        </th:block>

                        <label for="new" class="block-label selection-button-radio" data-target="finance-contact-table" data-target-hide-error-messages="true">
                            <input id="new" name="financeContact" th:checked="${model.inviteAction} or *{financeContact == -1}" type="radio" value="-1" th:attr="data-required-errormessage=#{validation.financecontactform.financecontact.required}" required="required" />
                            Add new team member
                            <span class="form-hint">A new team member will be invited to join the project</span>
                        </label>

                        <div id="finance-contact-table" class="panel">
                            <table>
                                <thead>
                                <tr>
                                    <th scope="col" id="finance-contact-name">Name</th>
                                    <th scope="col" colspan="2" id="finance-contact-email">E-mail</th>
                                </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <label for="name-finance-contact" class="visuallyhidden">name</label>
                                            <input type="text" class="form-control width-full" th:value="*{name}" th:classappend="${#fields.hasErrors('name') ? 'field-error' : ''}" name="name" id="name-finance-contact" th:attr="data-required-errormessage=#{validation.project.invite.name.required}" required="required"/>
                                        </td>
                                        <td>
                                            <label for="email-finance-contact" class="visuallyhidden">email</label>
                                            <input type="email" class="form-control width-full" th:value="*{email}" th:classappend="${#fields.hasErrors('email') ? 'field-error' : ''}" name="email" id="email-finance-contact" th:attr="data-required-errormessage=#{validation.project.invite.email.required}" required="required"/>
                                        </td>
                                        <td class="alignright">
                                            <button class="buttonlink no-margin-bottom" name="invite_fc" id="invite-finance-contact">Invite to project</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </fieldset>
                </div>

                <p>If you add a new team member this section will show as pending until they have registered. Once they have registered you can assign the roles to them.</p>

                <button class="button extra-margin" type="submit"  name="save_fc" id="save">Save finance contact</button>
            </form>



            <th:block th:insert="fragments/layout :: main-content-end" />
        </main>

        <th:block th:insert="fragments/layout :: footer" />
        <th:block th:insert="fragments/layout :: body-end" />
    </body>
</html>
{'fraction_non_alphanumeric': 0.14834847829222558, 'fraction_numerical': 0.0017308524448290783, 'mean_word_length': 1.7313374039787275, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 0, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 44, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3408576', 'n_tokens_mistral': 3554, 'n_tokens_neox': 3405, 'n_words': 626}