Skip to content

Instantly share code, notes, and snippets.

@flsafe
Created May 7, 2010 06:18
Show Gist options
  • Save flsafe/393134 to your computer and use it in GitHub Desktop.
Save flsafe/393134 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Untitled</title>
<link href="/stylesheets/application.css?1271719139" media="screen" rel="stylesheet" type="text/css" />
<script src="/javascripts/prototype.js?1271182621" type="text/javascript"></script>
<script src="/javascripts/effects.js?1271182621" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1271182621" type="text/javascript"></script>
<script src="/javascripts/controls.js?1271182621" type="text/javascript"></script>
<script src="/javascripts/application.js?1271182621" type="text/javascript"></script>
</head>
<body>
<div id="container">
<h1>New exercise</h1>
<form action="/exercises" class="new_exercise" enctype="multipart/form-data" id="new_exercise" method="post"><div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="opNYl+IO+H1EWQQlkRl70hnhp0umA+nusz/v2aOKsFU=" /></div>
<p>
<label for="exercise_title">Title</label><br />
<input id="exercise_title" name="exercise[title]" size="30" type="text" />
</p>
<p>
<label for="exercise_description">Description</label><br />
<input id="exercise_description" name="exercise[description]" size="30" type="text" />
</p>
<p>
<label for="exercise_algorithm_list">Algorithm list</label><br/>
<input id="exercise_algorithm_list" name="exercise[algorithm_list]" size="30" type="text" value="" /><br/>
</p>
<p>
<label for="exercise_data_structure_list">Data structure list</label><br/>
<input id="exercise_data_structure_list" name="exercise[data_structure_list]" size="30" type="text" value="" /><br/>
</p>
<p>
<label for="exercise_problem">Problem</label><br/>
<textarea cols="40" id="exercise_problem" name="exercise[problem]" rows="20"></textarea>
</p>
<p>
<label for="exercise_tutorial">Tutorial</label><br/>
<textarea cols="40" id="exercise_tutorial" name="exercise[tutorial]" rows="20"></textarea>
</p>
<div id="hints">
<div class='hint'>
<label for="exercise_new_hint_attributes__text">Hint</label> <a href="#" onclick="this.up('.hint').remove(); return false;">Remove Hint</a><br/>
<textarea cols="40" id="exercise_new_hint_attributes__text" name="exercise[new_hint_attributes][][text]" rows="20"></textarea><br/>
</div>
</div>
<a href="#" onclick="try {
Element.insert(&quot;hints&quot;, { bottom: &quot;&lt;div class='hint'&gt;\n\n\n\n\n\t\t&lt;label for=\&quot;exercise_new_hint_attributes__text\&quot;&gt;Hint&lt;/label&gt;\t&lt;a href=\&quot;#\&quot; onclick=\&quot;this.up('.hint').remove(); return false;\&quot;&gt;Remove Hint&lt;/a&gt;&lt;br/&gt;\n\t\t&lt;textarea cols=\&quot;40\&quot; id=\&quot;exercise_new_hint_attributes__text\&quot; name=\&quot;exercise[new_hint_attributes][][text]\&quot; rows=\&quot;20\&quot;&gt;&lt;/textarea&gt;&lt;br/&gt;\n\n&lt;/div&gt;&quot; });
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.insert(\&quot;hints\&quot;, { bottom: \&quot;&lt;div class=\'hint\'&gt;\\n\\n\\n\\n\\n\\t\\t&lt;label for=\\\&quot;exercise_new_hint_attributes__text\\\&quot;&gt;Hint&lt;/label&gt;\\t&lt;a href=\\\&quot;#\\\&quot; onclick=\\\&quot;this.up(\'.hint\').remove(); return false;\\\&quot;&gt;Remove Hint&lt;/a&gt;&lt;br/&gt;\\n\\t\\t&lt;textarea cols=\\\&quot;40\\\&quot; id=\\\&quot;exercise_new_hint_attributes__text\\\&quot; name=\\\&quot;exercise[new_hint_attributes][][text]\\\&quot; rows=\\\&quot;20\\\&quot;&gt;&lt;/textarea&gt;&lt;br/&gt;\\n\\n&lt;/div&gt;\&quot; });'); throw e }; return false;">Add Hint</a>
<p>
<label for="exercise_minutes">Minutes</label><br/>
<select id="exercise_minutes" name="exercise[minutes]"><option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
<option value="60">60</option>
<option value="90">90</option>
<option value="120">120</option></select>
</p>
<div id="unit_tests">
<p>
<div class="unit_test">
<label for="exercise_new_unit_test_attributes__unit_test_file">Upload Unit Test</label><br/>
<input id="exercise_new_unit_test_attributes__unit_test_file" name="exercise[new_unit_test_attributes][][unit_test_file]" size="30" type="file" /> <a href="#" onclick="this.up('.unit_test').remove(); return false;">Remove Unit Test</a>
</div>
</p>
</div>
<a href="#" onclick="try {
Element.insert(&quot;unit_tests&quot;, { bottom: &quot;\n\n\n&lt;div class=\&quot;unit_test\&quot;&gt;\n\n\t\n\t\t&lt;label for=\&quot;exercise_new_unit_test_attributes__unit_test_file\&quot;&gt;Upload Unit Test&lt;/label&gt;&lt;br/&gt;\n\t\t&lt;input id=\&quot;exercise_new_unit_test_attributes__unit_test_file\&quot; name=\&quot;exercise[new_unit_test_attributes][][unit_test_file]\&quot; size=\&quot;30\&quot; type=\&quot;file\&quot; /&gt; &lt;a href=\&quot;#\&quot; onclick=\&quot;this.up('.unit_test').remove(); return false;\&quot;&gt;Remove Unit Test&lt;/a&gt;\n\t\n\n&lt;/div&gt;&quot; });
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.insert(\&quot;unit_tests\&quot;, { bottom: \&quot;\\n\\n\\n&lt;div class=\\\&quot;unit_test\\\&quot;&gt;\\n\\n\\t\\n\\t\\t&lt;label for=\\\&quot;exercise_new_unit_test_attributes__unit_test_file\\\&quot;&gt;Upload Unit Test&lt;/label&gt;&lt;br/&gt;\\n\\t\\t&lt;input id=\\\&quot;exercise_new_unit_test_attributes__unit_test_file\\\&quot; name=\\\&quot;exercise[new_unit_test_attributes][][unit_test_file]\\\&quot; size=\\\&quot;30\\\&quot; type=\\\&quot;file\\\&quot; /&gt; &lt;a href=\\\&quot;#\\\&quot; onclick=\\\&quot;this.up(\'.unit_test\').remove(); return false;\\\&quot;&gt;Remove Unit Test&lt;/a&gt;\\n\\t\\n\\n&lt;/div&gt;\&quot; });'); throw e }; return false;">Add Unit Test</a>
<div id="figures">
<p>
<div class="figure">
<label for="exercise_new_figure_attributes__image">Figure</label> <br/>
<input id="exercise_new_figure_attributes__image" name="exercise[new_figure_attributes][][image]" size="30" type="file" /> <a href="#" onclick="this.up('.figure').remove(); return false;">Remove Figure</a><br/>
</div>
</p>
</div>
<a href="#" onclick="try {
Element.insert(&quot;figures&quot;, { bottom: &quot;&lt;div class=\&quot;figure\&quot;&gt;\n\n\n\n\n\t\t&lt;label for=\&quot;exercise_new_figure_attributes__image\&quot;&gt;Figure&lt;/label&gt; &lt;br/&gt;\n\t\t&lt;input id=\&quot;exercise_new_figure_attributes__image\&quot; name=\&quot;exercise[new_figure_attributes][][image]\&quot; size=\&quot;30\&quot; type=\&quot;file\&quot; /&gt;\t&lt;a href=\&quot;#\&quot; onclick=\&quot;this.up('.figure').remove(); return false;\&quot;&gt;Remove Figure&lt;/a&gt;&lt;br/&gt;\n\n&lt;/div&gt;&quot; });
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.insert(\&quot;figures\&quot;, { bottom: \&quot;&lt;div class=\\\&quot;figure\\\&quot;&gt;\\n\\n\\n\\n\\n\\t\\t&lt;label for=\\\&quot;exercise_new_figure_attributes__image\\\&quot;&gt;Figure&lt;/label&gt; &lt;br/&gt;\\n\\t\\t&lt;input id=\\\&quot;exercise_new_figure_attributes__image\\\&quot; name=\\\&quot;exercise[new_figure_attributes][][image]\\\&quot; size=\\\&quot;30\\\&quot; type=\\\&quot;file\\\&quot; /&gt;\\t&lt;a href=\\\&quot;#\\\&quot; onclick=\\\&quot;this.up(\'.figure\').remove(); return false;\\\&quot;&gt;Remove Figure&lt;/a&gt;&lt;br/&gt;\\n\\n&lt;/div&gt;\&quot; });'); throw e }; return false;">Add Figure Test</a>
<p>
<label for="exercise_exercise_set_id">Exercise Set</label>
<select id="exercise_exercise_set_id" name="exercise[exercise_set_id]"><option value="">Select Exercise Set</option>
</select>
</p>
<p>
<fieldset>
<legend>Or Create An Exercise Set</legend>
<p>
<label for="exercise_new_exercise_set_attributes_title">Set Title</label><br/>
<input id="exercise_new_exercise_set_attributes_title" name="exercise[new_exercise_set_attributes][title]" size="30" type="text" /><br/>
</p>
<p>
<label for="exercise_new_exercise_set_attributes_description">Set Description</label><br/>
<input id="exercise_new_exercise_set_attributes_description" name="exercise[new_exercise_set_attributes][description]" size="30" type="text" /><br/>
</p>
<p>
<label for="exercise_new_exercise_set_attributes_algorithm_list">Set Algorithm Tags</label><br/>
<input id="exercise_new_exercise_set_attributes_algorithm_list" name="exercise[new_exercise_set_attributes][algorithm_list]" size="30" type="text" /><br/>
</p>
<p>
<label for="exercise_new_exercise_set_attributes_data_structure_list">Set Data Structure Tags</label><br/>
<input id="exercise_new_exercise_set_attributes_data_structure_list" name="exercise[new_exercise_set_attributes][data_structure_list]" size="30" type="text" /><br/>
</p>
</fieldset>
</p>
<p>
<input id="exercise_submit" name="commit" type="submit" value="Save changes" />
</p>
</form>
<a href="/exercises">Back</a>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment