aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations
diff options
context:
space:
mode:
Diffstat (limited to 'ctrack/organisations')
-rw-r--r--ctrack/organisations/models.py2
-rw-r--r--ctrack/organisations/templates/organisations/org_create_formset.html50
2 files changed, 26 insertions, 26 deletions
diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py
index 6824eeb..b14b03b 100644
--- a/ctrack/organisations/models.py
+++ b/ctrack/organisations/models.py
@@ -123,7 +123,7 @@ class Organisation(models.Model):
submode = models.ForeignKey(
Submode, on_delete=models.CASCADE, blank=True, null=True
)
- oes = models.BooleanField()
+ oes = models.BooleanField(default=True)
designation_type = models.IntegerField(choices=DESIGNATION_TYPE, default=1)
registered_company_name = models.CharField(max_length=255, blank=True)
registered_company_number = models.CharField(max_length=100, blank=True)
diff --git a/ctrack/organisations/templates/organisations/org_create_formset.html b/ctrack/organisations/templates/organisations/org_create_formset.html
index a73a2af..d78abb1 100644
--- a/ctrack/organisations/templates/organisations/org_create_formset.html
+++ b/ctrack/organisations/templates/organisations/org_create_formset.html
@@ -8,21 +8,21 @@
{% block content %}
- <div class="container">
+ <div class="container mt-3">
<h4>Create a new organisation</h4>
<div class="row">
- <div class="col-md-8">
+ <div class="col-md-8 pt-2 pl-0 my-2 border bg-light">
<form method="post" action="">
{% csrf_token %}
{# this is the parent form - in this case the organisation form #}
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.name.id_for_label }}">Name:</label>
{{ form.name }}
<small class="form-text text-muted">{{ form.name.help_text }}</small>
</div>
- <div class="form-check">
+ <div class="m-3 form-check">
{{ form.non_field_errors }}
{{ form.oes }}
<label class="form-check-label" for="{{ form.oes.id_for_label }}">OES</label>
@@ -30,35 +30,35 @@
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.submode.id_for_label }}">Sub mode:</label>
{{ form.submode }}
<small class="form-text text-muted">{{ form.submode.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.designation_type.id_for_label }}">Designation Type:</label>
{{ form.designation_type }}
<small class="form-text text-muted">{{ form.designation_type.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 col-md-12 pl-0 my-2form-group">
{{ form.non_field_errors }}
<label for="{{ form.registered_company_name.id_for_label }}">Registered Company Name:</label>
{{ form.registered_company_name }}
<small class="form-text text-muted">{{ form.registered_company_name.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.registered_company_number.id_for_label }}">Registered Company Number:</label>
{{ form.registered_company_number }}
<small class="form-text text-muted">{{ form.registered_company_number.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.comments.id_for_label }}">Comments:</label>
{{ form.comments }}
@@ -70,80 +70,80 @@
<h5>Address:</h5>
<div class="row">
- <div class="col-md-8">
+ <div class="col-md-8 pt-2 pl-0 my-2 border bg-light">
{{ addresses.management_form }}
<table>
{% for form in addresses %}
- {% if forloop.counter > 1 %}
- <h5>Optional (add an alternative address):</h5>
+ {% if forloop.counter > 1 %}
+ <h5 class="px-3">Optional (add an alternative address):</h5>
{% endif %}
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.type.id_for_label }}">Address Type:</label>
{{ form.type }}
<small class="form-text text-muted">{{ form.type.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.line1.id_for_label }}">Line 1:</label>
{{ form.line1 }}
<small class="form-text text-muted">{{ form.line1.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.line2.id_for_label }}">Line 2:</label>
{{ form.line2 }}
<small class="form-text text-muted">{{ form.line2.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.line3.id_for_label }}">Line 3:</label>
{{ form.line3 }}
<small class="form-text text-muted">{{ form.line3.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.city.id_for_label }}">City:</label>
{{ form.city }}
<small class="form-text text-muted">{{ form.city.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.county.id_for_label }}">County:</label>
{{ form.county }}
<small class="form-text text-muted">{{ form.county.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.postcode.id_for_label }}">Postcode:</label>
{{ form.postcode }}
<small class="form-text text-muted">{{ form.postcode.help_text }}</small>
</div>
- <div class="form-group">
+ <div class="px-3 form-group">
{{ form.non_field_errors }}
<label for="{{ form.country.id_for_label }}">Country:</label>
{{ form.country }}
<small class="form-text text-muted">{{ form.country.help_text }}</small>
</div>
-
{% endfor %}
+ <div class="my-3 col-md-12">
+ <input class="btn btn-primary" type="submit" value="Submit">
+ <a href="{% url "organisations:list" %}" class="btn btn-danger">Cancel</a>
+ </div>
</table>
-
+ </form>
</div>
</div>
- {# This is the address inlineformset#}
- <input type="submit" value="Submit">
- </form>
</div>
{% endblock %}