pic_vert_app/app/views/survey_sets/_answer_set.html.haml
2012-08-18 12:07:32 +02:00

32 lines
570 B
Plaintext

.answer_p
=f.check_box :is_checked, :class => "checkboxe_#{answer.survey_item.id}"
-checkboxe_class = "checkboxe_#{answer.survey_item.id}"
=f.label :is_checked, answer.label_text
=f.text_field :content if answer.field_type == 2
-if 1 == 2
%script
= raw '$("input[type=checkbox][class='+checkboxe_class+']").click(function() {'
= raw 'var bol = $("input[type=checkbox][class='+checkboxe_class+']:checked").length >= 1000;'
= raw '$("input[type=checkbox][class='+checkboxe_class+']").not(":checked").attr("disabled",bol);'
});