Ergonomie de l'édition
This commit is contained in:
parent
0255158352
commit
07bdabdb22
4 changed files with 42 additions and 21 deletions
|
@ -598,15 +598,15 @@ input[type="submit"], .btn {
|
||||||
border: 1px solid $fond * 0.7;
|
border: 1px solid $fond * 0.7;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
display: block;
|
display: inline-block;
|
||||||
margin-left: auto;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p input[type="submit"],
|
p.submits {
|
||||||
p .btn,
|
text-align: right;
|
||||||
h1 .btn {
|
}
|
||||||
display:inline-block;
|
|
||||||
|
form .commentaire {
|
||||||
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-btn {
|
.edit-btn {
|
||||||
|
|
|
@ -669,16 +669,17 @@ input[type="submit"], .btn {
|
||||||
border: 1px solid #648f24;
|
border: 1px solid #648f24;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
display: block;
|
display: inline-block;
|
||||||
margin-left: auto;
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* line 606, ../../sass/screen.scss */
|
/* line 604, ../../sass/screen.scss */
|
||||||
p input[type="submit"],
|
p.submits {
|
||||||
p .btn,
|
text-align: right;
|
||||||
h1 .btn {
|
}
|
||||||
display: inline-block;
|
|
||||||
|
/* line 608, ../../sass/screen.scss */
|
||||||
|
form .commentaire {
|
||||||
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* line 612, ../../sass/screen.scss */
|
/* line 612, ../../sass/screen.scss */
|
||||||
|
|
|
@ -198,7 +198,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="submits">
|
||||||
|
<input type="submit" id="continuer" name="continuer" value="Enregistrer et continuer à éditer" />
|
||||||
<input type="submit" value="Enregistrer" />
|
<input type="submit" value="Enregistrer" />
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="avis-general">
|
<div id="avis-general">
|
||||||
<p class="commentaire">Ne répondez pas littéralement aux questions : elles n'apparaissent pas à la lecture, et ne sont là que pour vous aider à écrire ! Tous les champs n'ont pas non plus besoin d'être remplis.</p>
|
<p class="commentaire">Ne répondez pas littéralement aux questions : elles n'apparaissent pas à la lecture, et ne sont là que pour vous aider à écrire ! Tous les champs n'ont pas non plus besoin d'être remplis.</p>
|
||||||
|
@ -219,7 +222,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<p class="submits">
|
||||||
|
<input type="submit" id="continuer" name="continuer" value="Enregistrer et continuer à éditer" />
|
||||||
<input type="submit" value="Enregistrer" />
|
<input type="submit" value="Enregistrer" />
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{{ avis_lieu_formset.management_form }}
|
{{ avis_lieu_formset.management_form }}
|
||||||
<div id="avis_lieu_container">
|
<div id="avis_lieu_container">
|
||||||
|
@ -245,7 +251,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<p class="submits">
|
||||||
|
<input type="submit" id="continuer" name="continuer" value="Enregistrer et continuer à éditer" />
|
||||||
<input type="submit" value="Enregistrer" />
|
<input type="submit" value="Enregistrer" />
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -270,7 +279,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
<p class="submits">
|
||||||
|
<input type="submit" id="continuer" name="continuer" value="Enregistrer et continuer à éditer" />
|
||||||
<input type="submit" value="Enregistrer" />
|
<input type="submit" value="Enregistrer" />
|
||||||
|
</p>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -96,7 +96,10 @@ def manage_stage(request, pk=None):
|
||||||
avis_stage = AvisStage(stage=stage)
|
avis_stage = AvisStage(stage=stage)
|
||||||
c_del = False
|
c_del = False
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
stage = Stage.objects.filter(auteur=request.user.profil).get(pk=pk)
|
stage = Stage.objects.filter(auteur=request.user.profil).get(pk=pk)
|
||||||
|
except Stage.DoesNotExist:
|
||||||
|
return HttpResponseForbidden()
|
||||||
avis_stage, _ = AvisStage.objects.get_or_create(stage=stage)
|
avis_stage, _ = AvisStage.objects.get_or_create(stage=stage)
|
||||||
c_del = True
|
c_del = True
|
||||||
|
|
||||||
|
@ -120,7 +123,12 @@ def manage_stage(request, pk=None):
|
||||||
avis_stage_form.instance.stage = stage
|
avis_stage_form.instance.stage = stage
|
||||||
avis_stage_form.save()
|
avis_stage_form.save()
|
||||||
avis_lieu_formset.save()
|
avis_lieu_formset.save()
|
||||||
return redirect(reverse('avisstage:stage', kwargs={'pk':stage.id}))
|
print request.POST
|
||||||
|
if "continuer" in request.POST:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
return redirect(reverse('avisstage:stage',
|
||||||
|
kwargs={'pk':stage.id}))
|
||||||
else:
|
else:
|
||||||
form = StageForm(instance=stage, prefix="stage")
|
form = StageForm(instance=stage, prefix="stage")
|
||||||
avis_stage_form = AvisStageForm(instance=avis_stage, prefix="avis")
|
avis_stage_form = AvisStageForm(instance=avis_stage, prefix="avis")
|
||||||
|
|
Loading…
Reference in a new issue