<commit_before><!DOCTYPE html>
<html lang="en" class="govuk-template" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:with="applicationName=${#strings.isEmpty(model.applicationName)} ? #{ifs.application.no_title} : ${model.applicationName}">
        <th:block th:insert="fragments/layout :: head"
                  th:with="pageTitle=${model.questionName} + ' - ' + ${applicationName},hasFormErrors=${#fields.hasErrors('${form.*}')}" />
    </th:block>
</head>
<body class="govuk-template__body">
<th:block th:insert="fragments/modals :: modal-overlay"/>
<th:block th:insert="fragments/layout :: body-start"/>
<th:block th:insert="fragments/layout :: global-header"/>

<div class="govuk-width-container">
    <th:block th:insert="fragments/layout :: phase-banner"/>

    <th:block th:insert="fragments/layout :: header-sub"
              th:with="linkTitle='Back to application overview',linkClass='link-back',linkUrl=@{/application/{applicationId}(applicationId=${model.applicationId})}"/>

    <main class="govuk-main-wrapper" id="main-content" role="main">

        <div th:if="${#fields.hasErrors('${form.*}')}" class="govuk-error-summary"
             aria-labelledby="error-summary-title"
             role="alert"
             tabindex="-1"
             data-module="govuk-error-summary">
            <h2 class="govuk-error-summary__title" id="error-summary-title">There is a problem</h2>
            <th:block th:insert="fragments/elements :: error-summary-list(form)"/>
        </div>

        <th:block
            th:with="applicationName=${#strings.isEmpty(model.applicationName)} ? #{ifs.application.no_title} : ${model.applicationName}">
            <th:block th:insert="fragments/layout :: page-title"
                      th:with="pageTitle=${model.questionName},subTitle=${applicationName},size='govuk-heading-xl'"/>
        </th:block>

        <th:block th:if="${model.complete}">
            <div class="success-alert assignee govuk-!-margin-bottom-6">
                <p class="govuk-body">This question is marked as complete.</p>
            </div>
        </th:block>

        <th:block th:unless="${!model.open or model.complete or model.singleApplicant}"
                  th:with="assignee=${model.assignButtonsViewModel.assignedToCurrentUser ? 'you' : model.assignButtonsViewModel.assigneeUserName}">
            <div class="assigned-alert govuk-!-margin-bottom-6">
                <p class="govuk-body">This question is assigned to
                    <th:block th:text="${assignee}"/>.
                    <a th:if="${model.assignButtonsViewModel.currentUserIsLead and !model.assignButtonsViewModel.hideAssignButtons}"
                       th:href="@{/application/{applicationId}/form/question/{questionId}/assign(applicationId=${model.applicationId},questionId=${model.questionId})}"
                       class="govuk-link">Assign to someone else.</a>
                </p>
            </div>
        </th:block>

        <div th:classappend="${model.readOnly and model.multipleChoiceOptionsActive} ? 'clear-floats'">
            <div th:classappend="${model.readOnly and model.multipleChoiceOptionsActive} ? 'govuk-grid-row govuk-!-margin-top-6'">
                <div th:classappend="${model.readOnly and model.multipleChoiceOptionsActive} ? 'govuk-grid-column-one-half'">
                    <h3 class="govuk-heading-s">
                        <th:block th:if="${model.shouldDisplayQuestionNumber()}" th:text="|${model.questionNumber}. |">1</th:block>
                        <th:block th:text="${model.questionSubtitle}">Project team</th:block>
                    </h3>
                </div>
                <div class="govuk-grid-column-one-half alignleft" th:if="${model.readOnly and model.multipleChoiceOptionsActive}">
                    <p class="govuk-body" th:text="${model.selectedMultipleChoiceOption?.text ?: 'Question not answered.'}">Answer</p>
                </div>
            </div>
        </div>

        <th:block th:unless="${model.readOnly}">
            <div class="govuk-hint wysiwyg-styles" th:if="${model.questionDescription != null}" ifs:utext="${model.questionDescription}"/>
            <div class="govuk-hint wysiwyg-styles" th:if="${model.questionDescription2 != null}" ifs:utext="${model.questionDescription2}"/>
            <div th:if="${model.questionType == model.getLoansBusinessAndFinancialInformation()}">
               <div th:if="${model.isLoansPartBEnabled()}">
                   <a class="govuk-button"
                      th:href="@{${model.getLoansQuestionsFormSalesForceURL()}}" value="open-salesforce"
                      type="Continue">Continue</a>
               </div>
                <div th:unless="${model.isLoansPartBEnabled()}">
                    <a class="govuk-link"
                       target="_blank"
                       th:href="@{https://innovateuk.eu.qualtrics.com/jfe/form/SV_8JtoEompki2GcUS(
                    CompanyName=${model.leadOrganisationName},
                    CompanyNumber=${model.leadOrganisationCompaniesHouseNumber},
                    IFSApplicationNumber=${model.applicationId})}">Complete the online business survey (opens in a new window)</a>
                </div>
            </div>
            <details th:unless="${#strings.isEmpty(model.questionGuidance)}" class="govuk-details" role="group">
                <summary th:unless="${#strings.isEmpty(model.questionGuidanceTitle)}" class="govuk-details__summary">
                    <span class="govuk-details__summary-text" th:text="${model.questionGuidanceTitle}">What should I include in the project public description?</span>
                </summary>
                <div th:unless="${#strings.isEmpty(model.questionGuidance)}" class="govuk-details__text wysiwyg-styles"
                     ifs:utext="${model.questionGuidance}">Guidance
                </div>
            </details>
        </th:block>

        <th:block th:if="${model.complete and  (model.questionType == model.getLoansBusinessAndFinancialInformation())}">
            <div class="govuk-hint wysiwyg-styles" th:if="${model.questionDescription != null}"
                 ifs:utext="${model.questionDescription}"/>
            <div class="govuk-hint wysiwyg-styles">
                <p><strong>Edit the online business survey</strong></p>
                <p>At any stage, you can return here to carry on editing incomplete form.</p>
            </div>
            <div>
                <a class="govuk-button"
                   target="_blank"
                   th:href="@{${model.getLoansQuestionsFormSalesForceURL()}}" value="open-salesforce"
                   type="Continue">Continue (opens in new tab)</a>
            </div>
        </th:block>

        <form th:action="@{${#ifsUtil.formPostUri(#httpServletRequest)}}" th:object="${form}" novalidate="novalidate"
              data-autosave="autosaveFormPost" enctype="multipart/form-data"
              method="post">

            <th:block th:unless="${model.readOnly}">
                <button class="hidden-save" type="submit" tabindex="-1" aria-hidden="true">Save</button>
                <input type="hidden" th:field="${model.textAreaActive}" />
                <input type="hidden" th:field="${model.multipleChoiceOptionsActive}" />
            </th:block>

            <th:block th:unless="${model.isLoansPartBEnabled() and (model.questionType == model.getLoansBusinessAndFinancialInformation())}">
                <div class="govuk-form-group" th:if="${model.textAreaActive}"
                 th:classappend="${#fields.hasErrors('answer')} ? 'govuk-form-group--error'"><commit_msg>IFS-10761: Html template updated<commit_after><!DOCTYPE html>
<html lang="en" class="govuk-template" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:with="applicationName=${#strings.isEmpty(model.applicationName)} ? #{ifs.application.no_title} : ${model.applicationName}">
        <th:block th:insert="fragments/layout :: head"
                  th:with="pageTitle=${model.questionName} + ' - ' + ${applicationName},hasFormErrors=${#fields.hasErrors('${form.*}')}" />
    </th:block>
</head>
<body class="govuk-template__body">
<th:block th:insert="fragments/modals :: modal-overlay"/>
<th:block th:insert="fragments/layout :: body-start"/>
<th:block th:insert="fragments/layout :: global-header"/>

<div class="govuk-width-container">
    <th:block th:insert="fragments/layout :: phase-banner"/>

    <th:block th:insert="fragments/layout :: header-sub"
              th:with="linkTitle='Back to application overview',linkClass='link-back',linkUrl=@{/application/{applicationId}(applicationId=${model.applicationId})}"/>

    <main class="govuk-main-wrapper" id="main-content" role="main">

        <div th:if="${#fields.hasErrors('${form.*}')}" class="govuk-error-summary"
             aria-labelledby="error-summary-title"
             role="alert"
             tabindex="-1"
             data-module="govuk-error-summary">
            <h2 class="govuk-error-summary__title" id="error-summary-title">There is a problem</h2>
            <th:block th:insert="fragments/elements :: error-summary-list(form)"/>
        </div>

        <th:block
            th:with="applicationName=${#strings.isEmpty(model.applicationName)} ? #{ifs.application.no_title} : ${model.applicationName}">
            <th:block th:insert="fragments/layout :: page-title"
                      th:with="pageTitle=${model.questionName},subTitle=${applicationName},size='govuk-heading-xl'"/>
        </th:block>

        <th:block th:if="${model.complete}">
            <div class="success-alert assignee govuk-!-margin-bottom-6">
                <p class="govuk-body">This question is marked as complete.</p>
            </div>
        </th:block>

        <th:block th:unless="${!model.open or model.complete or model.singleApplicant}"
                  th:with="assignee=${model.assignButtonsViewModel.assignedToCurrentUser ? 'you' : model.assignButtonsViewModel.assigneeUserName}">
            <div class="assigned-alert govuk-!-margin-bottom-6">
                <p class="govuk-body">This question is assigned to
                    <th:block th:text="${assignee}"/>.
                    <a th:if="${model.assignButtonsViewModel.currentUserIsLead and !model.assignButtonsViewModel.hideAssignButtons}"
                       th:href="@{/application/{applicationId}/form/question/{questionId}/assign(applicationId=${model.applicationId},questionId=${model.questionId})}"
                       class="govuk-link">Assign to someone else.</a>
                </p>
            </div>
        </th:block>

        <div th:classappend="${model.readOnly and model.multipleChoiceOptionsActive} ? 'clear-floats'">
            <div th:classappend="${model.readOnly and model.multipleChoiceOptionsActive} ? 'govuk-grid-row govuk-!-margin-top-6'">
                <div th:classappend="${model.readOnly and model.multipleChoiceOptionsActive} ? 'govuk-grid-column-one-half'">
                    <h3 class="govuk-heading-s">
                        <th:block th:if="${model.shouldDisplayQuestionNumber()}" th:text="|${model.questionNumber}. |">1</th:block>
                        <th:block th:text="${model.questionSubtitle}">Project team</th:block>
                    </h3>
                </div>
                <div class="govuk-grid-column-one-half alignleft" th:if="${model.readOnly and model.multipleChoiceOptionsActive}">
                    <p class="govuk-body" th:text="${model.selectedMultipleChoiceOption?.text ?: 'Question not answered.'}">Answer</p>
                </div>
            </div>
        </div>

        <th:block th:unless="${model.readOnly}">
            <div class="govuk-hint wysiwyg-styles" th:if="${model.questionDescription != null}" ifs:utext="${model.questionDescription}"/>
            <div class="govuk-hint wysiwyg-styles" th:if="${model.questionDescription2 != null}" ifs:utext="${model.questionDescription2}"/>
            <div th:if="${model.questionType == model.getLoansBusinessAndFinancialInformation()}">
               <div th:if="${model.isLoansPartBEnabled()}">
                   <a class="govuk-button"
                      th:href="@{${model.getLoansQuestionsFormSalesForceURL()}}" value="open-salesforce"
                      type="Continue">Continue</a>
               </div>
                <div th:unless="${model.isLoansPartBEnabled()}">
                    <a class="govuk-link"
                       target="_blank"
                       th:href="@{https://innovateuk.eu.qualtrics.com/jfe/form/SV_8JtoEompki2GcUS(
                    CompanyName=${model.leadOrganisationName},
                    CompanyNumber=${model.leadOrganisationCompaniesHouseNumber},
                    IFSApplicationNumber=${model.applicationId})}">Complete the online business survey (opens in a new window)</a>
                </div>
            </div>
            <details th:unless="${#strings.isEmpty(model.questionGuidance)}" class="govuk-details" role="group">
                <summary th:unless="${#strings.isEmpty(model.questionGuidanceTitle)}" class="govuk-details__summary">
                    <span class="govuk-details__summary-text" th:text="${model.questionGuidanceTitle}">What should I include in the project public description?</span>
                </summary>
                <div th:unless="${#strings.isEmpty(model.questionGuidance)}" class="govuk-details__text wysiwyg-styles"
                     ifs:utext="${model.questionGuidance}">Guidance
                </div>
            </details>
        </th:block>

        <th:block th:if="${model.complete and  (model.questionType == model.getLoansBusinessAndFinancialInformation())}">
            <div class="govuk-hint wysiwyg-styles" th:if="${model.questionDescription != null}"
                 ifs:utext="${model.questionDescription}"/>
            <div class="govuk-hint wysiwyg-styles">
                <p><strong>Edit the online business survey</strong></p>
                <p>At any stage, you can return here to carry on editing incomplete form.</p>
            </div>
            <div>
                <a class="govuk-button"
                   target="_blank"
                   th:href="@{${model.getLoansQuestionsFormSalesForceURL()}}" value="open-salesforce"
                   type="Continue">Continue</a>
            </div>
        </th:block>

        <form th:action="@{${#ifsUtil.formPostUri(#httpServletRequest)}}" th:object="${form}" novalidate="novalidate"
              data-autosave="autosaveFormPost" enctype="multipart/form-data"
              method="post">

            <th:block th:unless="${model.readOnly}">
                <button class="hidden-save" type="submit" tabindex="-1" aria-hidden="true">Save</button>
                <input type="hidden" th:field="${model.textAreaActive}" />
                <input type="hidden" th:field="${model.multipleChoiceOptionsActive}" />
            </th:block>

            <th:block th:unless="${model.isLoansPartBEnabled() and (model.questionType == model.getLoansBusinessAndFinancialInformation())}">
                <div class="govuk-form-group" th:if="${model.textAreaActive}"
                 th:classappend="${#fields.hasErrors('answer')} ? 'govuk-form-group--error'">
{'fraction_non_alphanumeric': 0.16243122871364946, 'fraction_numerical': 0.002161383285302594, 'mean_word_length': 2.6890553273737616, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 0, '>': 203, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '1225425', 'n_tokens_mistral': 4415, 'n_tokens_neox': 4206, 'n_words': 616}