Created
February 25, 2010 16:47
-
-
Save paulca/314714 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template = { | |
// <%- f = form_for setup_peer_test(@peer_test) do |f| -%> | |
<%- f.fields_for(:steps) do |step_form| step = step_form.object -%> | |
<%- if step.step_type == 'action' -%> | |
'add_action': "<%= escape_javascript(render(:partial => 'my/peer_tests/action', :locals => {:step_form => step_form})) %>", | |
<%- else -%> | |
'add_question': "<%= escape_javascript(render(:partial => 'my/peer_tests/question', :locals => {:step_form => step_form})) %>", | |
<%- end -%> | |
<%- end -%> | |
//<%- end %> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template = { | |
// <form action="/peer_tests" class="new_peer_test" id="new_peer_test" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="cXnEa8ay20GPfmGN3rWvi8U+ok40X4sm/BuJw/DKeWE=" /></div> | |
'add_action': "<div class=\"guide action\">\n <div class=\"column\"><label for=\"peer_test_steps_attributes_0_content\">Action<\/label> <textarea class=\"long validate-blank\" cols=\"40\" id=\"peer_test_steps_attributes_0_content\" name=\"peer_test[steps_attributes][0][content]\" rows=\"20\"><\/textarea><\/div>\n <div class=\"aside\"><p>Enter your test instructions here - the actions you want the tester to take.<\/p><\/div>\n<\/div>", | |
'add_question': "<div class=\"guide question\">\n <div class=\"column\"><label for=\"peer_test_steps_attributes_1_content\">Question<\/label> <textarea class=\"long validate-blank\" cols=\"40\" id=\"peer_test_steps_attributes_1_content\" name=\"peer_test[steps_attributes][1][content]\" rows=\"20\"><\/textarea><\/div>\n <div class=\"aside\">\n <p>Enter the question you want to get feedback on after the user has taken the action requested.<\/p>\n <p>Choose the answer type according to the type of feedback you want.<\/p>\n <\/div>\n<\/div>", | |
//</form> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment