<commit_before>@(currentForm: Form[models.domain.Declaration])(implicit claim: models.domain.Claim, lang: Lang, request: Request[AnyContent])

@import views.html.helper._
@import utils.helpers.CarersCrypto
@import views.html.helper.base._
@import play.api.i18n.{MMessages => Messages}
@import controllers.Mappings.yes
@import models.domain.Employment
@import models.domain.AboutOtherMoney
@import utils.helpers.CarersTemplate._

@main(Messages("s11.g4") + " - " + Messages("s11.longName"), Some(currentForm), claim.completedQuestionGroups(models.domain.Declaration)) {
    @form(action = controllers.s11_consent_and_declaration.routes.G4Declaration.submit) {

       <input type="hidden" id="js" name="jsEnabled" value="false">

       <div class="form-wrap">
        <fieldset class="form-elements">
           <legend>@Html(Messages("s11.g2"))</legend>

           <ul class="group">

               @if(claim.questionGroup[Employment].getOrElse(Employment()).beenEmployedSince6MonthsBeforeClaim == `yes` ||
                       claim.questionGroup[AboutOtherMoney].getOrElse(AboutOtherMoney()).statutorySickPay.answer == `yes` ||
                       claim.questionGroup[AboutOtherMoney].getOrElse(AboutOtherMoney()).otherStatutoryPay.answer == `yes`){

                   @yesNoRadioGroup(currentForm("gettingInformationFromAnyEmployer.informationFromEmployer"))

                   @otherDetailPlaceHolder(
                       inputDef = Seq(carersInputTextArea(currentForm("gettingInformationFromAnyEmployer.why"), 'placeholder->Messages("why_placeholder"),'textAreaHelper -> Html(Messages("300charsLeft")), 'maxLength -> 300 )),
                       'id->"whyWrapper"
                   )
               }

               @yesNoRadioGroup(currentForm("tellUsWhyEmployer.informationFromPerson"))

               @otherDetailPlaceHolder(
                   inputDef = Seq(carersInputTextArea(currentForm("tellUsWhyEmployer.whyPerson"), 'placeholder->Messages("why_placeholder"),'textAreaHelper -> Html(Messages("300charsLeft")), 'maxLength -> 300 )),
                   'id->"whyPersonWrapper"
               )
           </ul>
        </fieldset>
        <fieldset class="form-elements">
            <legend>@Html(Messages("s11.g4"))</legend>

            <section class="dec">
                    <h3>@Html(Messages("declaration.title"))</h3>

                <ul>
                    <li>@Html(Messages("declaration.1a")) <a href="/internal-claim-notes/@lang.code" target="_blank" @views.html.ga.trackClickEvent(linkName = "Claim Notes")>@Html(Messages("declaration.1b"))</a> @Html(Messages("declaration.1c"))</li>
                    <li>@Html(Messages("declaration.2"))</li>
                    <li>@Html(Messages("declaration.3"))</li>
                    <li>@Html(Messages("declaration.4"))</li>
                </ul>
            </section>

             @declareCheckPlaceholder(currentForm("someoneElse"))

             <ul class="form-elements">
                 @otherDetailPlaceHolder(
                    inputDef = Seq(carersInputText(currentForm("nameOrOrganisation"))(utils.helpers.CarersTemplate.fieldConstructor,lang)),
                    'id -> "nameOrOrgWrapper",
                    'display -> currentForm("someoneElse").value.map(p => p match{ case "true" => "yes" case _ => p}).getOrElse("no")
                 )

             </ul>
             
             @declareCheckPlaceholder(currentForm("confirm"),'secondary->true)
             
        </fieldset>

        <nav class="form-steps">
            <ul>
            	<li><button type="submit" name="action" value="next" class="button" @views.html.ga.trackSubmit(true)>@Html(Messages("form.submitClaim"))</button></li>
            	<li><a id="backButton" href="@claim.navigation.previous">@Html(Messages("form.back"))</a></li>
            </ul>
        </nav>
       </div>
    }
<script type="text/javascript" src='@controllers.routes.Assets.at("javascripts/s11_consent_and_declaration/g4_declaration.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/textAreaCounter.js")'></script>

<script type="text/javascript">
    $(function(){
        window.areaCounter({selector:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_why")",maxChars:300});
        window.areaCounter({selector:"@CarersCrypto.encryptAES("tellUsWhyEmployer_whyPerson")",maxChars:300});
    })
    $(function() {
        window.initEvents({
            informationFromEmployerY:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_informationFromEmployer_yes")",
            informationFromEmployerN:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_informationFromEmployer_no")",
            informationFromPersonY:"@CarersCrypto.encryptAES("tellUsWhyEmployer_informationFromPerson_yes")",
            informationFromPersonN:"@CarersCrypto.encryptAES("tellUsWhyEmployer_informationFromPerson_no")",
            why:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_why")",
            whyWrapper:"whyWrapper",
            whyPerson:"@CarersCrypto.encryptAES("tellUsWhyEmployer_whyPerson")",
            whyPersonWrapper:"whyPersonWrapper",
            check:"@CarersCrypto.encryptAES("someoneElse")",
            input:"@CarersCrypto.encryptAES("nameOrOrganisation")"
        });
    });

</script>
<script type="text/javascript">$($("#js").val("true"));</script>
}<commit_msg>US819 - taken out div<commit_after>@(currentForm: Form[models.domain.Declaration])(implicit claim: models.domain.Claim, lang: Lang, request: Request[AnyContent])

@import views.html.helper._
@import utils.helpers.CarersCrypto
@import views.html.helper.base._
@import play.api.i18n.{MMessages => Messages}
@import controllers.Mappings.yes
@import models.domain.Employment
@import models.domain.AboutOtherMoney
@import utils.helpers.CarersTemplate._

@main(Messages("s11.g4") + " - " + Messages("s11.longName"), Some(currentForm), claim.completedQuestionGroups(models.domain.Declaration)) {
    @form(action = controllers.s11_consent_and_declaration.routes.G4Declaration.submit) {

       <input type="hidden" id="js" name="jsEnabled" value="false">

        <fieldset class="form-elements">
           <legend>@Html(Messages("s11.g2"))</legend>

           <ul class="group">

               @if(claim.questionGroup[Employment].getOrElse(Employment()).beenEmployedSince6MonthsBeforeClaim == `yes` ||
                       claim.questionGroup[AboutOtherMoney].getOrElse(AboutOtherMoney()).statutorySickPay.answer == `yes` ||
                       claim.questionGroup[AboutOtherMoney].getOrElse(AboutOtherMoney()).otherStatutoryPay.answer == `yes`){

                   @yesNoRadioGroup(currentForm("gettingInformationFromAnyEmployer.informationFromEmployer"))

                   @otherDetailPlaceHolder(
                       inputDef = Seq(carersInputTextArea(currentForm("gettingInformationFromAnyEmployer.why"), 'placeholder->Messages("why_placeholder"),'textAreaHelper -> Html(Messages("300charsLeft")), 'maxLength -> 300 )),
                       'id->"whyWrapper"
                   )
               }

               @yesNoRadioGroup(currentForm("tellUsWhyEmployer.informationFromPerson"))

               @otherDetailPlaceHolder(
                   inputDef = Seq(carersInputTextArea(currentForm("tellUsWhyEmployer.whyPerson"), 'placeholder->Messages("why_placeholder"),'textAreaHelper -> Html(Messages("300charsLeft")), 'maxLength -> 300 )),
                   'id->"whyPersonWrapper"
               )
           </ul>
        </fieldset>
        <fieldset class="form-elements">
            <legend>@Html(Messages("s11.g4"))</legend>

            <section class="dec">
                    <h3>@Html(Messages("declaration.title"))</h3>

                <ul>
                    <li>@Html(Messages("declaration.1a")) <a href="/internal-claim-notes/@lang.code" target="_blank" @views.html.ga.trackClickEvent(linkName = "Claim Notes")>@Html(Messages("declaration.1b"))</a> @Html(Messages("declaration.1c"))</li>
                    <li>@Html(Messages("declaration.2"))</li>
                    <li>@Html(Messages("declaration.3"))</li>
                    <li>@Html(Messages("declaration.4"))</li>
                </ul>
            </section>

             @declareCheckPlaceholder(currentForm("someoneElse"))

             <ul class="form-elements">
                 @otherDetailPlaceHolder(
                    inputDef = Seq(carersInputText(currentForm("nameOrOrganisation"))(utils.helpers.CarersTemplate.fieldConstructor,lang)),
                    'id -> "nameOrOrgWrapper",
                    'display -> currentForm("someoneElse").value.map(p => p match{ case "true" => "yes" case _ => p}).getOrElse("no")
                 )

             </ul>
             
             @declareCheckPlaceholder(currentForm("confirm"),'secondary->true)
             
        </fieldset>

        <nav class="form-steps">
            <ul>
            	<li><button type="submit" name="action" value="next" class="button" @views.html.ga.trackSubmit(true)>@Html(Messages("form.submitClaim"))</button></li>
            	<li><a id="backButton" href="@claim.navigation.previous">@Html(Messages("form.back"))</a></li>
            </ul>
        </nav>
    }
<script type="text/javascript" src='@controllers.routes.Assets.at("javascripts/s11_consent_and_declaration/g4_declaration.js")'></script>
<script type="text/javascript" src='@routes.Assets.at("javascripts/textAreaCounter.js")'></script>

<script type="text/javascript">
    $(function(){
        window.areaCounter({selector:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_why")",maxChars:300});
        window.areaCounter({selector:"@CarersCrypto.encryptAES("tellUsWhyEmployer_whyPerson")",maxChars:300});
    })
    $(function() {
        window.initEvents({
            informationFromEmployerY:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_informationFromEmployer_yes")",
            informationFromEmployerN:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_informationFromEmployer_no")",
            informationFromPersonY:"@CarersCrypto.encryptAES("tellUsWhyEmployer_informationFromPerson_yes")",
            informationFromPersonN:"@CarersCrypto.encryptAES("tellUsWhyEmployer_informationFromPerson_no")",
            why:"@CarersCrypto.encryptAES("gettingInformationFromAnyEmployer_why")",
            whyWrapper:"whyWrapper",
            whyPerson:"@CarersCrypto.encryptAES("tellUsWhyEmployer_whyPerson")",
            whyPersonWrapper:"whyPersonWrapper",
            check:"@CarersCrypto.encryptAES("someoneElse")",
            input:"@CarersCrypto.encryptAES("nameOrOrganisation")"
        });
    });

</script>
<script type="text/javascript">$($("#js").val("true"));</script>
}
{'fraction_non_alphanumeric': 0.1498564416041493, 'fraction_numerical': 0.00879874039084931, 'mean_word_length': 3.2130316035895436, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 133, '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': '678620', 'n_tokens_mistral': 3235, 'n_tokens_neox': 3018, 'n_words': 300}