apply button in agenda edit form

This commit is contained in:
Oskar Hahn 2011-09-03 12:14:17 +02:00
parent eaee6f9154
commit 0c931559a0
2 changed files with 7 additions and 2 deletions

View File

@ -26,6 +26,9 @@
<button type="submit">
<span class="icon ok">{%trans 'Save' %}</span>
</button>
<button type="submit" name="apply">
<span class="icon ok">{%trans 'Apply' %}</span>
</button>
<a href='{% url item_overview %}'>
<button type="button">
<span class="icon cancel">{%trans 'Cancel' %}</span>

View File

@ -215,8 +215,10 @@ def edit(request, item_id=None, form='ItemText', default=None):
messages.success(request, _('Item was successfully modified.'))
if "application" in request.POST:
item.application.writelog(_('Agenda item modified'), request.user)
return redirect(reverse('item_overview'))
messages.error(request, _('Please check the form for errors.'))
if not 'apply' in request.POST:
return redirect(reverse('item_overview'))
else:
messages.error(request, _('Please check the form for errors.'))
else:
initial = {}
if default: