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; 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 %} {% if stateerror %}
<p class="error table-top">Impossible d'enregistrer vos modifications: vous avez apporté d'autres modifications entre temps</p> <p class="error table-top">Impossible d'enregistrer vos modifications: vous avez apporté d'autres modifications entre temps</p>
{% endif %} {% 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 %} {% csrf_token %}
{% include "inscription-formset.html" %} {% include "inscription-formset.html" %}
<div class="inscription-bottom"> <div class="inscription-bottom">

View file

@ -145,7 +145,11 @@ form#bda_form thead {
} }
form#bda_form label.control-label { form#bda_form label.control-label {
visibility: hidden; display: none;
}
form#bda_form .form-group {
margin-top : 15px;
} }
form#bda_form thead { form#bda_form thead {
@ -162,7 +166,22 @@ table#bda_formset {
border-spacing: 0px 5px; 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 { 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 { main-container {
@ -492,6 +503,26 @@ h4.block-title {
list-style: disc; 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 { form#bda_form ul.errorlist li {
padding-left: 0px; padding-left: 0px;
list-style: none; list-style: none;

View file

@ -1,5 +1,6 @@
{% load bootstrap %}
{{ formset.non_form_errors.as_ul }} {{ formset.non_form_errors.as_ul }}
<table id="bda_formset" class="form"> <table id="bda_formset" class="form table">
{{ formset.management_form }} {{ formset.management_form }}
{% for form in formset.forms %} {% for form in formset.forms %}
{% if forloop.first %} {% if forloop.first %}
@ -24,13 +25,13 @@
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %} {% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
{% endif %} {% endif %}
{{ field.errors.as_ul }} {{ field.errors.as_ul }}
{{ field }} {{ field | bootstrap }}
</td> </td>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
<td class="tools-cell"><div class="tools"> <td class="tools-cell"><div class="tools">
<input type="checkbox" name="{{ form.DELETE.html_name }}" style="display: none;" /> <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>
<div class="spacer"></div> <div class="spacer"></div>
</td> </td>

View file

@ -1,5 +1,6 @@
{% extends "base_title.html" %} {% extends "base_title.html" %}
{% load staticfiles %} {% load staticfiles %}
{% load bootstrap %}
{% block extra_head %} {% 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" /> <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($) { $(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({ $("table#bda_formset tbody.bda_formset_content").sortable({
handle: "a.drag-handler", handle: "a.drag-handler",
items: "tr", items: "tr",
@ -92,16 +93,16 @@ var django = {
})(django.jQuery); })(django.jQuery);
</script> </script>
<h2>Inscription pour donner des cours particuliers</h2> <h2 class="no-bottom-margin">Inscription pour donner des cours particuliers</h2>
{% if success %} {% 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 %} {% 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 %} {% 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> <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>
<hr />
{% include "inscription-petit-cours-formset.html" %} {% 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> <script>
django.jQuery('#add_more').click(function() { django.jQuery('#add_more').click(function() {
cloneMore('tbody.bda_formset_content tr:last-child', 'petitcoursability_set'); cloneMore('tbody.bda_formset_content tr:last-child', 'petitcoursability_set');
@ -110,13 +111,13 @@ var django = {
<div style="margin: 10px 0px;"> <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> <span style="vertical-align: top; font-weight: bold;">Remarques:</span> <textarea name="remarques" style="width: 60%; height: 60px;">{{ remarques }}</textarea>
</div> </div>
<input type="submit" class="btn-submit" value="Enregistrer" /> <input type="submit" class="btn btn-primary pull-right" value="Enregistrer" />
<hr />
<p class="footnotes"> <p class="footnotes">
<sup>1</sup>: spécifiez les matières pour lesquelles vous êtes compétent<br /> <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>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>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 /> <sup>4</sup>: pour supprimer une ligne, cliquez sur la croix puis appuyer sur <tt>Enregistrer</tt><br />
</p> </p>
</div>
</form> </form>
{% endblock %} {% endblock %}

View file

@ -1,13 +1,13 @@
{% extends "base_title.html" %} {% extends "base_title.html" %}
{% load bootstrap %}
{% block homelink %} {% block page_size %}col-sm-8{% endblock %}
{% endblock %}
{% block realcontent %} {% block realcontent %}
<h2>Changement de mot de passe</h2> <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 %} {% csrf_token %}
{{ form.as_p }} {{ form | bootstrap }}
<input type="submit" class="btn-submit" value="Changer" /> <input type="submit" class="btn btn-primary pull-right" value="Changer" />
</form> </form>
{% endblock %} {% endblock %}