From 000a39c12b3dbff3dc43408aa3fab9b82ff566ca Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 14 Feb 2013 16:13:32 +0100 Subject: [PATCH] nicer curriculum errors --- curriculum/static/curriculum/curriculum.css | 13 +++++++++++- curriculum/static/curriculum/curriculum.scss | 22 +++++++++++++++++++- curriculum/views.py | 5 +++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/curriculum/static/curriculum/curriculum.css b/curriculum/static/curriculum/curriculum.css index e1b5f90..9ae2e35 100644 --- a/curriculum/static/curriculum/curriculum.css +++ b/curriculum/static/curriculum/curriculum.css @@ -4,6 +4,16 @@ border-radius: 0.688em; background: #ADAEAF; color: white; } + .curriculum-form a { + cursor: pointer; } + .curriculum-form a:hover { + text-decoration: underline; } + .curriculum-form .error { + padding-left: 1em; + border-radius: .5em; + background: #ed7831; + color: white; + font-weight: bold; } .curriculum-form h2 { margin: 0; } .curriculum-form h2 a { @@ -26,4 +36,5 @@ display: inline-block; width: 13em; } .curriculum-form .curriculum-section-toggler { - display: none; } + display: none; + color: white; } diff --git a/curriculum/static/curriculum/curriculum.scss b/curriculum/static/curriculum/curriculum.scss index a99dc6f..355a6c5 100755 --- a/curriculum/static/curriculum/curriculum.scss +++ b/curriculum/static/curriculum/curriculum.scss @@ -1,4 +1,7 @@ $px: 0.0625em; +$oranji: #ed7831; +$ciemny: #363a3e; +$zielony: #16a487; .curriculum-form { border: 1px solid #ddd; @@ -6,7 +9,23 @@ $px: 0.0625em; border-radius: 11*$px; background: #ADAEAF; color: white; - + + a { + cursor: pointer; + } + a:hover { + text-decoration: underline; + } + + .error { + padding-left: 1em; + border-radius: .5em; + background: $oranji; + color: white; + font-weight: bold; + + } + h2 { margin: 0; a { @@ -38,6 +57,7 @@ $px: 0.0625em; .curriculum-section-toggler { display: none; + color: white; } .categories { diff --git a/curriculum/views.py b/curriculum/views.py index e5d30c7..b643ae2 100644 --- a/curriculum/views.py +++ b/curriculum/views.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 from django.db import models from django.views.generic import DetailView, ListView from django.utils.datastructures import SortedDict @@ -45,9 +46,9 @@ class CompetencesView(ListView): if not (comp_ids or sect_ids): if level: - errors["competences"] = "Please!" + errors["competences"] = u"Proszę wybrać kompetencje z listy." elif level is None: - errors["level"] = "Please!" + errors["level"] = u"Proszę wybrać poziom edukacyjny." else: chosen_competences = SortedDict() for competence in Competence.objects.filter( -- 2.20.1