Improve slot editing
Fix placement of form to allow submit button to work again. Display information about slot on the edit popup.
This commit is contained in:
parent
bc2187e280
commit
5b93b39f67
2 changed files with 31 additions and 18 deletions
|
@ -1,4 +1,5 @@
|
|||
{% load i18n bootstrap %}
|
||||
<form class="form-horizontal" id="slotEditForm" class="modal-form" method="POST" action="{% url "schedule_slot_edit" slug slot.pk %}">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
@ -9,10 +10,20 @@
|
|||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="slotEditForm" class="modal-form" method="POST" action="{% url "schedule_slot_edit" slug slot.pk %}">
|
||||
{% csrf_token %}
|
||||
<div class="mb-3">
|
||||
<h5>Slot Details</h5>
|
||||
<ul>
|
||||
<li>Name: {{ slot.name }}</li>
|
||||
<li>Kind: {{ slot.kind.label }}</li>
|
||||
<li>Date: {{ slot.day.date }}</li>
|
||||
<li>Start: {{ slot.start }}</li>
|
||||
<li>End: {{ slot.end }}</li>
|
||||
<li>Room(s): {{ slot.rooms|join:", " }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{ form|bootstrap }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
@ -20,3 +31,4 @@
|
|||
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
1
vendor/symposion/schedule/forms.py
vendored
1
vendor/symposion/schedule/forms.py
vendored
|
@ -46,6 +46,7 @@ class SlotEditForm(forms.Form):
|
|||
"label": "Content",
|
||||
"required": False,
|
||||
"initial": self.slot.content_override,
|
||||
"widget": forms.Textarea,
|
||||
}
|
||||
return forms.CharField(**kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue