Преглед на файлове

green color + handle form with django models + save in database

master
David Beltra преди 1 година
родител
ревизия
7f90636792
променени са 15 файла, в които са добавени 7627 реда и са изтрити 245 реда
  1. +4
    -0
      apps/nominations/admin.py
  2. +40
    -0
      apps/nominations/forms.py
  3. +30
    -0
      apps/nominations/migrations/0001_initial.py
  4. +0
    -0
      apps/nominations/migrations/__init__.py
  5. +15
    -0
      apps/nominations/models.py
  6. +26
    -66
      apps/nominations/templates/pages/nominierungen.html
  7. +0
    -0
      apps/nominations/templatetags/__init__.py
  8. +8
    -0
      apps/nominations/templatetags/form_filters.py
  9. +28
    -34
      apps/nominations/views.py
  10. +7319
    -0
      apps/pep_theme/static/css/boostrap.css
  11. +1
    -0
      apps/pep_theme/static/css/boostrap.css.map
  12. +106
    -106
      apps/pep_theme/static/css/bootstrap.css
  13. +2
    -2
      apps/pep_theme/static/scss/bootstrap/_variables.scss
  14. Двоични данни
      locale/en/LC_MESSAGES/django.mo
  15. +48
    -37
      locale/en/LC_MESSAGES/django.po

+ 4
- 0
apps/nominations/admin.py Целия файл

@@ -0,0 +1,4 @@
from django.contrib import admin
from .models import Nomination

admin.site.register(Nomination)

+ 40
- 0
apps/nominations/forms.py Целия файл

@@ -0,0 +1,40 @@
from django import forms
from django.forms import ModelForm
from django.utils.translation import gettext_lazy as _
from .models import Nomination

class NominationForm(ModelForm):
class Meta:
model = Nomination
fields = ['nominated', 'reasons_nomination', 'name', 'email', 'sk', 'dg', 'pep', 'ccc']
labels = {
'nominated': _("Nominiert wird"),
'reasons_nomination': _("Grund der Nominierung"),
'name': _("Ihr Name/Pseudonym *"),
'email': _("Ihre E-Mail-Adresse *"),
'sk': _("Stiftung für Konsumentenschutz"),
'dg': _("Digitale Gesellschaft"),
'pep': _("p≡p Foundation"),
'ccc': _("Chaos Computer Club Schweiz (CCC-CH)"),
}
help_texts = {
'nominated': _("Name, Adresse, Tel. Nr, Webseite etc."),
'reasons_nomination': _("Begründung; welcher Personenkreis ist von den Eingriffen/der Kontrolle besonders betroffen; Quellen, Presseartikel, Dokumente, URLs"),
'name': _("* Angabe freiwillig"),
'email': _("* Angabe freiwillig"),
'sk': _("Bitte tragen Sie mich in Ihren Newsletter ein:"),
}

def clean(self):
cleaned_data = super(NominationForm, self).clean()
email = cleaned_data.get('email')
if email == '' or email == None:
sk = cleaned_data.get('sk')
dg = cleaned_data.get('dg')
pep = cleaned_data.get('pep')
ccc = cleaned_data.get('ccc')

if sk or dg or pep or ccc:
raise forms.ValidationError(str(_('Bitte geben Sie eine gültige E-Mail-Adresse an, wenn Sie einen Newsletter abonnieren möchten.')))

return cleaned_data

+ 30
- 0
apps/nominations/migrations/0001_initial.py Целия файл

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-02-22 10:06
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Nomination',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255, null=True)),
('email', models.EmailField(blank=True, max_length=255, null=True)),
('nominated', models.CharField(max_length=255)),
('reasons_nomination', models.TextField()),
('sk', models.BooleanField(default=False)),
('dg', models.BooleanField(default=False)),
('pep', models.BooleanField(default=False)),
('ccc', models.BooleanField(default=False)),
],
),
]

+ 0
- 0
apps/nominations/migrations/__init__.py Целия файл


+ 15
- 0
apps/nominations/models.py Целия файл

@@ -0,0 +1,15 @@
from django.db import models
from django.utils.translation import ugettext, ugettext_lazy as _

class Nomination(models.Model):
name = models.CharField(max_length=255, blank=True, null=True)
email = models.EmailField(max_length=255, blank=True, null=True)
nominated = models.CharField(max_length=255)
reasons_nomination = models.TextField()
sk = models.BooleanField(default=False)
dg = models.BooleanField(default=False)
pep = models.BooleanField(default=False)
ccc = models.BooleanField(default=False)

def __str__(self):
return self.nominated

+ 26
- 66
apps/nominations/templates/pages/nominierungen.html Целия файл

@@ -1,5 +1,5 @@
{% extends "pages/richtextpage.html" %}
{% load i18n mezzanine_tags pages_tags %}
{% load i18n mezzanine_tags pages_tags form_filters %}

{% block main %}

@@ -20,81 +20,41 @@
<form id="nominations-form" class="mezzanine-form" method="post" action="/nominierungen/">

{% csrf_token %}
{% if form.non_field_errors %}
<div class="alert alert-error">{{ form.non_field_errors }}</div>
{% endif %}

<div class="form-group input_id_nominated charfield">
<label class="control-label" for="id_nominated">{% trans "Nominiert wird" %}</label>
<input type="text" name="nominated" maxlength="2000" required="" id="id_nominated">
<p class="help-block">{% trans "Name, Adresse, Tel. Nr, Webseite etc." %}</p>
{% nevercache %}
{% if messages %}
{% for message in messages %}
{% if message.extra_tags == 'nominated' %}
<p class="alert alert-{{ message.level_tag }}">{{message}}</p>
{% endif %}
{% endfor %}
{% endif %}
{% endnevercache %}
</div>
{% for field in form %}

<div class="form-group input_id_reasons_nomination charfield">
<label class="control-label" for="id_reasons_nomination">{% trans "Grund der Nominierung" %}</label>
<textarea name="reasons_nomination" cols="40" rows="10" maxlength="2000" required="" id="id_reasons_nomination" class="input-xlarge"></textarea>
<p class="help-block">{% trans "Begründung; welcher Personenkreis ist von den Eingriffen/der Kontrolle besonders betroffen; Quellen, Presseartikel, Dokumente, URLs" %}</p>
{% nevercache %}
{% if messages %}
{% for message in messages %}
{% if message.extra_tags == 'reasons_nomination' %}
<p class="alert alert-{{ message.level_tag }}">{{message}}</p>
{% endif %}
{% endfor %}
{% endif %}
{% endnevercache %}
</div>
<div class="form-group">
{% if field.field.widget|is_checkbox %}

<div class="form-group input_id_name charfield">
<label class="control-label" for="id_name">{% trans "Ihr Name" %}</label>
<input type="text" name="name" maxlength="2000" id="id_name">
</div>
{% if field.help_text %}
<p>{{field.help_text}}</p>
{% endif %}

<div class="form-group input_id_email emailfield">
<label class="control-label" for="id_email">{% trans "Ihre E-Mail-Adresse" %}</label>
<input type="email" name="email" id="id_email">
{{ field }} {{ field.label_tag }}

{% nevercache %}
{% if messages %}
{% for message in messages %}
{% if message.extra_tags == 'email' %}
<p class="alert alert-{{ message.level_tag }}">{{message}}</p>
{% endif %}
{% endfor %}
{% endif %}
{% endnevercache %}
</div>
{% else %}

{{ field.label_tag }}
{{ field }}

<p>{% trans "Bitte tragen Sie mich in Ihren Newsletter ein:" %}</p>
{% if field.help_text %}
<p class="help-block">{{field.help_text}}</p>
{% endif %}

<span class="subscriptions">
<div class="form-group input_id_sk booleanfield">
<input type="checkbox" name="sk" id="id_sk">
<label class="control-label" for="id_sk">{% trans "Stiftung für Konsumentenschutz" %}</label>
</div>

<div class="form-group input_id_dg booleanfield">
<input type="checkbox" name="dg" id="id_dg">
<label class="control-label" for="id_dg">{% trans "Digitale Gesellschaft" %}</label>
</div>
{% endif %}
{% nevercache %}
{% if field.errors %}
<p class="alert alert-error">{{field.errors}}</p>
{% endif %}
{% endnevercache %}
</div>

<div class="form-group input_id_pep booleanfield">
<input type="checkbox" name="pep" id="id_pep">
<label class="control-label" for="id_pep">{% trans "p≡p Foundation" %}</label>
</div>
{% endfor %}

<div class="form-group input_id_ccc booleanfield">
<input type="checkbox" name="ccc" id="id_ccc">
<label class="control-label" for="id_ccc">{% trans "Chaos Computer Club Schweiz (CCC-CH)" %}</label>
</div>
</span>

<div class="form-actions">
<input class="btn btn-primary btn-lg" type="submit" value="Nominieren">


+ 0
- 0
apps/nominations/templatetags/__init__.py Целия файл


+ 8
- 0
apps/nominations/templatetags/form_filters.py Целия файл

@@ -0,0 +1,8 @@
from django import template
from django.forms.fields import CheckboxInput

register = template.Library()

@register.filter(name='is_checkbox')
def is_checkbox(value):
return isinstance(value, CheckboxInput)

+ 28
- 34
apps/nominations/views.py Целия файл

@@ -7,7 +7,8 @@ from mezzanine.pages.page_processors import processor_for
from mezzanine.pages.models import Page
import re

EMAIL_REGEX = re.compile(r"[^@]+@[^@]+\.[^@]+")
from django import forms
from .forms import NominationForm

@processor_for("nominierungen")
def sendNomination(request, page=None):
@@ -15,52 +16,45 @@ def sendNomination(request, page=None):
if request.method == 'POST':

page = Page.objects.get(slug="nominierungen")
form_valid = True

email = request.POST.get('email')
nominated = request.POST.get('nominated')
reasons_nomination = request.POST.get('reasons_nomination')
form = NominationForm(request.POST, label_suffix='')
if form.is_valid():

if email != "" and not EMAIL_REGEX.match(email):
form_valid = False
messages.error(request, str(_('Ungültige E-Mail')), extra_tags='email')

if nominated == '':
form_valid = False
messages.error(request, str(_('Pflichtfeld')), extra_tags='nominated')
try:

if reasons_nomination == '':
form_valid = False
messages.error(request, str(_('Pflichtfeld')), extra_tags='reasons_nomination')
name = form.cleaned_data['name']
email = form.cleaned_data['email']
nominated = form.cleaned_data['nominated']
reasons_nomination = form.cleaned_data['reasons_nomination']

if form_valid:
is_valid = True
subject = 'Nomination sumbitted'
message = ''

try:
if name != '':
message += 'Name: ' + name
if email != '':
message += ' Email: ' + email

subject = 'Nomination sumbitted'
message = 'Nominated: ' + nominated + ' Reasons: ' + reasons_nomination
message += ' Nominated: ' + nominated + ' Reasons: ' + reasons_nomination
from_email = 'no-reply@bba.pep.foundation'
# recipient_list = ['bba-jury@pep.foundation']
recipient_list = ['dbe@pep.security']

email = EmailMessage(subject, message, from_email, recipient_list)
email.send()

except Exception:
messages.error(request, str(_('Fehler beim Senden des Formulars')), extra_tags='general')
is_valid = False

if request.POST.get('sk') == 'on':
print('email Stiftung für Konsumentenschutz')

if request.POST.get('dg') == 'on':
print('email Digitale Gesellschaft')
form.add_error(None, str(_('Fehler beim Senden des Formulars')))
return {
'form': form
}

if request.POST.get('pep') == 'on':
print('email pEp')
form.save()
return HttpResponseRedirect('/danke/')

if request.POST.get('ccc') == 'on':
print('email CCC')
else:
form = NominationForm(label_suffix='')

if is_valid:
return HttpResponseRedirect('/danke/')
return {
'form': form
}

+ 7319
- 0
apps/pep_theme/static/css/boostrap.css
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 1
- 0
apps/pep_theme/static/css/boostrap.css.map
Файловите разлики са ограничени, защото са твърде много
Целия файл


+ 106
- 106
apps/pep_theme/static/css/bootstrap.css Целия файл

@@ -1410,11 +1410,11 @@ textarea {
}

a {
color: #3e51d2;
color: #03AA4B;
text-decoration: none;
}
a:hover, a:focus {
color: #3e51d2;
color: #03AA4B;
text-decoration: underline;
}
a:focus {
@@ -1639,12 +1639,12 @@ mark,
}

.text-primary {
color: #25328a;
color: #03AA4B;
}

a.text-primary:hover,
a.text-primary:focus {
color: #1a2362;
color: #027835;
}

.text-success {
@@ -1688,21 +1688,21 @@ a.text-danger:focus {
}

.bg-primary {
background-color: #25328a;
background-color: #03AA4B;
}

a.bg-primary:hover,
a.bg-primary:focus {
background-color: #1a2362;
background-color: #027835;
}

.bg-success {
background-color: #3e51d2;
background-color: #03AA4B;
}

a.bg-success:hover,
a.bg-success:focus {
background-color: #2a3bb3;
background-color: #027835;
}

.bg-info {
@@ -2950,12 +2950,12 @@ table th[class*=col-] {
.table > tfoot > tr > th.success,
.table > tfoot > tr.success > td,
.table > tfoot > tr.success > th {
background-color: #3e51d2;
background-color: #03AA4B;
}

.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th {
background-color: #2f42c8;
background-color: #039140;
}

.table > thead > tr > td.info,
@@ -3149,10 +3149,10 @@ output {
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
.form-control:focus {
border-color: #25328a;
border-color: #03AA4B;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(37, 50, 138, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(37, 50, 138, 0.6);
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(3, 170, 75, 0.6);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(3, 170, 75, 0.6);
}
.form-control::-moz-placeholder {
color: #acb6c0;
@@ -3464,7 +3464,7 @@ select[multiple].input-lg,
.has-success .input-group-addon {
color: #fff;
border-color: #fff;
background-color: #3e51d2;
background-color: #03AA4B;
}
.has-success .form-control-feedback {
color: #fff;
@@ -3720,75 +3720,75 @@ a.btn.disabled, fieldset[disabled] a.btn {

.btn-primary {
color: #fff;
background-color: #25328a;
border-color: #25328a;
background-color: #03AA4B;
border-color: #03AA4B;
}
.btn-primary:focus, .btn-primary.focus {
color: #fff;
background-color: #1a2362;
border-color: #0a0e25;
background-color: #027835;
border-color: #012d14;
}
.btn-primary:hover {
color: #fff;
background-color: #1a2362;
border-color: #18215a;
background-color: #027835;
border-color: #026e30;
}
.btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
color: #fff;
background-color: #1a2362;
border-color: #18215a;
background-color: #027835;
border-color: #026e30;
}
.btn-primary:active:hover, .btn-primary:active:focus, .btn-primary:active.focus, .btn-primary.active:hover, .btn-primary.active:focus, .btn-primary.active.focus, .open > .btn-primary.dropdown-toggle:hover, .open > .btn-primary.dropdown-toggle:focus, .open > .btn-primary.dropdown-toggle.focus {
color: #fff;
background-color: #131946;
border-color: #0a0e25;
background-color: #015525;
border-color: #012d14;
}
.btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle {
background-image: none;
}
.btn-primary.disabled:hover, .btn-primary.disabled:focus, .btn-primary.disabled.focus, .btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary:hover, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary.focus {
background-color: #25328a;
border-color: #25328a;
background-color: #03AA4B;
border-color: #03AA4B;
}
.btn-primary .badge {
color: #25328a;
color: #03AA4B;
background-color: #fff;
}

.btn-success {
color: #fff;
background-color: #3e51d2;
border-color: #3e51d2;
background-color: #03AA4B;
border-color: #03AA4B;
}
.btn-success:focus, .btn-success.focus {
color: #fff;
background-color: #2a3bb3;
border-color: #1b2775;
background-color: #027835;
border-color: #012d14;
}
.btn-success:hover {
color: #fff;
background-color: #2a3bb3;
border-color: #2839ab;
background-color: #027835;
border-color: #026e30;
}
.btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle {
color: #fff;
background-color: #2a3bb3;
border-color: #2839ab;
background-color: #027835;
border-color: #026e30;
}
.btn-success:active:hover, .btn-success:active:focus, .btn-success:active.focus, .btn-success.active:hover, .btn-success.active:focus, .btn-success.active.focus, .open > .btn-success.dropdown-toggle:hover, .open > .btn-success.dropdown-toggle:focus, .open > .btn-success.dropdown-toggle.focus {
color: #fff;
background-color: #233296;
border-color: #1b2775;
background-color: #015525;
border-color: #012d14;
}
.btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle {
background-image: none;
}
.btn-success.disabled:hover, .btn-success.disabled:focus, .btn-success.disabled.focus, .btn-success[disabled]:hover, .btn-success[disabled]:focus, .btn-success[disabled].focus, fieldset[disabled] .btn-success:hover, fieldset[disabled] .btn-success:focus, fieldset[disabled] .btn-success.focus {
background-color: #3e51d2;
border-color: #3e51d2;
background-color: #03AA4B;
border-color: #03AA4B;
}
.btn-success .badge {
color: #3e51d2;
color: #03AA4B;
background-color: #fff;
}

@@ -3904,7 +3904,7 @@ a.btn.disabled, fieldset[disabled] a.btn {
}

.btn-link {
color: #3e51d2;
color: #03AA4B;
font-weight: normal;
border-radius: 0;
}
@@ -3917,7 +3917,7 @@ a.btn.disabled, fieldset[disabled] a.btn {
border-color: transparent;
}
.btn-link:hover, .btn-link:focus {
color: #3e51d2;
color: #03AA4B;
text-decoration: underline;
background-color: transparent;
}
@@ -4064,14 +4064,14 @@ tbody.collapse.in {
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus {
text-decoration: none;
color: #fff;
background-color: #25328a;
background-color: #03AA4B;
}

.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
color: #fff;
text-decoration: none;
outline: 0;
background-color: #25328a;
background-color: #03AA4B;
}

.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus {
@@ -4514,7 +4514,7 @@ tbody.collapse.in {
}
.nav .open > a, .nav .open > a:hover, .nav .open > a:focus {
background-color: #ecf0f1;
border-color: #3e51d2;
border-color: #03AA4B;
}
.nav .nav-divider {
height: 1px;
@@ -4543,7 +4543,7 @@ tbody.collapse.in {
border-color: #ecf0f1 #ecf0f1 #ecf0f1;
}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
color: #25328a;
color: #03AA4B;
background-color: #fff;
border: 1px solid #ecf0f1;
border-bottom-color: transparent;
@@ -4560,7 +4560,7 @@ tbody.collapse.in {
}
.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
color: #fff;
background-color: #25328a;
background-color: #03AA4B;
}

.nav-stacked > li {
@@ -4993,14 +4993,14 @@ tbody.collapse.in {
}
}
.navbar-default {
background-color: #25328a;
background-color: #03AA4B;
border-color: transparent;
}
.navbar-default .navbar-brand {
color: #fff;
}
.navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus {
color: #919ce5;
color: #18fb7a;
background-color: transparent;
}
.navbar-default .navbar-text {
@@ -5010,22 +5010,22 @@ tbody.collapse.in {
color: #fff;
}
.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
color: #919ce5;
color: #18fb7a;
background-color: transparent;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
color: #fff;
background-color: #1a2362;
background-color: #027835;
}
.navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus {
color: #ccc;
background-color: transparent;
}
.navbar-default .navbar-toggle {
border-color: #1a2362;
border-color: #027835;
}
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
background-color: #1a2362;
background-color: #027835;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
@@ -5035,7 +5035,7 @@ tbody.collapse.in {
border-color: transparent;
}
.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus {
background-color: #1a2362;
background-color: #027835;
color: #fff;
}
@media (max-width: 767px) {
@@ -5043,12 +5043,12 @@ tbody.collapse.in {
color: #fff;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #919ce5;
color: #18fb7a;
background-color: transparent;
}
.navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-color: #1a2362;
background-color: #027835;
}
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #ccc;
@@ -5059,27 +5059,27 @@ tbody.collapse.in {
color: #fff;
}
.navbar-default .navbar-link:hover {
color: #919ce5;
color: #18fb7a;
}
.navbar-default .btn-link {
color: #fff;
}
.navbar-default .btn-link:hover, .navbar-default .btn-link:focus {
color: #919ce5;
color: #18fb7a;
}
.navbar-default .btn-link[disabled]:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:hover, fieldset[disabled] .navbar-default .btn-link:focus {
color: #ccc;
}

.navbar-inverse {
background-color: #3e51d2;
background-color: #03AA4B;
border-color: transparent;
}
.navbar-inverse .navbar-brand {
color: #fff;
}
.navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus {
color: #25328a;
color: #03AA4B;
background-color: transparent;
}
.navbar-inverse .navbar-text {
@@ -5089,32 +5089,32 @@ tbody.collapse.in {
color: #fff;
}
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus {
color: #25328a;
color: #03AA4B;
background-color: transparent;
}
.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus {
color: #fff;
background-color: #2f42c8;
background-color: #039140;
}
.navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus {
color: #ccc;
background-color: transparent;
}
.navbar-inverse .navbar-toggle {
border-color: #2a3bb3;
border-color: #027835;
}
.navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus {
background-color: #2a3bb3;
background-color: #027835;
}
.navbar-inverse .navbar-toggle .icon-bar {
background-color: #fff;
}
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
border-color: #2d40c0;
border-color: #02873c;
}
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus {
background-color: #2f42c8;
background-color: #039140;
color: #fff;
}
@media (max-width: 767px) {
@@ -5128,12 +5128,12 @@ tbody.collapse.in {
color: #fff;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
color: #25328a;
color: #03AA4B;
background-color: transparent;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-color: #2f42c8;
background-color: #039140;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #ccc;
@@ -5144,13 +5144,13 @@ tbody.collapse.in {
color: #fff;
}
.navbar-inverse .navbar-link:hover {
color: #25328a;
color: #03AA4B;
}
.navbar-inverse .btn-link {
color: #fff;
}
.navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus {
color: #25328a;
color: #03AA4B;
}
.navbar-inverse .btn-link[disabled]:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:hover, fieldset[disabled] .navbar-inverse .btn-link:focus {
color: #ccc;
@@ -5192,7 +5192,7 @@ tbody.collapse.in {
line-height: 1.428571429;
text-decoration: none;
color: #fff;
background-color: #3e51d2;
background-color: #03AA4B;
border: 1px solid transparent;
margin-left: -1px;
}
@@ -5212,7 +5212,7 @@ tbody.collapse.in {
.pagination > li > span:focus {
z-index: 2;
color: #fff;
background-color: #25359f;
background-color: #025f2a;
border-color: transparent;
}
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,
@@ -5221,7 +5221,7 @@ tbody.collapse.in {
.pagination > .active > span:focus {
z-index: 3;
color: #fff;
background-color: #25359f;
background-color: #025f2a;
border-color: transparent;
cursor: default;
}
@@ -5232,7 +5232,7 @@ tbody.collapse.in {
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
color: #ecf0f1;
background-color: #7c89e0;
background-color: #04f56c;
border-color: transparent;
cursor: not-allowed;
}
@@ -5291,14 +5291,14 @@ tbody.collapse.in {
.pager li > span {
display: inline-block;
padding: 5px 14px;
background-color: #3e51d2;
background-color: #03AA4B;
border: 1px solid transparent;
border-radius: 15px;
}
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #25359f;
background-color: #025f2a;
}
.pager .next > a,
.pager .next > span {
@@ -5313,7 +5313,7 @@ tbody.collapse.in {
.pager .disabled > a:focus,
.pager .disabled > span {
color: #fff;
background-color: #3e51d2;
background-color: #03AA4B;
cursor: not-allowed;
}

@@ -5351,17 +5351,17 @@ a.label:hover, a.label:focus {
}

.label-primary {
background-color: #25328a;
background-color: #03AA4B;
}
.label-primary[href]:hover, .label-primary[href]:focus {
background-color: #1a2362;
background-color: #027835;
}

.label-success {
background-color: #3e51d2;
background-color: #03AA4B;
}
.label-success[href]:hover, .label-success[href]:focus {
background-color: #2a3bb3;
background-color: #027835;
}

.label-info {
@@ -5396,7 +5396,7 @@ a.label:hover, a.label:focus {
vertical-align: middle;
white-space: nowrap;
text-align: center;
background-color: #25328a;
background-color: #03AA4B;
border-radius: 10px;
}
.badge:empty {
@@ -5411,7 +5411,7 @@ a.label:hover, a.label:focus {
padding: 1px 5px;
}
.list-group-item.active > .badge, .nav-pills > .active > a > .badge {
color: #25328a;
color: #03AA4B;
background-color: #fff;
}
.list-group-item > .badge {
@@ -5500,7 +5500,7 @@ a.badge:hover, a.badge:focus {
a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
border-color: #3e51d2;
border-color: #03AA4B;
}

.alert {
@@ -5537,12 +5537,12 @@ a.thumbnail.active {
}

.alert-success {
background-color: #3e51d2;
border-color: #3e51d2;
background-color: #03AA4B;
border-color: #03AA4B;
color: #fff;
}
.alert-success hr {
border-top-color: #2f42c8;
border-top-color: #039140;
}
.alert-success .alert-link {
color: #e6e6e6;
@@ -5618,7 +5618,7 @@ a.thumbnail.active {
line-height: 21px;
color: #fff;
text-align: center;
background-color: #25328a;
background-color: #03AA4B;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-transition: width 0.6s ease;
@@ -5642,7 +5642,7 @@ a.thumbnail.active {
}

.progress-bar-success {
background-color: #3e51d2;
background-color: #03AA4B;
}
.progress-striped .progress-bar-success {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
@@ -5794,8 +5794,8 @@ button.list-group-item {
.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus {
z-index: 2;
color: #fff;
background-color: #25328a;
border-color: #25328a;
background-color: #03AA4B;
border-color: #03AA4B;
}
.list-group-item.active .list-group-item-heading,
.list-group-item.active .list-group-item-heading > small,
@@ -5807,12 +5807,12 @@ button.list-group-item {
color: inherit;
}
.list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text {
color: #98a1e3;
color: #7cfdb4;
}

.list-group-item-success {
color: #fff;
background-color: #3e51d2;
background-color: #03AA4B;
}

a.list-group-item-success,
@@ -5827,7 +5827,7 @@ a.list-group-item-success:hover, a.list-group-item-success:focus,
button.list-group-item-success:hover,
button.list-group-item-success:focus {
color: #fff;
background-color: #2f42c8;
background-color: #039140;
}
a.list-group-item-success.active, a.list-group-item-success.active:hover, a.list-group-item-success.active:focus,
button.list-group-item-success.active,
@@ -6204,41 +6204,41 @@ button.list-group-item-danger.active:focus {
}

.panel-primary {
border-color: #25328a;
border-color: #03AA4B;
}
.panel-primary > .panel-heading {
color: #fff;
background-color: #25328a;
border-color: #25328a;
background-color: #03AA4B;
border-color: #03AA4B;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #25328a;
border-top-color: #03AA4B;
}
.panel-primary > .panel-heading .badge {
color: #25328a;
color: #03AA4B;
background-color: #fff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #25328a;
border-bottom-color: #03AA4B;
}

.panel-success {
border-color: #3e51d2;
border-color: #03AA4B;
}
.panel-success > .panel-heading {
color: #fff;
background-color: #3e51d2;
border-color: #3e51d2;
background-color: #03AA4B;
border-color: #03AA4B;
}
.panel-success > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #3e51d2;
border-top-color: #03AA4B;
}
.panel-success > .panel-heading .badge {
color: #3e51d2;
color: #03AA4B;
background-color: #fff;
}
.panel-success > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #3e51d2;
border-bottom-color: #03AA4B;
}

.panel-info {


+ 2
- 2
apps/pep_theme/static/scss/bootstrap/_variables.scss Целия файл

@@ -15,8 +15,8 @@ $gray: #95a5a6 !default; // #555
$gray-light: #b4bcc2 !default; // #999
$gray-lighter: #ecf0f1 !default; // #eee

$brand-primary: #25328a !default;
$brand-success: #3e51d2 !default;
$brand-primary: #03AA4B !default;
$brand-success: #03AA4B !default;
$brand-info: #3498DB !default;
$brand-warning: #F39C12 !default;
$brand-danger: #E74C3C !default;


Двоични данни
locale/en/LC_MESSAGES/django.mo Целия файл


+ 48
- 37
locale/en/LC_MESSAGES/django.po Целия файл

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-18 15:04+0000\n"
"POT-Creation-Date: 2019-02-22 11:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -89,67 +89,69 @@ msgstr ""
msgid "Icon"
msgstr ""

#: apps/nominations/templates/pages/nominierungen.html:25
#: apps/nominations/forms.py:11
msgid "Nominiert wird"
msgstr "Nominated"

#: apps/nominations/templates/pages/nominierungen.html:27
msgid "Name, Adresse, Tel. Nr, Webseite etc."
msgstr "Name, address, telephone, website etc."

#: apps/nominations/templates/pages/nominierungen.html:40
#: apps/nominations/forms.py:12
msgid "Grund der Nominierung"
msgstr "Reason for the nomination"

#: apps/nominations/templates/pages/nominierungen.html:42
msgid ""
"Begründung; welcher Personenkreis ist von den Eingriffen/der Kontrolle "
"besonders betroffen; Quellen, Presseartikel, Dokumente, URLs"
msgstr ""
"Justification, which group of persons is particularly affected by "
"interference / control, sources, press articles, documents, URLs"

#: apps/nominations/templates/pages/nominierungen.html:55
msgid "Ihr Name"
msgstr "Your name"
#: apps/nominations/forms.py:13
msgid "Ihr Name/Pseudonym *"
msgstr "Your name/nickname *"

#: apps/nominations/templates/pages/nominierungen.html:60
msgid "Ihre E-Mail-Adresse"
msgstr "Your email"
#: apps/nominations/forms.py:14
msgid "Ihre E-Mail-Adresse *"
msgstr "Your email *"

#: apps/nominations/templates/pages/nominierungen.html:75
msgid "Bitte tragen Sie mich in Ihren Newsletter ein:"
msgstr "Please subscribe me to:"

#: apps/nominations/templates/pages/nominierungen.html:80
#: apps/nominations/forms.py:15
msgid "Stiftung für Konsumentenschutz"
msgstr ""

#: apps/nominations/templates/pages/nominierungen.html:85
#: apps/nominations/forms.py:16
msgid "Digitale Gesellschaft"
msgstr ""

#: apps/nominations/templates/pages/nominierungen.html:90
#: apps/nominations/forms.py:17
msgid "p≡p Foundation"
msgstr ""

#: apps/nominations/templates/pages/nominierungen.html:95
#: apps/nominations/forms.py:18
msgid "Chaos Computer Club Schweiz (CCC-CH)"
msgstr ""

#: apps/nominations/views.py:29
msgid "Ungültige E-Mail"
msgstr "Invalid email"
#: apps/nominations/forms.py:21
msgid "Name, Adresse, Tel. Nr, Webseite etc."
msgstr "Name, address, telephone, website etc."

#: apps/nominations/forms.py:22
msgid ""
"Begründung; welcher Personenkreis ist von den Eingriffen/der Kontrolle "
"besonders betroffen; Quellen, Presseartikel, Dokumente, URLs"
msgstr ""
"Justification, which group of persons is particularly affected by "
"interference / control, sources, press articles, documents, URLs"

#: apps/nominations/forms.py:23 apps/nominations/forms.py:24
msgid "* Angabe freiwillig"
msgstr "* Optional field"

#: apps/nominations/views.py:33 apps/nominations/views.py:37
msgid "Pflichtfeld"
msgstr "Required field"
#: apps/nominations/forms.py:25
msgid "Bitte tragen Sie mich in Ihren Newsletter ein:"
msgstr "Please subscribe me to:"

#: apps/nominations/forms.py:38
msgid ""
"Bitte geben Sie eine gültige E-Mail-Adresse an, wenn Sie einen Newsletter "
"abonnieren möchten."
msgstr "Please provide a valid email address to subscribe to our newsletters."

#: apps/nominations/views.py:53
#: apps/nominations/views.py:46
msgid "Fehler beim Senden des Formulars"
msgstr "Error submitting form"

#: apps/pep_theme/templates/base.html:65
#: apps/pep_theme/templates/base.html:67
msgid "Toggle Navigation"
msgstr ""

@@ -164,3 +166,12 @@ msgstr ""
#: bigbrother/settings.py:116
msgid "English"
msgstr ""

#~ msgid "Ihr Name"
#~ msgstr "Your name"

#~ msgid "Ungültige E-Mail"
#~ msgstr "Invalid email"

#~ msgid "Pflichtfeld"
#~ msgstr "Required field"

Loading…
Отказ
Запис