From 17b898986d0a6ab329133e99d08aa3a981912940 Mon Sep 17 00:00:00 2001 From: Jhon Date: Wed, 16 Oct 2024 17:31:24 -0400 Subject: [PATCH] Adds styling to response option input fields in profile page Issue: documentacao-e-tarefas/scielo#706 Signed-off-by: Jhon --- styles/questionsInProfile.css | 8 ++++++++ templates/question.tpl | 10 ++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 styles/questionsInProfile.css diff --git a/styles/questionsInProfile.css b/styles/questionsInProfile.css new file mode 100644 index 0000000..bda628e --- /dev/null +++ b/styles/questionsInProfile.css @@ -0,0 +1,8 @@ +.responseOption { + display: flex; +} + +.responseOption input[type="text"] { + margin-left: 1rem; + height: 1.5rem; +} \ No newline at end of file diff --git a/templates/question.tpl b/templates/question.tpl index 181fc40..1a1fd8a 100644 --- a/templates/question.tpl +++ b/templates/question.tpl @@ -1,3 +1,5 @@ + + {assign var="questionId" value="question-{$question['questionId']}-{$question['inputType']}"} {if $question['type'] == $questionTypeConsts['TYPE_CHECKBOXES'] or $question['type'] == $questionTypeConsts['TYPE_RADIO_BUTTONS']} {assign var="isListSection" value=true} @@ -13,7 +15,7 @@ {fbvElement type="textarea" multilingual="true" name=$questionId id="demographicResponses" value=$question['response']['value'] required=true rich=false size=$fbvStyles.size.LARGE} {elseif $question['type'] == $questionTypeConsts['TYPE_CHECKBOXES']} {foreach from=$question['responseOptions'] item="responseOption"} -
+
{fbvElement type="checkbox" name="{$questionId}[]" @@ -32,13 +34,13 @@ {assign var="optionInputValue" value=""} {/if} - {fbvElement type="text" name=$optionInputName id="responseOptionsInputs" value=$optionInputValue size=$fbvStyles.size.SMALL} + {fbvElement type="text" name=$optionInputName id="responseOptionsInputs" value=$optionInputValue size=$fbvStyles.size.MEDIUM} {/if}
{/foreach} {elseif $question['type'] == $questionTypeConsts['TYPE_RADIO_BUTTONS']} {foreach from=$question['responseOptions'] item="responseOption"} -
+
{fbvElement type="radio" name="{$questionId}[]" @@ -58,7 +60,7 @@ {assign var="optionInputValue" value=""} {/if} - {fbvElement type="text" name=$optionInputName id="responseOptionsInputs" value=$optionInputValue size=$fbvStyles.size.SMALL} + {fbvElement type="text" name=$optionInputName id="responseOptionsInputs" value=$optionInputValue size=$fbvStyles.size.MEDIUM} {/if}
{/foreach}