﻿@inject IWebService WebService
@model OrganisationViewModel
@{
    Layout = "~/Views/GdsLayout.cshtml";
    Title = "Your organisation type";
}
@section BeforeMain {
    <a class="govuk-back-link" href="@Url.ActionArea("ManageOrganisations", "Submission", "Submission")">Back</a>
}
<div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
        @using (Html.BeginForm(null, null, FormMethod.Post, new { novalidate = "" }))
        {
            @Html.AntiForgeryToken();
            @await Html.GovUkValidationSummaryAsync();

            <div id="SectorTypeGroup" class="govuk-form-group organisation-type @Html.SetErrorClass(model => model.IsFastTrack, "govuk-form-group--error")">
                <fieldset class="govuk-fieldset">
                    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
                        <h1 class="govuk-fieldset__heading">
                            Did you receive a letter from us?
                        </h1>
                    </legend>

                    <div class="govuk-hint">
                        The letter includes an organisation reference and security code.
                    </div>

                    <div class="govuk-radios govuk-radios--conditional" data-module="govuk-radios">

                        <div class="govuk-radios__item">
                            <input asp-for="IsFastTrack" id="IsFastTrack_True" class="govuk-radios__input" type="radio" value="true" />
                            <label asp-for="IsFastTrack" for="IsFastTrack_True" class="govuk-label govuk-radios__label">Yes</label>
                        </div>

                        <div class="govuk-radios__item">
                            <input asp-for="IsFastTrack" id="IsFastTrack_False" class="govuk-radios__input" type="radio" value="false" data-aria-controls="conditional-org-type" />
                            <label asp-for="IsFastTrack" for="IsFastTrack_False" class="govuk-label govuk-radios__label">No</label>
                        </div>

                        <span asp-validation-for="IsFastTrack" class="govuk-error-message"></span>

                        <div id="conditional-org-type" class="govuk-radios__conditional govuk-radios__conditional--hidden">
                            <div class="govuk-form-group @Html.SetErrorClass(model => model.SectorType, "govuk-form-group--error")">
                                <fieldset class="govuk-fieldset">
                                    <legend class="govuk-fieldset__legend govuk-fieldset__legend--m">
                                        What type of organisation do you want to register?
                                    </legend>

                                    <div class="govuk-radios">

                                        <div class="govuk-radios__item">
                                            <input asp-for="SectorType" id="SectorType_Private" class="govuk-radios__input" type="radio" value="@SectorTypes.Private" aria-describedby="private-item-hint" />
                                            <label asp-for="SectorType" for="SectorType_Private" class="govuk-label govuk-radios__label">Private or voluntary sector organisation</label>
                                            <div id="private-item-hint" class="govuk-hint govuk-radios__hint">
                                                This includes:
                                                <ul class="govuk-list govuk-list--bullet">
                                                    <li>private limited companies</li>
                                                    <li>public limited companies</li>
                                                    <li>limited liability partnerships</li>
                                                    <li>charities</li>
                                                    <li>private schools</li>
                                                    <li>other private sector organisations</li>
                                                </ul>
                                            </div>
                                        </div>

                                        <div class="govuk-radios__item">
                                            <input asp-for="SectorType" id="SectorType_Public" class="govuk-radios__input" type="radio" value="@SectorTypes.Public" aria-describedby="public-item-hint" />
                                            <label asp-for="SectorType" for="SectorType_Public" class="govuk-label govuk-radios__label">Public sector organisation</label>
                                            <div id="public-item-hint" class="govuk-hint govuk-radios__hint">
                                                This includes:
                                                <ul class="govuk-list govuk-list--bullet">
                                                    <li>government departments and arms-length bodies</li>
                                                    <li>police forces</li>
                                                    <li>fire and rescue services</li>
                                                    <li>local authorities</li>
                                                    <li>NHS bodies</li>
                                                    <li>other public sector organisations</li>
                                                </ul>
                                            </div>
                                        </div>

                                        <span asp-validation-for="SectorType" class="govuk-error-message"></span>
                                    </div>
                                </fieldset>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>

            <input type="submit" class="govuk-button" value="Continue" />
        }
    </div>
</div>