Xataface Duration Selector Module 0.1
Duration Selector Widget for Xataface Forms
Xataface Duration Selector Module
Screen%20shot%202011-06-09%20at%203.15.52%20PM.png?max_width=640

Synopsis

The Xataface Duration Selector module adds a "duration selector" widget that can be used in forms with a start date and an end date, but where it is more convenient to select the end date in terms of a duration (or delta from the start date). For the end date field you can use the durationselector widget to provide the user with a select list of durations in any size increment you specify.

Features

Requirements

License

Xataface Duration Selector Module

Copyright (C) 2011  Steve Hannah <shannah@sfu.ca>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA  02110-1301, USA.

Download

Packages

Not available.

SVN

http://weblite.ca/svn/dataface/modules/durationselector/trunk

Installation

  1. Copy the summary directory into your modules directory. i.e.:
    modules/durationselector
    
  2. Add the following to the [_modules] section of your app's conf.ini file:
    modules_durationselector=modules/durationselector/durationselector.php
    
See also:
http://xataface.com/wiki/modules For more information about Xataface module development and installation.

Usage

To configure an end-date field to use the durationselector widget, just set its fields.ini file widget:type directive to "durationselector". You should also set the following directives:

Directive Name Description
widget:startThe name of the field that stores the start date that this duration is associated with.
widget:intervalThe interval size (in minutes) between options in the duration select list.

Examples

In the following example we have a start_time field that is just set up with defaults so it will use the calendar widget. The end_time field is actually a mysql DATETIME field, but we are using the durationselector widget to allow users to select the end time as a duration from the start time.

[start_time]
        
[end_time]
        widget:type=durationselector
        widget:start=start_time
See also:
http://xataface.com/wiki/fields.ini_file For more information about fields.ini file directives.

More Reading

TBA

Support

Xataface Forum

Credits

 All Data Structures Files Functions