mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
refactor: split out relationship form
This commit is contained in:
21
people/templates/people/includes/relationship_form.html
Normal file
21
people/templates/people/includes/relationship_form.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% with config.RELATIONSHIP_FORM_HELP as help_text %}
|
||||
{% if help_text %}
|
||||
<div class="alert alert-info mt-3 pb-0">
|
||||
{{ help_text|linebreaks }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form"
|
||||
method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
|
||||
{% buttons %}
|
||||
<button class="btn btn-success" type="submit">Submit</button>
|
||||
{% endbuttons %}
|
||||
</form>
|
||||
@@ -15,26 +15,6 @@
|
||||
|
||||
<h1>Add Relationship</h1>
|
||||
|
||||
{% with config.RELATIONSHIP_FORM_HELP as help_text %}
|
||||
{% if help_text %}
|
||||
<div class="alert alert-info mt-3 pb-0">
|
||||
{{ help_text|linebreaks }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form"
|
||||
method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
|
||||
{% buttons %}
|
||||
<button class="btn btn-success" type="submit">Submit</button>
|
||||
{% endbuttons %}
|
||||
</form>
|
||||
{% include 'people/includes/relationship_form.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -18,27 +18,7 @@
|
||||
|
||||
<h1>Update Relationship</h1>
|
||||
|
||||
{% with config.RELATIONSHIP_FORM_HELP as help_text %}
|
||||
{% if help_text %}
|
||||
<div class="alert alert-info mt-3 pb-0">
|
||||
{{ help_text|linebreaks }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form"
|
||||
method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
|
||||
{% buttons %}
|
||||
<button class="btn btn-success" type="submit">Submit</button>
|
||||
{% endbuttons %}
|
||||
</form>
|
||||
{% include 'people/includes/relationship_form.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user