Select a reason for removing this provider

@using (Html.BeginForm("ProceedWithRemoval", "RegisterManagement", FormMethod.Post)) { - + - @if (ViewData.ModelState["RemovalReason"] != null && ViewData.ModelState["RemovalReason"].Errors.Count > 0) + @if (ViewData.ModelState["SelectedRemovalReason"] != null && ViewData.ModelState["SelectedRemovalReason"].Errors.Count > 0) { -
-
-

- There is a problem -

- -
-
+ @await Html.PartialAsync("~/Views/PartialViews/_ErrorSummaryView.cshtml", Model) } -
0 ? "govuk-form-group--error" : "")"> -
- Select reason for removal -
You should proceed with removal if any of the reasons below apply.
- @if (ViewData.ModelState["RemovalReason"] != null && ViewData.ModelState["RemovalReason"].Errors.Count > 0) - { - - Error: - @ViewData.ModelState["RemovalReason"].Errors[0].ErrorMessage - - } + @await Html.PartialAsync("~/Views/PartialViews/_MultipleRadioButtonGroupView.cshtml", Model) -
- @{ - var reasons = Enum.GetValues(typeof(RemovalReasonsEnum)).Cast().ToList(); - for (int i = 1; i < reasons.Count; i++) - { - var reason = reasons[i]; - var radioId = "radio" + +(int)reason; - var ariaControls = "conditional-reason" + +(int)reason; - var furtherExpalanationId = "further-explanation" + +(int)reason; - var furtherExpalanationErrorId = "further-explanation-error" + +(int)reason; - var description = reason.GetDescription(); - - if (!reason.RequiresAdditionalInfo()) - { -
- @Html.RadioButton("RemovalReason", (int)reason, false, new { @id = radioId, @class = "govuk-radios__input" }) - -
- } - else - { -
- @Html.RadioButton("RemovalReason", (int)reason, false, new { @id = radioId, @class = "govuk-radios__input", @data_aria_controls = ariaControls }) - -
-
-
0 ? "govuk-form-group--error" : "")"> - - @if (ViewData.ModelState["FurtherExplanation"]?.Errors.Count > 0) - { -

- Error: @ViewData.ModelState["FurtherExplanation"].Errors[0].ErrorMessage -

- } - -
-
- } - } - } - -
-
-
- Cancel + Cancel
}
@@ -107,3 +34,5 @@