Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,11 @@ public IActionResult CompetencyAssessmentSummary(CompetencyAssessmentFeaturesVie
[Route("/CompetencyAssessments/{competencyAssessmentId}/Frameworks/{frameworkId}/Make")]
public IActionResult ConfirmMaKePrimaryFramework(int frameworkId, int competencyAssessmentId)
{
var adminId = GetAdminID();
var competencyAssessmentBase = competencyAssessmentService.GetCompetencyAssessmentBaseById(competencyAssessmentId, adminId);
var framework = frameworkService.GetFrameworkDetailByFrameworkId(frameworkId, adminId);
var model = new ConfirmMakePrimaryFrameworkViewModel(competencyAssessmentBase, framework);
return View("ConfirmMaKePrimaryFramework", model);
var adminId = GetAdminID();
var competencyAssessmentBase = competencyAssessmentService.GetCompetencyAssessmentBaseById(competencyAssessmentId, adminId);
var framework = frameworkService.GetFrameworkDetailByFrameworkId(frameworkId, adminId);
var model = new ConfirmMakePrimaryFrameworkViewModel(competencyAssessmentBase, framework);
return View("ConfirmMaKePrimaryFramework", model);
}
[HttpPost]
[Route("/CompetencyAssessments/{competencyAssessmentId}/Frameworks/{frameworkId}/Make")]
Expand Down Expand Up @@ -897,7 +897,6 @@ public IActionResult OptionsLabels(OptionsLabelsViewModel model)
}
else if (model.CurrentStep == (int)OptionLabel.QuestionLabels)
{
data.QuestionLabel = model.QuestionLabel;
if (model.QuestionLabel)
{
var label = model.QuestionLabelText?.Trim();
Expand All @@ -908,17 +907,18 @@ public IActionResult OptionsLabels(OptionsLabelsViewModel model)

if (!ModelState.IsValid)
{
SetOptionsLabelsData(data);
model = new OptionsLabelsViewModel(data);
model.Error = true;
return View("CompetencyAssessmentOptions", model);
var errModel = new OptionsLabelsViewModel(data);
errModel.QuestionLabel = model.QuestionLabel;
errModel.QuestionLabelText = model.QuestionLabelText;
errModel.Error = true;
return View("CompetencyAssessmentOptions", errModel);
}
}
data.QuestionLabel = model.QuestionLabel;
data.QuestionLabelText = model.QuestionLabel ? model.QuestionLabelText.Trim() : null;
}
else if (model.CurrentStep == (int)OptionLabel.CommentsLabel)
{
data.ReviewerCommentsLabel = model.ReviewerCommentsLabel;
if (model.ReviewerCommentsLabel)
{
var label = model.ReviewerCommentsLabelText?.Trim();
Expand All @@ -929,12 +929,14 @@ public IActionResult OptionsLabels(OptionsLabelsViewModel model)

if (!ModelState.IsValid)
{
SetOptionsLabelsData(data);
model = new OptionsLabelsViewModel(data);
model.Error = true;
return View("CompetencyAssessmentOptions", model);
var errModel = new OptionsLabelsViewModel(data);
errModel.ReviewerCommentsLabel = model.ReviewerCommentsLabel;
errModel.ReviewerCommentsLabelText = model.ReviewerCommentsLabelText;
errModel.Error = true;
return View("CompetencyAssessmentOptions", errModel);
}
}
data.ReviewerCommentsLabel = model.ReviewerCommentsLabel;
data.ReviewerCommentsLabelText = model.ReviewerCommentsLabel ? model.ReviewerCommentsLabelText.Trim() : null;
}
else if (model.CurrentStep == (int)OptionLabel.Summary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
</h1>
</legend>
<div id="example-hints-hint" class="nhsuk-hint">
Do you want the learner to work through competencies using next and previous links? If not, the learner will navigate between @Model.VocabularyPlural.ToLower() using the @Model.VocabularySingular.ToLower() menu.
Do you want the learner to work through @Model.VocabularyPlural.ToLower() using next and previous links? If not, the learner will navigate between @Model.VocabularyPlural.ToLower() using the @Model.VocabularySingular.ToLower() menu.
</div>
<div class="nhsuk-radios" id="LinearNavigation">
<div class="nhsuk-radios__item">
Expand Down
Loading