pic_vert_app/app/views/survey_sets/_answer_set.html.haml
2013-07-18 11:17:41 +02:00

46 lines
996 B
Plaintext

-if @item.questions_type == 3
.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
%br
=f.text_area :content, :class => "large" if answer.field_type == 3
-if @item.questions_type == 5
.answer_p
=f.text_field :position, :style => "width:1.5em;"
=f.label :position, answer.label_text
=f.text_field :content if answer.field_type == 2
%br
=f.text_area :content, :class => "large" if answer.field_type == 3
-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);'
});