Skip to content

Commit

Permalink
Fixed issue #14900: numerical array with checkboxes lose all data
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikvitt committed May 15, 2019
1 parent 5c9aa86 commit 3955ef7
Showing 1 changed file with 14 additions and 21 deletions.
Expand Up @@ -13,28 +13,21 @@

<!-- answer_td_checkboxes -->
<td class="answer_cell_{{ ld }} question-item answer-item {{ answertypeclass }}-item checkbox-item">
{# Value for expression manager javascript ; no need to submit #}
{{ C.Html.hiddenField("java"~myfname2,value,({
'id' : "answer"~myfname2,

{{ C.Html.hiddenField("java"~myfname2, C.Html.encode( value ),({
'id' : "java"~myfname2,
'disabled' : true,
}))
}))
}}
{# Value submited by default, replaced by next if checked #}
{# EM use answerXXXX (previous input), no need updating the value of this one, just submit '' if other one is unchecked #}
{# See http://www.yiiframework.com/doc/api/1.1/CHtml#checkBox-detail width uncheckValue for replacing ? #}
{{ C.Html.hiddenField(myfname2,"",({
'class' : "hidden",
'id' : 'hidden_'~myfname2
}))
}}
{{ C.Html.checkBox(myfname2,value,({
'class' : extraclass,
'id' : "cbox_"~myfname2,
'value' : "1"
}))
}}
<label for="cbox_{{ myfname2 }}" class="ls-label-xs-visibility">
{{ dataTitle }}
</label>

<input
type="checkbox"
name="{{ myfname2 }}"
id="answer{{ myfname2 }}"
class="{{ extraclass }}",
{{ setmyvalue }}
value="1"
/>
<label for="answer{{ myfname2 }}" class="checkbox-label control-label"></label>
</td>
<!-- end of answer_td_checkboxes -->

6 comments on commit 3955ef7

@olleharstedt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict. Please merge into develop.

Some CSS is also conflicted. Need to rebuild?

@dominikvitt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

answer_td_checkboxes.twig should replace content in develop branch.
I don't know anything about other 3 conflicting files and which version should be applied.

@olleharstedt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dominikvitt Can you ping responsible commiter about it? Use git blame etc to find out.

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure this one : 8cdcaae make a conflict … re-apply fix is easy.
@dominikvitt : after merging : i look at the merge code :)

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github allow merging … but surely add issue : https://github.com/LimeSurvey/LimeSurvey/pull/1281/files

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.