From 81fd492628a255fa90a60320238aed3fd3b4ebc2 Mon Sep 17 00:00:00 2001 From: Kat Date: Wed, 6 Oct 2021 09:10:25 +0100 Subject: [PATCH] Make total field readonly --- app/views/form/_numeric_question.html.erb | 3 ++- config/forms/2021_2022.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/form/_numeric_question.html.erb b/app/views/form/_numeric_question.html.erb index 1b98ed158..b001f7467 100644 --- a/app/views/form/_numeric_question.html.erb +++ b/app/views/form/_numeric_question.html.erb @@ -1,5 +1,6 @@ <%= f.govuk_number_field question_key, hint: { text: question["hint_text"] }, label: { text: question["header"].html_safe, size: "l"}, - min: question["min"], max: question["max"], step: question["step"], width: 20 + min: question["min"], max: question["max"], step: question["step"], + width: 20, :readonly => question["readonly"] %> diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index cc552eb9f..55bb991b4 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -1168,7 +1168,8 @@ "hint_text": "This is the total of rent and all charges", "type": "numeric", "min": 0, - "step": 1 + "step": 1, + "readonly": true }, "outstanding_amount": { "check_answer_label": "After housing benefit and/or housing element of UC payment is received, will there be an outstanding amount for basic rent and/or benefit eligible charges?",