box chart now uses StatsOptionsForm
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
$(function() {
|
||||
|
||||
// Get the form fields and hidden div
|
||||
var modality = $("#id_modality");
|
||||
var checkbox = $("#id_water");
|
||||
var hidden = $("#id_waterboattype");
|
||||
|
||||
|
||||
@@ -28,16 +28,14 @@
|
||||
|
||||
hidden.hide();
|
||||
|
||||
|
||||
|
||||
// Setup an event listener for when the state of the
|
||||
// checkbox changes.
|
||||
modality.change(function() {
|
||||
checkbox.change(function() {
|
||||
// Check to see if the checkbox is checked.
|
||||
// If it is, show the fields and populate the input.
|
||||
// If not, hide the fields.
|
||||
var Value = modality.val();
|
||||
if (Value=='water') {
|
||||
// If not, hide the fields.
|
||||
if (checkbox.is(':checked')) {
|
||||
// Show the hidden fields.
|
||||
hidden.show();
|
||||
} else {
|
||||
@@ -55,12 +53,7 @@
|
||||
// $("#hidden_field").val("");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -119,12 +112,12 @@
|
||||
<div class="grid_4 alpha">
|
||||
|
||||
<table>
|
||||
{{ modalityform.as_table }}
|
||||
{{ optionsform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<input name='modalityform' class="button green" type="submit" value="Submit">
|
||||
<input name='optionsform' class="button green" type="submit" value="Submit">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user