<commit_before>@(timeString: String)(implicit lang: Lang, token: services.csrf_prevention.CSRF.Token)

@import helper._
@import mappings.disposal_of_vehicle.VrmLocked._
@import utils.helpers._
@import views.html.common.language
@import controllers.disposal_of_vehicle.routes.VrmLocked

@main(
title = Messages("vrm_locked.title"),
alternateLanguages = language(withLanguageCy = VrmLocked.withLanguageCy(), withLanguageEn = VrmLocked.withLanguageEn())
) {
    <p>@Messages("vrm_locked.text1")</p>
    <p>@Messages("vrm_locked.text2.1")&nbsp;<span id='localTimeOfVrmLock' ></span>&nbsp;@Messages("vrm_locked.text2.3")</p>
    <p>@Messages("vrm_locked.text3.1")&nbsp;<strong>@Messages("vrm_locked.text3.2")</strong></p>
    <div class="form-steps">
        <div class="step">
            @form(action = controllers.disposal_of_vehicle.routes.VrmLocked.newDisposal) {
            @CSRFHelper.hiddenFormField
                <button id="@NewDisposalId" type="submit" name="action" value="@NewDisposalAction" class="button">@Messages("vrm_locked.newdisposalbutton")</button>
            }
        </div>
        <div class="step">
            @form(action = controllers.disposal_of_vehicle.routes.VrmLocked.exit) {
            @CSRFHelper.hiddenFormField
                <button id="@ExitDisposalId" type="submit" name="action" value="@ExitAction" class="button">@Messages("vrm_locked.exit.button")</button>
            }
        </div>
    </div>
}

<script type="text/javascript">
    function localize(dateTimeISOChronology)
    {
        var localTime =new Date(dateTimeISOChronology).toLocaleTimeString();
        document.getElementById('localTimeOfVrmLock').innerHTML = localTime;
    }

    localize("@timeString");
</script><commit_msg>US138 refactor: tidy up, added todo<commit_after>@(timeString: String)(implicit lang: Lang, token: services.csrf_prevention.CSRF.Token)

@import helper._
@import mappings.disposal_of_vehicle.VrmLocked._
@import utils.helpers._
@import views.html.common.language
@import controllers.disposal_of_vehicle.routes.VrmLocked
@import views.html.disposal_of_vehicle.main

@main(
title = Messages("vrm_locked.title"),
alternateLanguages = language(withLanguageCy = VrmLocked.withLanguageCy(), withLanguageEn = VrmLocked.withLanguageEn())
) {
    <p>@Messages("vrm_locked.text1")</p>
    <p>@Messages("vrm_locked.text2.1")&nbsp;<span id='localTimeOfVrmLock' ></span>&nbsp;@Messages("vrm_locked.text2.3")</p>
    <p>@Messages("vrm_locked.text3.1")&nbsp;<strong>@Messages("vrm_locked.text3.2")</strong></p>
    <div class="form-steps">
        <div class="step">
            @form(action = controllers.disposal_of_vehicle.routes.VrmLocked.newDisposal()) {
            @CSRFHelper.hiddenFormField
                <button id="@NewDisposalId" type="submit" name="action" value="@NewDisposalAction" class="button">@Messages("vrm_locked.newdisposalbutton")</button>
            }
        </div>
        <div class="step">
            @form(action = controllers.disposal_of_vehicle.routes.VrmLocked.exit()) {
            @CSRFHelper.hiddenFormField
                <button id="@ExitDisposalId" type="submit" name="action" value="@ExitAction" class="button">@Messages("vrm_locked.exit.button")</button>
            }
        </div>
    </div>
}

@* TODO instead of inserting into html the html needs the default value (for browsers without javascript) and this script should totally replace the span. *@
<script type="text/javascript">
    function localize(dateTimeISOChronology)
    {
        var localTime =new Date(dateTimeISOChronology).toLocaleTimeString();
        document.getElementById('localTimeOfVrmLock').innerHTML = localTime;
    }

    localize("@timeString");
</script>
{'fraction_non_alphanumeric': 0.14705882352941177, 'fraction_numerical': 0.005666486778197518, 'mean_word_length': 4.295714285714285, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '7144731', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1175, 'n_words': 166}