j'ai cassé du js?

This commit is contained in:
Qwann 2016-07-14 21:13:03 +02:00
parent f14ddef88a
commit 406d09790a
6 changed files with 94 additions and 80 deletions

View file

@ -43,22 +43,3 @@ td {
margin: 10px 0px;
}
.inscription-bottom {
display: block;
padding: 0px 20px 20px 20px ;
margin-top : 15px;
}
.bda-prix {
font-weight: bold;
color:#DE826B;
}
.table-top {
background-color: #F0F0F0;
margin: -20px;
margin-top: 0px;
padding:20px;
padding-bottom: 28px;
padding-top: 8px;
}

View file

@ -100,7 +100,7 @@ var django = {
{% if stateerror %}
<p class="error table-top">Impossible d'enregistrer vos modifications: vous avez apporté d'autres modifications entre temps</p>
{% endif %}
<form id="bda_form" method="post" action="{% url 'bda-tirage-inscription' tirage.id %}">
<form class="form-horizontal" id="bda_form" method="post" action="{% url 'bda-tirage-inscription' tirage.id %}">
{% csrf_token %}
{% include "inscription-formset.html" %}
<div class="inscription-bottom">

View file

@ -145,7 +145,11 @@ form#bda_form thead {
}
form#bda_form label.control-label {
visibility: hidden;
display: none;
}
form#bda_form .form-group {
margin-top : 15px;
}
form#bda_form thead {
@ -162,7 +166,22 @@ table#bda_formset {
border-spacing: 0px 5px;
}
tbody.bda_formset_content {
table#bda_formset th:first-child {
padding-left: 20px;
}
form.petit-cours_form table#bda_formset td:first-child,
form.petit-cours_form table#bda_formset th:first-child {
padding-left: 20px;
}
form.petit-cours_form table#bda_formset td:last-child,
form.petit-cours_form table#bda_formset th:last-child {
padding-right: 20px;
}
form.petit-cours_form .remove-btn {
margin-top : 10px;
}
tr.dynamic-form td {
@ -326,14 +345,6 @@ fieldset legend {
}
#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 {
@ -492,6 +503,26 @@ h4.block-title {
list-style: disc;
}
.inscription-bottom {
display: block;
padding: 0px 20px 20px 20px ;
margin-top : 15px;
}
.bda-prix {
font-weight: bold;
color:#DE826B;
}
.table-top {
background-color: #F0F0F0;
margin: -20px;
margin-top: 0px;
padding:20px;
padding-bottom: 28px;
padding-top: 8px;
}
form#bda_form ul.errorlist li {
padding-left: 0px;
list-style: none;

View file

@ -1,5 +1,6 @@
{% load bootstrap %}
{{ formset.non_form_errors.as_ul }}
<table id="bda_formset" class="form">
<table id="bda_formset" class="form table">
{{ formset.management_form }}
{% for form in formset.forms %}
{% if forloop.first %}
@ -24,13 +25,13 @@
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
{% endif %}
{{ field.errors.as_ul }}
{{ field }}
{{ field | bootstrap }}
</td>
{% endif %}
{% endfor %}
<td class="tools-cell"><div class="tools">
<input type="checkbox" name="{{ form.DELETE.html_name }}" style="display: none;" />
<a href="javascript://" class="icon delete-handler" title="Supprimer"></a>
<a href="javascript://" class="glyphicon glyphicon-remove remove-btn" title="Supprimer"></a>
</div>
<div class="spacer"></div>
</td>

View file

@ -1,5 +1,6 @@
{% extends "base_title.html" %}
{% load staticfiles %}
{% load bootstrap %}
{% block extra_head %}
<link href="{% static "grappelli/jquery/ui/css/custom-theme/jquery-ui-1.8.custom.css" %}" rel="stylesheet" type="text/css" media="screen" title="no title" charset="utf-8" />
@ -50,7 +51,7 @@ var django = {
});
};
$(document).ready(function($) {
deleteButtonHandler($("table#bda_formset tbody.bda_formset_content").find("a.delete-handler"));
deleteButtonHandler($("table#bda_formset tbody.bda_formset_content").find("a.remove-btn"));
$("table#bda_formset tbody.bda_formset_content").sortable({
handle: "a.drag-handler",
items: "tr",
@ -92,16 +93,16 @@ var django = {
})(django.jQuery);
</script>
<h2>Inscription pour donner des cours particuliers</h2>
<h2 class="no-bottom-margin">Inscription pour donner des cours particuliers</h2>
{% if success %}
<p class="success">Votre inscription a été mise à jour avec succès !</p>
<p class="success table-top">Votre inscription a été mise à jour avec succès !</p>
{% endif %}
<form id="bda_form" method="post" action="{% url 'petits-cours-inscription' %}">
<form class="form-horizontal petit-cours_form" id="bda_form" method="post" action="{% url 'petits-cours-inscription' %}">
{% csrf_token %}
<span style="font-size: 1.25em; font-weight: bold; color: #e00000;"><input type="checkbox" name="receive_proposals" {% if receive_proposals %}checked="checked"{% endif %} /> Recevoir des propositions de petits cours</span>
<hr />
<span style="font-size: 1.25em; font-weight: bold; color: #DE826B;"><input type="checkbox" name="receive_proposals" {% if receive_proposals %}checked="checked"{% endif %} /> Recevoir des propositions de petits cours</span>
{% include "inscription-petit-cours-formset.html" %}
<input type="button" class="btn-addmore" value="Ajouter une autre matière" id="add_more" />
<div class="inscription-bottom">
<input type="button" class="btn btn-default pull-right" value="Ajouter une autre matière" id="add_more" />
<script>
django.jQuery('#add_more').click(function() {
cloneMore('tbody.bda_formset_content tr:last-child', 'petitcoursability_set');
@ -110,13 +111,13 @@ var django = {
<div style="margin: 10px 0px;">
<span style="vertical-align: top; font-weight: bold;">Remarques:</span> <textarea name="remarques" style="width: 60%; height: 60px;">{{ remarques }}</textarea>
</div>
<input type="submit" class="btn-submit" value="Enregistrer" />
<hr />
<input type="submit" class="btn btn-primary pull-right" value="Enregistrer" />
<p class="footnotes">
<sup>1</sup>: spécifiez les matières pour lesquelles vous êtes compétent<br />
<sup>2</sup>: spécifiez pour chaque matière le ou les niveaux pour lesquels vous souhaitez recevoir des demandes<br />
<sup>3</sup>: spécifiez si vous êtes titulaire de l'agrégation pour cette matière<br />
<sup>4</sup>: pour supprimer une ligne, cliquez sur la croix puis appuyer sur <tt>Enregistrer</tt><br />
</p>
</div>
</form>
{% endblock %}

View file

@ -1,13 +1,13 @@
{% extends "base_title.html" %}
{% load bootstrap %}
{% block homelink %}
{% endblock %}
{% block page_size %}col-sm-8{% endblock %}
{% block realcontent %}
<h2>Changement de mot de passe</h2>
<form method="post" action="{% url 'django.contrib.auth.views.password_change' %}">
<form class="form-horizontal" method="post" action="{% url 'django.contrib.auth.views.password_change' %}">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" class="btn-submit" value="Changer" />
{{ form | bootstrap }}
<input type="submit" class="btn btn-primary pull-right" value="Changer" />
</form>
{% endblock %}