Ignore:
Timestamp:
Jun 11, 2010, 4:22:26 PM (12 years ago)
Author:
roberth
Message:

Added boolean template field type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateFieldType.groovy

    r550 r559  
    1818        DATE('Date'),
    1919        RELTIME('Relative time'), // relative date, e.g. days since start of study
    20         FILE('File')
     20        FILE('File'),
     21        BOOLEAN('Boolean')
    2122    // TODO: add a timezone-aware date type to use for study start date
    2223    // TODO: add a BOOLEAN type (checkbox)
     
    2930
    3031        static list() {
    31                 [STRING, TEXT, INTEGER, FLOAT, DOUBLE, STRINGLIST, ONTOLOGYTERM, DATE, RELTIME, FILE]
     32                [STRING, TEXT, INTEGER, FLOAT, DOUBLE, STRINGLIST, ONTOLOGYTERM, DATE, RELTIME, FILE, BOOLEAN]
    3233        }
    3334
     
    5253                        case FILE:
    5354                                return ""
     55                        case BOOLEAN:
     56                                return false;
    5457                        default:
    5558                                throw new NoSuchFieldException("Field type ${fieldType} not recognized")
Note: See TracChangeset for help on using the changeset viewer.