tout plein de modif, toujours pas fini

This commit is contained in:
Qwann 2016-07-14 19:29:15 +02:00
parent 6e314afd70
commit f14ddef88a
13 changed files with 342 additions and 167 deletions

View file

@ -176,7 +176,6 @@ class UserProfileForm(forms.ModelForm):
super(UserProfileForm, self).__init__(*args, **kw)
self.fields['first_name'].initial = self.instance.user.first_name
self.fields['last_name'].initial = self.instance.user.last_name
self.fields.keyOrder = [
'first_name',
'last_name',

View file

@ -1,9 +1,9 @@
html,body {
background-color : #A7D4CD;
font-family: 'Hind', sans-serif;
/*
font-family: 'Roboto', sans-serif;
font-family: 'Hind', sans-serif;
*/
font-family: 'Roboto', sans-serif;
}
#principal {
@ -27,6 +27,10 @@ html,body {
min-height : 30px;
}
.no-bottom-margin {
margin-bottom: 0px !important;
}
.spacer {
clear: both;
}
@ -77,6 +81,7 @@ table#bda_formset {
width: 32px;
}
/*
.tools {
width: 32px;
}
@ -87,12 +92,72 @@ table#bda_formset {
.tools a.icon.drag-handler {
margin-right: 5px;
}*/
.form-horizontal .form-group {
margin-right: 0px;
margin-left: 0px;
}
form .control-label {
color: #B56A59;
}
.remove-btn {
color: #E6516A ;
font-size: x-large;
}
.drag-btn {
color :#4F504B;
font-size: x-large;
}
.btn-primary,
.btn-primary:active,
.btn-primary:focus,
.btn-primary.focus {
color: #fff;
background-color: #DE826B;
border-color: #4F504B;
}
.btn-primary:active:hover,
.btn-primary:hover {
color: #fff;
background-color: #D89C8D;
border-color: #4F504B;
}
label {
font-weight: normal;
}
form#bda_form {
margin-top:15px;
}
form#bda_form p {
font-size: 0.8em;
}
form#bda_form thead {
color : #B56A59
}
form#bda_form label.control-label {
visibility: hidden;
}
form#bda_form thead {
background-color: #F7F7F7;
}
form#bda_form {
margin-top: 0px;
margin-left: -20px;
margin-right: -20px;
}
table#bda_formset {
border-spacing: 0px 5px;
}
@ -100,6 +165,22 @@ table#bda_formset {
tbody.bda_formset_content {
}
tr.dynamic-form td {
background: #F0F0F0;
}
tr.dynamic-form.predelete td {
background-color: #FFECEC;
}
tr.ui-sortable-placeholder td, .placeholder-cell {
background: transparent;
}
/*
tr.dynamic-form td {
border-width: 1px 1px 1px 0px;
border-style: solid;
@ -149,7 +230,7 @@ tr.ui-sortable-placeholder td:first-child {
tr.ui-sortable-placeholder td:last-child {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
}*/
form {
padding: 0;
@ -177,7 +258,6 @@ form#profile table td, form#profile table th {
/* reset the text-align */
text-align:left;
/* inline-block space fix */
margin-right:-4px;
}
form#profile table th {
@ -198,16 +278,21 @@ fieldset legend {
}
#main-login-container {
width: 500px;
margin: 7em auto;
margin-top : 7em;
margin-bottom: 7em;
}
#main-login-container .banner {
padding-right: 15px;
padding-left: 15px;
}
#main-login {
width: 500px;
border: 15px solid #333;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
background-color: #DE826B;
}
#main-login .btn-primary {
background-color: #B56A59
}
#main-content {
@ -215,20 +300,41 @@ fieldset legend {
padding: 20px;
}
#main-content h2 {
#main-content h2,
#main-content h3.horizontal-title {
display : block;
padding : 12px;
margin: -20px -20px 10px -20px ;
font-family: 'Dosis', sans-serif;
font-weight: 700;
font-size: x-large;
color: white;
background-color:#DE826B;
border-style: solid;
border-width: 0px 0px 5px 0px;
border-color: #4F504B;
}
#main-content h2 {
font-size: x-large;
background-color:#DE826B;
border-width: 0px 0px 5px 0px;
}
#main-content h3.horizontal-title {
font-weight: 700;
font-size: large;
background-color:#EAA594;
border-width: 0px 0px 3px 0px;
}
#main-content > h2,
#main-content > h3.horizontal-title {
margin-top:-10px;
}
#main-content > h2:first-child,
#main-content > h3.horizontal-title:first-child {
margin-top:-20px;
}
/*
main-container {
max-width: 95%;
@ -363,19 +469,19 @@ h4.block-title {
text-transform: uppercase;
}
#main form li {
#main-content form li {
list-style: none;
}
.success {
font-weight: bold;
color: #00B000;
color: #7AB85F;
background-color: transparent;
}
.error {
font-weight: bold;
color: #B00000;
color: #F6BEBE;
background-color: transparent;
}
@ -393,39 +499,32 @@ form#bda_form ul.errorlist li {
#main-login.login_block {
padding: 2em;
box-shadow: 0 0 100px #AAA inset;
}
a#login_clipper, a#login_outsider {
float: left;
display: block;
width: 250px;
#login_clipper, #login_outsider {
height: 200px;
text-align: center;
font-family: 'Droid Serif', serif;
font-size: 2em;
font-weight: bold;
line-height: 190px;
text-decoration: none;
color: #FFF;
padding: 70px 20px 40px 20px;
}
a#login_clipper {
background-color: #123E96;
box-shadow: 0 0 100px #040C78 inset;
#login_clipper {
background-color: #49A5E3;
}
a#login_clipper:hover {
background-color: #164BB6;
#login_clipper:hover {
background-color: #71B5E3;
}
a#login_outsider {
background-color: #961221;
box-shadow: 0 0 100px #780411 inset;
#login_outsider {
background-color: #E36748;
}
a#login_outsider:hover {
background-color: #B31729;
#login_outsider:hover {
background-color: #E38871;
}
#main-login label {
@ -543,9 +642,6 @@ header a:active {
float: left;
}*/
#main-login #header h1 {
float: none;
}
.user-is-cof {
color : #ADE297;
@ -563,10 +659,6 @@ tt {
font-weight: bold;
}
.error {
color: #BB0000;
background-color: transparent;
}
header .member-status {
float: left;
@ -616,23 +708,6 @@ header .open > .dropdown-toggle.btn-default {
/* FORMS --------------------------------- */
#main-login input {
border-width: 1px;
font-family: Verdana,sans-serif;
font-size: 1.1em;
color: #000;
padding: 3px;
min-height: 1.5em;
}
#main-login input[type="text"], #main-login input[type=password] {
border: 2px solid #888;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
box-shadow: 0 0 12px #AAA inset;
min-height: 2em;
}
input[disabled], input[readonly] {
color: #BBB;
@ -856,6 +931,11 @@ tr.awesome{
color: red;
}
.title-foot {
padding-right:0px;
padding-left:0px;
}
.foot-banner {
font-family: 'Dosis', sans-serif;
background-color :#4F504B;

View file

@ -7,8 +7,7 @@
<link type="text/css" rel="stylesheet" href="{% static "css/bootstrap.min.css" %}" />
<link type="text/css" rel="stylesheet" href="{% static "css/cof.css" %}" />
<link href="https://fonts.googleapis.com/css?family=Dosis:700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Dosis|Hind:300|Raleway|Roboto:300" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Dosis|Dosis:700|Raleway|Roboto:300,300i,700" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
{% block extra_head %}{% endblock %}

View file

@ -3,9 +3,18 @@
{% block interm_content %}
<div class="container hidden-xs espace"></div>
<div class="container">
<div class="row" id="main-content">
<div class="row row-centered">
<div class="col-xs-12 {%block page_size%}col-sm-12{%endblock%} col-centered" id="main-content">
{% block realcontent %}{% endblock %}
</div>
</div>
<div class="home-menu row row-centered">
<div class="visible-xs-block col-xs-12 title-foot">
<div class="foot-banner">
<h3>Pour tout problème : <tt>cof@ens.fr.</tt></h3>
</div>
</div>
</div><!-- /.row.home-menu -->
</div>
<div class="container hidden-xs espace"></div>
{% endblock %}

View file

@ -1,32 +1,36 @@
{% extends "base.html" %}
{% load bootstrap %}
{% block content %}
<div id="main-login-container">
<div id="main-login" class="login_block">
<div id="header">
<h1>{{ site.name }} &ndash; Connexion</h1>
<div id="main-login-container" class="container">
<div class="row row-centered">
<div class="col-xs-10 col-sm-8 col-md-5 col-centered">
<header>
<div class="banner">
<h1>GestioCOF &ndash; Connexion</h1>
</div>
</header>
<div id="main-login" class="login_block">
{% if form.errors %}
<p class="error">Identifiants incorrects.</p>
{% endif %}
<form class="form-horizontal" method="post" action="{% url 'gestioncof.views.login_ext' %}">
{% csrf_token %}
<div class="form-group">
<input class="form-control" id="id_username" maxlength="254" name="username" type="text" placeholder="Nom d'utilisateur">
</div>
<div class="form-group">
<input class="form-control" id="id_password" name="password" type="password" placeholder="Mot de passe">
</div>
<div class="form-actions">
<input type="submit" name="submit" class="btn btn-primary " value="Se Connecter" />
<input type="hidden" name="next" value="{{ next }}" />
</div>
</form>
</div>
{% if form.errors %}
<p class="error">Identifiants incorrects.</p>
{% endif %}
<form method="post" action="{% url 'gestioncof.views.login_ext' %}">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<input type="submit" name="submit" class="btn-submit" value="SE CONNECTER" />
<input type="hidden" name="next" value="{{ next }}" />
</form>
</div>
</div><!-- /.row -->
</div>
{% endblock %}

View file

@ -1,15 +1,29 @@
{% extends "base.html" %}
{% block content %}
<div id="main-login-container">
<div id="main-login">
<a id="login_clipper" href="{% url 'django_cas_ng.views.login' %}">
Compte clipper
</a>
<a id="login_outsider" href="{% url 'gestioncof.views.login_ext' %}">
Extérieur
</a>
<div class="spacer"></div>
<div id="main-login-container" class="container">
<div class="row row-centered">
<div class="col-xs-10 col-sm-8 col-md-8 col-centered">
<header>
<div class="banner">
<h1>GestioCOF &ndash; Mode de connexion</h1>
</div>
</header>
<div class="container-fluid">
<div class="row" style="margin:0;">
<a aria-label="Compte clipper" href="{% url 'django_cas_ng.views.login' %}">
<div class="col-xs-12 col-sm-6" id="login_clipper">
Compte clipper
</div>
</a>
<a aria-label="Extérieur" href="{% url 'gestioncof.views.login_ext' %}">
<div class="col-xs-12 col-sm-6" id="login_outsider">
Extérieur
</div>
</a>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,15 +1,20 @@
{% extends "base_title.html" %}
{% load bootstrap %}
{% block page_size %}col-sm-8{%endblock%}
{% block realcontent %}
<h2>Modifier mon profil</h2>
{% if success %}
<p class="success">Votre profil a été mis à jour avec succès !</p>
{% endif %}
<form id="profile" method="post" action="{% url 'gestioncof.views.profile' %}">
<form id="profile form-inline" method="post" action="{% url 'gestioncof.views.profile' %}">
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input type="submit" class="btn-submit" value="Enregistrer" />
<fieldset>
{% for field in form %}
{{ field | bootstrap}}
{% endfor %}
</fieldset>
<input type="submit" class="btn btn-primary pull-right" value="Enregistrer" />
</form>
{% endblock %}

View file

@ -1,24 +1,29 @@
{% extends "base_title.html" %}
{% load bootstrap %}
{% block page_size %}col-sm-8{% endblock %}
{% block realcontent %}
<h2>Sondage: {{ survey.title }}</h2>
{% if success %}
{% if deleted %}
<p class="success">Votre réponse a bien été supprimée !</p>
{% else %}
<p class="success">Votre réponse a bien été enregistrée ! Vous pouvez cependant la modifier jusqu'à la fin du sondage.</p>
{% endif %}
{% endif %}
{% if survey.details %}
<p>{{ survey.details }}</p>
{% endif %}
<form method="post" action="{% url 'gestioncof.views.survey' survey.id %}">
{% csrf_token %}
{{ form | bootstrap}}
<input type="submit" class="btn-submit" value="Enregistrer" />
{% if current_answer %}
<input type="submit" name="delete" class="btn-submit" value="Supprimer ma réponse" />
{% endif %}
</form>
<h2>Sondage: {{ survey.title }}</h2>
{% if success %}
{% if deleted %}
<p class="success">Votre réponse a bien été supprimée !</p>
{% else %}
<p class="success">Votre réponse a bien été enregistrée ! Vous pouvez cependant la modifier jusqu'à la fin du sondage.</p>
{% endif %}
{% endif %}
{% if survey.details %}
<p>{{ survey.details }}</p>
{% endif %}
<form class="form-horizontal" method="post" action="{% url 'gestioncof.views.survey' survey.id %}">
{% csrf_token %}
{{ form | bootstrap}}
<div class="pull-right">
{% if current_answer %}
<input type="submit" name="delete" class="btn btn btn-default" value="Supprimer ma réponse" />
{% endif %}
<input type="submit" class="btn btn-primary" value="Enregistrer" />
</div>
</form>
{% endblock %}