.
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
<!-- {% load static from static %} -->
|
<!-- {% load static from static %} -->
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
{{form.media}}
|
{{form.media}}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block js %}
|
{% block js %}
|
||||||
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function showEditPopup(url) {
|
function showEditPopup(url) {
|
||||||
var win = window.open(url, "Edit",
|
var win = window.open(url, "Edit",
|
||||||
'height=500,width=800,resizable=yes,scrollbars=yes');
|
'height=500,width=800,resizable=yes,scrollbars=yes');
|
||||||
@@ -28,23 +28,23 @@
|
|||||||
|
|
||||||
|
|
||||||
function add_input_form() {
|
function add_input_form() {
|
||||||
var form_idx = $('#id_LongSeries_long-TOTAL_FORMS').val();
|
var form_idx = $('#id_Long_series-TOTAL_FORMS').val();
|
||||||
$('#form_set').append($('#empty_form').html().replace(/__prefix__/g, form_idx));
|
$('#form_set').append($('#empty_form').html().replace(/__prefix__/g, form_idx));
|
||||||
$('#id_LongSeries_long-TOTAL_FORMS').val(parseInt(form_idx) + 1);
|
$('#id_Long_series-TOTAL_FORMS').val(parseInt(form_idx) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#add_more').click(() => { add_input_form() });
|
$('#add_more').click(() => { add_input_form() });
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- {{ form.media }} -->
|
<!-- {{ form.media }} -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Submit Long Case</h2>
|
<h2>Submit Long Case</h2>
|
||||||
Use this form to create a long case. Existing associated image sets can be added using this form.
|
Use this form to create a long case. Existing associated image sets can be added using this form.
|
||||||
<form action="" method="post" enctype="multipart/form-data" id="long-form">
|
<form action="" method="post" enctype="multipart/form-data" id="long-form">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@@ -64,10 +64,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ series_formset.management_form }}
|
{{ series_formset.management_form }}
|
||||||
<input type="submit" class="submit-button" value="Submit" name="submit">
|
<input type="submit" class="submit-button" value="Submit" name="submit">
|
||||||
</form>
|
</form>
|
||||||
<div id="empty_form" style="display:none">
|
<div id="empty_form" style="display:none">
|
||||||
<ul class='no_error series-formset'>
|
<ul class='no_error series-formset'>
|
||||||
{{ series_formset.empty_form.as_ul }}
|
{{ series_formset.empty_form.as_ul }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user