aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMR Lemon <matt@matthewlemon>2020-04-24 17:46:33 +0100
committerMR Lemon <matt@matthewlemon>2020-04-24 17:46:33 +0100
commit301154e0a48ea2e2966afa92912317367dfcbe1b (patch)
tree5dc8bb07a2ab7e3685b6f5b1ea3903fe13ddc9c7
parenta03fdb0731a6cd5d41a05ce7d3e3b79e280248de (diff)
much nicer create organisation form
-rw-r--r--ctrack/organisations/forms.py12
-rw-r--r--ctrack/organisations/templates/organisations/organisation_create.html21
2 files changed, 27 insertions, 6 deletions
diff --git a/ctrack/organisations/forms.py b/ctrack/organisations/forms.py
index 63291a5..4234a07 100644
--- a/ctrack/organisations/forms.py
+++ b/ctrack/organisations/forms.py
@@ -1,5 +1,5 @@
from crispy_forms.helper import FormHelper
-from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, Button
+from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, Button, Field
from django import forms
from django.urls import reverse
@@ -13,8 +13,8 @@ class OrganisationCreateForm(forms.ModelForm):
self.helper = FormHelper(self)
self.helper.layout = Layout(
Fieldset(
- f"Create a new Organisation",
- "name",
+ "",
+ Field("name", css_class="form-control-lg"),
"submode",
"oes",
"designation_type",
@@ -38,3 +38,9 @@ class OrganisationCreateForm(forms.ModelForm):
labels = {
"oes": "OES"
}
+ help_texts = {
+ "submode": "e.g. Rail Maintenance, TOC, etc...",
+ "updated_by": "Name of staff member/inspector creating this record",
+ "active": "Is this company an active participant in the NIS compliance regime?",
+ "designation_type": "This is probably defined in the Reguation",
+ }
diff --git a/ctrack/organisations/templates/organisations/organisation_create.html b/ctrack/organisations/templates/organisations/organisation_create.html
index 27e2cf4..4ee2801 100644
--- a/ctrack/organisations/templates/organisations/organisation_create.html
+++ b/ctrack/organisations/templates/organisations/organisation_create.html
@@ -7,10 +7,25 @@
{% load crispy_forms_tags %}
{% block content %}
- <div class="container">
+ <div class="container mt-3">
<div class="row">
- <div class="col-sm-12">
- {% crispy form %}
+ <div class="col-md-12 pl-0 my-2">
+ <h4>Create a new Organisation</h4>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-7 pt-2 border bg-light">
+ {% crispy form %}
+ </div>
+ <div class="col-sm-5">
+ <div class="card" style="width: 18rem;">
+ <div class="card-body">
+ <h5 class="card-title">Help on Organisations</h5>
+ <p class="card-text">An organisation is the parent/operating company. There is probably advice and
+ proper definitions for this somewhere. Maybe if you click the link below, it will take you there?</p>
+ <a href="#" class="btn btn-primary">Go somewhere</a>
+ </div>
+ </div>
</div>
</div>
</div>