Skip to content

Commit

Permalink
Adds styling to response option input fields in profile page
Browse files Browse the repository at this point in the history
Issue: documentacao-e-tarefas/scielo#706

Signed-off-by: Jhon <[email protected]>
  • Loading branch information
JhonathanLepidus committed Oct 16, 2024
1 parent 2f75039 commit 17b8989
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions styles/questionsInProfile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.responseOption {
display: flex;
}

.responseOption input[type="text"] {
margin-left: 1rem;
height: 1.5rem;
}
10 changes: 6 additions & 4 deletions templates/question.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<link rel="stylesheet" type="text/css" href="/plugins/generic/demographicData/styles/questionsInProfile.css">

{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}
Expand All @@ -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"}
<div id="responseOption-{$responseOption->getId()}">
<div class="responseOption">
{fbvElement
type="checkbox"
name="{$questionId}[]"
Expand All @@ -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}
</div>
{/foreach}
{elseif $question['type'] == $questionTypeConsts['TYPE_RADIO_BUTTONS']}
{foreach from=$question['responseOptions'] item="responseOption"}
<div id="responseOption-{$responseOption->getId()}">
<div class="responseOption">
{fbvElement
type="radio"
name="{$questionId}[]"
Expand All @@ -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}
</div>
{/foreach}
Expand Down

0 comments on commit 17b8989

Please sign in to comment.