From 6e4fbc0d4bfeda500e1c6196acadae5beda6635f Mon Sep 17 00:00:00 2001 From: Diego Steiner Date: Thu, 26 Sep 2024 12:19:06 +0200 Subject: [PATCH 1/2] fix: refactor question fields to reflect sti (hitobito_youth#58) --- .../questions/event_question_ahv_number/_fields.html.haml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 app/views/event/questions/event_question_ahv_number/_fields.html.haml diff --git a/app/views/event/questions/event_question_ahv_number/_fields.html.haml b/app/views/event/questions/event_question_ahv_number/_fields.html.haml new file mode 100644 index 0000000..bd1130c --- /dev/null +++ b/app/views/event/questions/event_question_ahv_number/_fields.html.haml @@ -0,0 +1,8 @@ +- question = f.object +- if question.derived? && !question.derived_from_question.customize_derived + = f.labeled(:question) do + = f.hidden_field(:question) + %p.py-2= question.question + +- else + = f.labeled_input_field(:question) From 8c49c4dccfb3074ca89f6c30fbb7db087439b635 Mon Sep 17 00:00:00 2001 From: Diego Steiner Date: Thu, 26 Sep 2024 23:09:48 +0200 Subject: [PATCH 2/2] fix: remove customize_derived (hitobito_youth#58) --- .../event/questions/event_question_ahv_number/_fields.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/event/questions/event_question_ahv_number/_fields.html.haml b/app/views/event/questions/event_question_ahv_number/_fields.html.haml index bd1130c..3845bc4 100644 --- a/app/views/event/questions/event_question_ahv_number/_fields.html.haml +++ b/app/views/event/questions/event_question_ahv_number/_fields.html.haml @@ -1,5 +1,5 @@ - question = f.object -- if question.derived? && !question.derived_from_question.customize_derived +- if question.derived? = f.labeled(:question) do = f.hidden_field(:question) %p.py-2= question.question