Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit 2f15b7103717d650653a4132485ae418362a2922
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Mon Dec 3 21:50:36 2012 +0100
Add the entry in the form to edit one meeting or all of them in a recursion
---------------------------------------------------------------
fedocal/__init__.py | 2 +-
fedocal/forms.py | 3 +++
fedocal/templates/edit_meeting.html | 7 +++++--
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/fedocal/__init__.py b/fedocal/__init__.py
index e717bd9..61fd7b0 100644
--- a/fedocal/__init__.py
+++ b/fedocal/__init__.py
@@ -375,7 +375,7 @@ def edit_meeting(meeting_id):
recursion_ends=form.end_repeats.data,
remind_when=form.remind_when.data,
remind_who=form.remind_who.data,
- edit_all_meeting=True)
+ edit_all_meeting=form.recursive_edit.data)
except FedocalException, err:
flask.flash(err)
return flask.render_template('edit_meeting.html',
diff --git a/fedocal/forms.py b/fedocal/forms.py
index a4dac15..6ca86d3 100644
--- a/fedocal/forms.py
+++ b/fedocal/forms.py
@@ -108,6 +108,9 @@ class AddMeetingForm(wtf.Form):
)
end_repeats = wtf.DateField('End date', [wtf.validators.optional()])
+ # Recursive edit
+ recursive_edit = wtf.BooleanField('Yes I want to edit all the meetings')
+
# Reminder
remind_when = wtf.SelectField('Send reminder',
[wtf.validators.optional()],
diff --git a/fedocal/templates/edit_meeting.html b/fedocal/templates/edit_meeting.html
index 8328753..a258361 100644
--- a/fedocal/templates/edit_meeting.html
+++ b/fedocal/templates/edit_meeting.html
@@ -43,8 +43,11 @@
{% if meeting.recursion_frequency %}
<h4>Edit all?</h4>
- <p>This meeting is a recursive meeting, your changes will
- affect all the meetings related.</p>
+ <p>This meeting is a recursive meeting, by default your
+ changes will only affect this meeting unless you explecitely
+ say otherwise:
+ </p>
+ {{ render_field_invert(form.recursive_edit) }}
{% endif %}
<p class="buttons indent">