aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack
diff options
context:
space:
mode:
authorMR Lemon <matt@matthewlemon>2020-05-01 16:19:04 +0100
committerMR Lemon <matt@matthewlemon>2020-05-01 16:19:04 +0100
commitefde7c98c202405c4bbbd9d8832f3f92fc402468 (patch)
tree72b9ef973f52e36ed3f1e909e9db0c7325ea21db /ctrack
parent089eb10d5023e92969b72561baca32a9d730f0c6 (diff)
step 1 of form wizard done
Diffstat (limited to 'ctrack')
-rw-r--r--ctrack/organisations/forms.py3
-rw-r--r--ctrack/organisations/templates/organisations/org_create_wizard_form.html48
2 files changed, 40 insertions, 11 deletions
diff --git a/ctrack/organisations/forms.py b/ctrack/organisations/forms.py
index 0903649..d9495f8 100644
--- a/ctrack/organisations/forms.py
+++ b/ctrack/organisations/forms.py
@@ -12,14 +12,17 @@ class OrganisationCreateForm(forms.ModelForm):
self.fields["name"].widget.attrs["class"] = "form-control"
self.fields["submode"].widget.attrs["class"] = "form-control"
self.fields["oes"].widget.attrs["class"] = "form-check-input"
+ self.fields["active"].widget.attrs["class"] = "form-check-input"
self.fields["designation_type"].widget.attrs["class"] = "form-control"
self.fields["registered_company_name"].widget.attrs["class"] = "form-control"
+ self.fields["registered_company_number"].widget.attrs["class"] = "form-control"
class Meta:
model = Organisation
fields = ["name", "submode", "oes", "designation_type",
"registered_company_name", "registered_company_number",
"updated_by", "comments", "active"]
+ # This doesn't have any effect when using the form wizard
labels = {
"oes": "OES"
}
diff --git a/ctrack/organisations/templates/organisations/org_create_wizard_form.html b/ctrack/organisations/templates/organisations/org_create_wizard_form.html
index 8faa1a3..238a782 100644
--- a/ctrack/organisations/templates/organisations/org_create_wizard_form.html
+++ b/ctrack/organisations/templates/organisations/org_create_wizard_form.html
@@ -37,6 +37,20 @@
{{ wizard.form.name }}
</div>
<div class="row">
+ <div class="col-md-12">
+ <div class="form-check float-left">
+ {{ wizard.form.oes }}
+ <label class="form-check-label" for="oes">OES</label>
+ </div>
+ <div class="form-check float-right">
+ {{ wizard.form.active }}
+ <label class="form-check-label" for="active">Active?</label>
+ <br/>
+ </div>
+ </div>
+ </div>
+ <hr>
+ <div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="submode">Sub mode:</label>
@@ -51,22 +65,34 @@
</div>
</div>
</div>
- <div class="form-check">
- {{ wizard.form.oes }}
- <label class="form-check-label" for="oes">OES</label>
- </div>
- <div class="form-group">
- <label for="registered_company_name">Registered Company Name:</label>
- {{ wizard.form.registered_company_name }}
- <small class="form-text text-muted">{{ wizard.form.registered_company_name.help_text }}</small>
+ <hr>
+ <div class="row">
+ <div class="col-md-6">
+ <div class="form-group">
+ <label for="registered_company_name">Registered Company Name:</label>
+ {{ wizard.form.registered_company_name }}
+ <small class="form-text text-muted">{{ wizard.form.registered_company_name.help_text }}</small>
+ </div>
+ </div>
+ <div class="col-md-6">
+ <div class="form-group">
+ <label for="registered_company_number">Registered Company Number:</label>
+ {{ wizard.form.registered_company_number }}
+ <small class="form-text text-muted">{{ wizard.form.registered_company_number.help_text }}</small>
+ </div>
+ </div>
</div>
{# {{ wizard.form }}#}
{% endif %}
{% if wizard.steps.prev %}
- <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.first }}">First Step</button>
- <button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">Previous Step</button>
+ <button class="btn btn-danger" name="wizard_goto_step" type="button" value="{{ wizard.steps.first }}">First Step</button>
+ <button class="btn btn-primary" name="wizard_goto_step" type="button" value="{{ wizard.steps.prev }}">Previous Step</button>
{% endif %}
- <input type="submit" value="Submit"/>
+ <div class="row">
+ <div class="col-md-12 my-2">
+ <input type="button" class="btn btn-primary" value="Next"/>
+ </div>
+ </div>
</form>
</div>
</div>