Refactor condition form: streamline JavaScript loading and enhance button layout for improved usability
This commit is contained in:
@@ -1,27 +1,25 @@
|
|||||||
{% extends "atlas/base.html" %}
|
{% extends "atlas/base.html" %}
|
||||||
<!-- {% load static from static %} -->
|
{% load crispy_forms_tags %}
|
||||||
|
|
||||||
|
{% block css %}{% endblock %}
|
||||||
|
|
||||||
{% block css %}
|
|
||||||
{% endblock %}
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
{{ form.media }}
|
||||||
{{form.media}}
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- {{ form.media }} -->
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>Add/Edit Condition</h2>
|
<h2>Add / Edit Condition</h2>
|
||||||
<p>Use this form to create or edit a condition.</p>
|
<p>Use this form to create or edit a condition.</p>
|
||||||
<p>Please check if it already <a href='{% url "atlas:condition_view" %}'>exists</a> before doing so!</p>
|
<p>Please check if it already <a href='{% url "atlas:condition_view" %}'>exists</a> before doing so!</p>
|
||||||
|
|
||||||
<form action="" method="post" enctype="multipart/form-data" id="condition-form">
|
<form action="" method="post" enctype="multipart/form-data" id="condition-form">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
{% crispy form %}
|
||||||
|
|
||||||
<table>
|
<div class="mt-3">
|
||||||
{{ form.as_table }}
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
</table>
|
<a class="btn btn-secondary ms-2" href="{% url 'atlas:condition_view' %}">Cancel</a>
|
||||||
<input type="submit" class="submit-button" value="Submit" name="submit">
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user