Sha256: 9e33bcc4f2d5e8c2b296d835637b66dc01fff8cf9bec57d4e88890cddeb4ffc0
Contents?: true
Size: 1.3 KB
Versions: 8
Compression:
Stored size: 1.3 KB
Contents
%form(action="#") -@form.questions.each do |question| -last_question = Question.new -if(question.rhetorical?) %h3.section =question.name %p.section.instructions =question.instructions -else -if question.name != last_question.name %dt =question_label(question) =question_instructions(question) -if question.required %strong{:style=>"color:red;"} * -case(question.type.to_sym) -when :TextQuestion %dd=text_field_tag(question.name.parameterize) -when :EssayQuestion %dd=text_area_tag(question.name.parameterize) -when :ChooseOneQuestion -if question.choices.count > 5 %dd=select_tag(question.name.parameterize, options_for_select((question.required ? [] : ['']) + question.choice_names)) -else -question.choices.each do |choice| %dd =radio_button_tag(question.name.parameterize, choice.name) =label_tag(question.name.parameterize, choice.name, :value=>choice.name) -when :ChecklistQuestion -question.choices.each do |choice| %dd =check_box_tag(question.name.parameterize, choice.name) =label_tag(question.name.parameterize, choice.name) -last_question = question
Version data entries
8 entries across 8 versions & 1 rubygems