Notice: This plugin is unmaintained and availableforadoption.
This plugin allows you to add forms anywhere where there is a field with Trac wiki syntax.
The similarWikiFormsPlugin aims at providing even more flexibility with a sightly more complex wiki markup incompatible with that of this plugin.Additional features from this plugin have been requested here too (see#8715). For a comparison between the two plugins, seehere.
Also see the onlinetutorial or thedocumentation (docs still in need of some corrections and updates to 0.4).
Let's start by looking at a simple laundry list. This list will be automatically bound to whatever page it appears in by default (this can be configured). Once the plugin is installed, simply edit a new wiki resource calledSandbox/LaundryList
and add this:
== Laundry list example{{{#!TracForm## An example of a TracForm. The first lines can be commentary or #! commands.##! track_fields|| || '''Who''' || '''When''' || '''What''' |||| [tf:wash] || [tf.who:wash] || [tf.when:wash] || Wash Clothes |||| [tf:dry] || [tf.who:dry] || [tf.when:dry] || Dry Clothes |||| [tf:fold] || [tf.who:fold] || [tf.when:fold] || Fold Clothes ||}}}
Once saved, you should see something like this:
From here, you can click "Submit Query" and you will see the fields change. After a few clicks it might look like this:
Now, if you thought that was neat, make sure you have theIncludeMacro installed and fire up a new wiki page Sandbox/LaundryListUser with the following:
[[Include(Sandbox/LaundryList)]]
Note that the form is blank and you can play with the results again. This is because the default context for the form is the pageURL itself! That means that as long as a form is included on a different page (and the default context is not overridden), then each page including gets itsown version of the form's results. This works particularly well with PageTemplates.
Now, for more fun, do the same thing in a ticket. Once submitted, every ticket including the template will contain its own checklist. One obvious use for this is when creating a svn commit checklist. Simply put the checklist in the appropriate wiki location, create tickets that include the location, and voila, instant commit step-by-step. Once enough of the form becomes exposed, we should be able to work this into the workflow too (no resolving before at least paying lip service to the checklist).
There is much more planned for this plugin than simply checklists. SeeTracFormsPlugin/Docs for more information on the various ways to use this tool.
Existing bugs and feature requests forTracFormsPlugin arehere.
If you have any issues, create anew ticket.
defect | 31 / 33 | ||
---|---|---|---|
enhancement | 14 / 32 | ||
task | 1 / 1 |
Stable Version | tracformsplugin/tags/tracforms-0.4.1 | download | subversion |
Under Development | tracformsplugin/trunk | download | subversion |
The current stable version is usable with Python 2.6; older Python versions requiresimplejson to be installed.
Revision[10011] and above requires some dedicated permissions assigned to use new features (such as Search) as well as known TracForms features (such as the 'Update Form' button).
You can also download the entire projecthere, or checkout a copy usingSubversion.
Once you have downloaded the source, do the following (the actual directory names depend on what you downloaded):
cd tracformsplugincd trunkcd0.11
For older versions or ones still in development, go to the tags directory and then to the desired version, for example:
cd tracformsplugincd tagscd release-0.1cd0.11
From here, you can do one of two things. The first is building an egg to drop into your project's plugins directory or your master project's plugins directory (replace or define $TRACENV_DIR with your project's base directory):
python setup.py bdist_eggcp dist/TracForms-0.1-*.egg$TRACENV_DIR/plugins/
Or, you can build and install and enable the right bit in the configuration file (replace or define $TRACENV_DIR with your project's base directory):
python setup.py installvi$TRACENV_DIR/conf/trac.ini
Within here, locate (or create) your [components] section and add the following:
[components]tracforms.*=enabled
Either of the above methods require a database upgrade:
trac-admin$TRACENV_DIR upgrade
Sincetracforms-0.4
you must grant form-related permissions to the relevant groups and/or users. Otherwise only users withTRAC_ADMIN
permission will be able to see details and use forms.These are the permissionactions available:
FORM_VIEW
FORM_EDIT_VAL
FORM_RESET
FORM_ADMIN
This plugin is prepared for localization.
But English message texts are still the (POSIX) default. If this isn't your preferred language, you can
You've done a new translation? Superb! Contributing your translation is highly appreciated.
You could send it to the plugin's maintainer or contribute toTrac plugin l10n projectviaTransifex:
Top translations: Trac_Plugin-L10N »tracforms
Preparing the plugin from source requiresno additional steps for compiling message catalog files. Only to include translations marked as# fuzzy
by the translator, you'll want to do a manual message catalog compilation with the extra-f
argument before packaging:
cd tracformsplugin/python ./setup.py compile_catalog -fpython ./setup.py bdist_egg
Complaints about missinglocale
directory are often a side-effect of failure to compile any message catalog for inclusion into Python egg, hence the whole path is missing. Due to a know Trac issue Babel has to be installed prior to Trac, to get it all working as expected.
Again, for more details see thel10n cookbook page for Trac plugins.
Author:rharkins
Maintainer:none (needsadoption)
Contributors: anderson,andrewbates,jrcutler,nelsojost,hasienda
Example of blank laundry list
Example after a few checks.
Download all attachments as:.zip