removed empty script tag when no default is given
This commit is contained in:
parent
8fd6dcc81c
commit
04cbe6cb2c
@ -23,14 +23,15 @@
|
|||||||
<button class="btn btn-success" type="submit"><i class="fas fa-save"></i> {% trans 'Save' %}</button>
|
<button class="btn btn-success" type="submit"><i class="fas fa-save"></i> {% trans 'Save' %}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
{% if default_recipe %}
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
{% if default_recipe %}
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#id_recipe').val({{ default_recipe.pk }}).trigger('change');
|
$('#id_recipe').val({{ default_recipe.pk }}).trigger('change');
|
||||||
});
|
});
|
||||||
{% endif %}
|
|
||||||
</script>
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user