Recurrence widgets for Plone
Project description
Introduction
============
The plone.formwidget.recurrence package 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.
Installation
------------
You need to add plone.formwidget.recurrence to either your buildout, or
your product requirements. In this addition you should specify if you
want the Archetypes or the z3c.form widget, or both. For example:
[buildout]
eggs += plone.formwidget.recurrence[archetypes]
or
[buildout]
eggs += plone.formwidget.recurrence[z3cform]
or
install_requires=[
'plone.formwidget.recurrence[z3cform,archetypes]',
]
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.0b3 (2012-03-12)
------------------
- By default, preselect the BYOCCURRENCES "End recurrence" field, so that
recurrence rules with unlimited occurences are not selected by accident but
intentionally (from jquery.recurrenceinput.js).
[thet]
- Include z3c.form's meta.zcml, so widgetsTemplate directive is registered.
[thet]
- For conditional zcml incudes, use zcml:condition instead of zcml:provides.
[thet]
1.0b2 (2012-02-28)
------------------
- Reorganization to make it possible to install only the Archetypes or
the z3c.form widget. [regebro]
1.0b1 (2012-02-01)
------------------
- Initial release
============
The plone.formwidget.recurrence package 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.
Installation
------------
You need to add plone.formwidget.recurrence to either your buildout, or
your product requirements. In this addition you should specify if you
want the Archetypes or the z3c.form widget, or both. For example:
[buildout]
eggs += plone.formwidget.recurrence[archetypes]
or
[buildout]
eggs += plone.formwidget.recurrence[z3cform]
or
install_requires=[
'plone.formwidget.recurrence[z3cform,archetypes]',
]
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.0b3 (2012-03-12)
------------------
- By default, preselect the BYOCCURRENCES "End recurrence" field, so that
recurrence rules with unlimited occurences are not selected by accident but
intentionally (from jquery.recurrenceinput.js).
[thet]
- Include z3c.form's meta.zcml, so widgetsTemplate directive is registered.
[thet]
- For conditional zcml incudes, use zcml:condition instead of zcml:provides.
[thet]
1.0b2 (2012-02-28)
------------------
- Reorganization to make it possible to install only the Archetypes or
the z3c.form widget. [regebro]
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 Distributions
Close
Hashes for plone.formwidget.recurrence-1.0b3.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57c4adf764567198648c8aded4f8e4855930b892e1ef98a3a787352b2a65fb77 |
|
MD5 | 61d7c436ba6be415cc5deef81b3dcace |
|
BLAKE2b-256 | f8be864b318f8b0e772cd4a7981f3e5d4a66ac160fd4c9f8b402bafaa8d86c60 |
Close
Hashes for plone.formwidget.recurrence-1.0b3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 709ddd39b7936c3b99bddff76b5f55ba488b28be421e6b045a28e6dc51be56e1 |
|
MD5 | 5bb17f9b42fd3d7b6c6c1ea419bd2fd8 |
|
BLAKE2b-256 | 4a1c5b576394eda3dba3b98a5088c35c5c8888ea3ace6da89f23a4873953b24c |