|
Server : Apache System : Linux s1230 5.15.0-139-generic #149~20.04.1 SMP Tue Jul 14 11:21:49 UTC 2026 x86_64 User : p141464 ( 418825) PHP Version : 7.4.33.12 Disable Function : NONE Directory : /html/KMU-CSR-PLANER/wp-content/plugins/modern-polls/resources/views/templates/basic/ |
Upload File : |
<div class="mpp-basic_container" id="mpp_{{hash}}">
{{idField}}
{{nonceField}}
<div class="mpp-basic_question">
<div class="mpp-basic_question_text">
{{question}}
</div>
</div>
<form>
<div class="mpp-basic_answers">
{{answerTemplate_single}}
<div class="mpp-basic_answer">
<input class="mpp-radio_input"
type="radio"
id="{{answerTagID}}"
{{answerTag}}
value="{{answerID}}">
<label for="{{answerTagID}}">{{answerText}}</label>
</div>
{{/answerTemplate_single}}
{{answerTemplate_multi}}
<div class="mpp-basic_answer mpp-checkbox">
<input class="mpp-checkbox_input"
type="checkbox"
id="{{answerTagID}}"
{{answerTag}}
value="{{answerID}}">
<label for="{{answerTagID}}">{{answerText}}</label>
</div>
{{/answerTemplate_multi}}
</div>
</form>
<div class="mpp-basic_actions">
{{voteButton}}
{{resultButton}}
</div>
</div>
<script>
var checkCount_{{hash}} = 0;
var maxChecks_{{hash}} = {{maxChecked}};
jQuery(document).ready(function () {
jQuery('#mpp_{{hash}} :checkbox').change(function () {
//update checkCount
checkCount_{{hash}} = jQuery('#mpp_{{hash}} :checked').length;
if (checkCount_{{hash}} >= maxChecks_{{hash}}) {
jQuery('#mpp_{{hash}} :checkbox').not(':checked').each(function () {
jQuery(this).attr('disabled', true);
jQuery(this).parent('.mpp-checkbox').addClass('mpp-checkbox_disabled');
});
} else {
jQuery('#mpp_{{hash}} :checkbox:disabled').each(function () {
jQuery(this).attr('disabled', false);
jQuery(this).parent('.mpp-checkbox').removeClass('mpp-checkbox_disabled');
});
}
if (this.checked) {
jQuery("td.label").append('<label>' + this.value + ' </label>');
} else {
jQuery("td.label").find(':contains(' + this.value + ')').remove();
}
jQuery('input[name="result"]').val(jQuery("td.label").text());
});
});
</script>