diff options
author | MR Lemon <matt@matthewlemon> | 2020-04-17 22:44:27 +0100 |
---|---|---|
committer | MR Lemon <matt@matthewlemon> | 2020-04-17 22:44:27 +0100 |
commit | 5e8475a02053f1df18d08d3c45afdf687b664fa4 (patch) | |
tree | 1d05b8bab8b7fcf11783033d10e8213791f9aae0 /ctrack | |
parent | 51149b561a44e5ecfbca90dfb9989985ccf2c122 (diff) |
making the form slightly better
Diffstat (limited to 'ctrack')
-rw-r--r-- | ctrack/caf/forms.py | 13 | ||||
-rw-r--r-- | ctrack/caf/views.py | 3 | ||||
-rw-r--r-- | ctrack/static/css/project.css | 4 | ||||
-rw-r--r-- | ctrack/static/css/project.css.map | 2 | ||||
-rw-r--r-- | ctrack/static/sass/project.scss | 8 |
5 files changed, 15 insertions, 15 deletions
diff --git a/ctrack/caf/forms.py b/ctrack/caf/forms.py index 5903a2c..1d07249 100644 --- a/ctrack/caf/forms.py +++ b/ctrack/caf/forms.py @@ -1,5 +1,5 @@ from crispy_forms.helper import FormHelper -from crispy_forms.layout import Button +from crispy_forms.layout import Button, Field from crispy_forms.layout import ButtonHolder from crispy_forms.layout import Fieldset from crispy_forms.layout import Layout @@ -28,13 +28,14 @@ class ApplicableSystemCreateForm(forms.ModelForm): self.helper.layout = Layout( Fieldset( "Create a new System", - "name", - "description", - "organisation", - "caf", + Field("name", css_class="form-control form-control-sm"), + Field("description", css_class="form-control form-control-sm"), + Field("organisation", css_class="form-control form-control-sm"), + Field("caf", css_class="form-control form-control-sm") ), ButtonHolder( - Submit("submit", "Submit", css_class="btn-primary") + Submit("submit", "Submit", css_class="btn-primary"), + Button("cancel", "Cancel", css_class="btn-danger") ) ) diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index 9a5cb64..a0fc17b 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -1,5 +1,6 @@ from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render +from django.urls import reverse_lazy from django.views.generic import ListView, DetailView, CreateView from ctrack.assessments.models import CAFAssessmentOutcomeScore @@ -56,3 +57,5 @@ class ApplicableSystemCreate(LoginRequiredMixin, CreateView): form_class = ApplicableSystemCreateForm model = ApplicableSystem template_name = "caf/applicablesystem_create.html" + success_url = reverse_lazy("caf:es_list") + diff --git a/ctrack/static/css/project.css b/ctrack/static/css/project.css index ea06812..836fa75 100644 --- a/ctrack/static/css/project.css +++ b/ctrack/static/css/project.css @@ -11,10 +11,6 @@ .bg-light { background-color: green; } -.btn:hover { - background-color: red; - border-color: orange; } - #chunky { border: 8px dashed yellowgreen; border-radius: 10px; diff --git a/ctrack/static/css/project.css.map b/ctrack/static/css/project.css.map index eb339b3..3add737 100644 --- a/ctrack/static/css/project.css.map +++ b/ctrack/static/css/project.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AA2BA,YAAa;EACX,gBAAgB,EAhBV,IAAI;EAiBV,YAAY,EAhBD,OAAO;EAiBlB,KAAK,EAhBC,IAAI;;AAmBZ,YAAa;EACX,gBAAgB,EAnBX,OAAO;EAoBZ,YAAY,EAnBF,OAAO;EAoBjB,KAAK,EAnBD,OAAO;;AAsBb,SAAU;EACR,gBAAgB,EAAE,KAAK;;AAGzB,UAAW;EACT,gBAAgB,EAAE,GAAG;EACrB,YAAY,EAAE,MAAM;;AAStB,OAAQ;EACN,MAAM,EAAE,sBAAsB;EAC9B,aAAa,EAAE,IAAI;EACnB,UAAU,EAAE,uBAAuB;;AAGrC,eAAgB;EACd,UAAU,EAAE,MAAM;;AAGpB,YAAa;EACX,SAAS,EAAE,OAAO;EAClB,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,IAAI;;AAIlB,wBAAyB;EACvB,gBAAgB,EAAE,OAAgB;EAClC,KAAK,EAAE,KAAK;;AAGd,cAAe;EACb,gBAAgB,EAAE,KAAK;EACvB,KAAK,EAAE,KAAK;;AAGd,kBAAmB;EACjB,gBAAgB,EAAE,GAAG;EACrB,KAAK,EAAE,KAAK;;AASd,OAAQ;EACN,KAAK,EAAE,SAAS", +"mappings": "AA2BA,YAAa;EACX,gBAAgB,EAhBV,IAAI;EAiBV,YAAY,EAhBD,OAAO;EAiBlB,KAAK,EAhBC,IAAI;;AAmBZ,YAAa;EACX,gBAAgB,EAnBX,OAAO;EAoBZ,YAAY,EAnBF,OAAO;EAoBjB,KAAK,EAnBD,OAAO;;AAsBb,SAAU;EACR,gBAAgB,EAAE,KAAK;;AAczB,OAAQ;EACN,MAAM,EAAE,sBAAsB;EAC9B,aAAa,EAAE,IAAI;EACnB,UAAU,EAAE,uBAAuB;;AAGrC,eAAgB;EACd,UAAU,EAAE,MAAM;;AAGpB,YAAa;EACX,SAAS,EAAE,OAAO;EAClB,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,IAAI;;AAIlB,wBAAyB;EACvB,gBAAgB,EAAE,OAAgB;EAClC,KAAK,EAAE,KAAK;;AAGd,cAAe;EACb,gBAAgB,EAAE,KAAK;EACvB,KAAK,EAAE,KAAK;;AAGd,kBAAmB;EACjB,gBAAgB,EAAE,GAAG;EACrB,KAAK,EAAE,KAAK;;AASd,OAAQ;EACN,KAAK,EAAE,SAAS", "sources": ["../sass/project.scss"], "names": [], "file": "project.css" diff --git a/ctrack/static/sass/project.scss b/ctrack/static/sass/project.scss index df305ef..53d2164 100644 --- a/ctrack/static/sass/project.scss +++ b/ctrack/static/sass/project.scss @@ -41,10 +41,10 @@ $input-height: 49px; background-color: green; } -.btn:hover { - background-color: red; - border-color: orange; -} +//.btn:hover { +// background-color: red; +// border-color: orange; +//} //.container a { // color: darkslategrey; |