Recurrence widgets for Plone
Project description
Introduction
The plone.formwidget.recurrence widget provides an Archetype and a z3cform widget for recurrence.
The main GUI work is done with the jquery.recurrenceinput.js widget from http://github.com/collective/jquery.recurrenceinput.js .
This widget also provides a simple textarea where a RFC 5545 compliant recurrence rule can be entered, if javascript is not available.
The resulting value of the widget is a RFC5445 compliant recurrence rule string, ready to be used with python-dateutil’s rrulestr.
Usage
See plone/formwidget/recurrence/example .
For developers: Updating the javascript
The javascript files in plone/formwidget/recurrence/browser/lib comes from jquery.recurrenceinput.js. There is one modification needed:
In jquery.recurrenceinput.js there are two submit buttons near the end of the FORMTMPL definition:
'<div class="ributtons">', '<input', 'type="submit"', 'class="ricancelbutton"', 'value="${i18n.cancel}" />', '<input', 'type="submit"', 'class="risavebutton"', 'value="${i18n.save}" />', '</div>',
When the javascript files are updated from jquery.recurrenceinput.form.js, these buttons need to have the “allowMultiSubmit” class, to prevent Plone’s warnings against clicking the same submit button multiple times. Add those to the buttons class, so it looks like this:
'<div class="ributtons">', '<input', 'type="submit"', 'class="ricancelbutton allowMultiSubmit"', 'value="${i18n.cancel}" />', '<input', 'type="submit"', 'class="risavebutton allowMultiSubmit"', 'value="${i18n.save}" />', '</div>',
That is all the changes necessary, unless there are changes to the labels, in which case you need to update plone/formwidget/recurrence/browser/i18n.py and the translations to support the new labels.
Contributors
This package is originally created by Tom Gross (tomgross). Other contributors include Johannes Raggam (thet) and Lennart Regebro (regebro).
Changelog
1.0b1 (2012-02-01)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for plone.formwidget.recurrence-1.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e9913c9f14e914ca614ad4c8a95e27ca67b423515830dd2d97329c3eadd192 |
|
MD5 | ca9d300dacc0fbe5939261c1d9ee7d4e |
|
BLAKE2b-256 | 998906129bbc1c52c618a5dd7b5ca311652af0931ca9c62a616a27f01918aa56 |