/**
  * Get the list of parameters for this form.
  * @return array List of parameters that this form requires.
  */
 public static function get_parameters()
 {
     $retVal = array_merge(parent::get_parameters(), array(array('name' => 'observer_name', 'caption' => 'Observer Name', 'description' => 'Indicia ID for the sample attribute that is the name of the observer.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'observer_email', 'caption' => 'Observer Email', 'description' => 'Indicia ID for the sample attribute that is the email of the observer.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'observer_phone_number', 'caption' => 'Observer Phone Number', 'description' => 'Indicia ID for the sample attribute that is the phone number of the observer.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'start_time', 'caption' => 'Start time', 'description' => 'Indicia ID for the sample attribute that records the start time of the watch.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'end_time', 'caption' => 'End time', 'description' => 'Indicia ID for the sample attribute that records the end time of the watch.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'cetaceans_seen', 'caption' => 'Cetaceans seen?', 'description' => 'Indicia ID for the sample attribute that records whether Cetaceans have been seen.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'cetaceans_seen_yes', 'caption' => 'Cetaceans Seen Yes Answer', 'description' => 'Indicia ID for the termlists_term that stores the Yes answer for Cetaceans Seen?.', 'type' => 'string', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'sea_state', 'caption' => 'Sea state?', 'description' => 'Indicia ID for the sample attribute that records sea state.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'visibility', 'caption' => 'Visibility?', 'description' => 'Indicia ID for the sample attribute that records visibility.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'non_cetacean_marine_animals_seen', 'caption' => 'Non cetacean marine animals seen?', 'description' => 'Indicia ID for the sample attribute that records whether non-cetacean marine animals have been seen.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'feeding_birds_seen', 'caption' => 'Feeding birds seen?', 'description' => 'Indicia ID for the sample attribute that records whether feeding birds have been seen.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'number_of_people_spoken_to_during_watch', 'caption' => 'Number of people spoken to during watch?', 'description' => 'Indicia ID for the sample attribute that records the number of people spoken to during the watch.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'wdcs_newsletter', 'caption' => 'WDCS newsletter opt-in', 'description' => 'Indicia ID for the sample attribute that records whether a guest has chosen to receive
         the WDCS newsletter.', 'type' => 'select', 'table' => 'sample_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Sample Attributes'), array('name' => 'bearing_to_sighting', 'caption' => 'Bearing to sighting', 'description' => 'Indicia ID for the occurrence attribute that stores the bearing to the sighting.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Occurrence Attributes'), array('name' => 'reticules', 'caption' => 'Reticules', 'description' => 'Indicia ID for the occurrence attribute that holds the number of reticules.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Occurrence Attributes'), array('name' => 'reticules_from', 'caption' => 'Reticules from', 'description' => 'Indicia ID for the occurrence attribute that stores whether the Reticules value
         is from the land or sky.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Occurrence Attributes'), array('name' => 'distance_estimate', 'caption' => 'Distance Estimate', 'description' => 'Indicia ID for the occurrence attribute that stores the distance estimate to the sighting.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Occurrence Attributes'), array('name' => 'adults', 'caption' => 'Adults', 'description' => 'Indicia ID for the occurrence attribute that stores the number of adults associated with the sighting.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Occurrence Attributes'), array('name' => 'calves', 'caption' => 'Calves', 'description' => 'Indicia ID for the occurrence attribute that stores the number of Calves associated with the sighting.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Occurrence Attributes'), array('name' => 'activity', 'caption' => 'Activity', 'description' => 'Indicia ID for the occurrence attribute that stores whether a sighting is travelling or staying.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Occurrence Attributes'), array('name' => 'behaviour', 'caption' => 'Behaviour', 'description' => 'Indicia ID for the occurrence attribute that stores whether a sighting is calm or active.', 'type' => 'select', 'table' => 'occurrence_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Occurrence Attributes'), array('name' => 'platform_height', 'caption' => 'Platform Height', 'description' => 'Indicia ID for the location attribute that stores the platform height.', 'type' => 'select', 'table' => 'location_attribute', 'valueField' => 'id', 'captionField' => 'caption', 'group' => 'Shorewatch Location Attributes'), array('name' => 'effort', 'caption' => 'Effort', 'description' => 'Indicia ID for the termlists_term that stores the effort sample method id.', 'type' => 'select', 'table' => 'termlists_term', 'valueField' => 'id', 'captionField' => 'term', 'group' => 'Shorewatch Sample Methods'), array('name' => 'reticule_sighting', 'caption' => 'Reticule Sighting', 'description' => 'Indicia ID for the termlists_term that stores the reticule sighting sample method id.', 'type' => 'select', 'table' => 'termlists_term', 'valueField' => 'id', 'captionField' => 'term', 'group' => 'Shorewatch Sample Methods'), array('name' => 'efforts_survey_id', 'caption' => 'Efforts And Online Recording Survey ID', 'description' => 'Indicia ID for the efforts and online recording survey (not adhoc).', 'type' => 'string', 'group' => 'Survey Ids'), array('name' => 'efforts_and_online_recording_page_path', 'caption' => 'Efforts And Online Recording Page Path', 'description' => 'Path to the Efforts And Online Recording page.', 'type' => 'string', 'group' => 'Recording Page Paths'), array('name' => 'ahoc_online_recording_page_path', 'caption' => 'Adhoc Online Recording Page Path', 'description' => 'Path to the Adhoc Online Recording page.', 'type' => 'string', 'group' => 'Recording Page Paths'), array('name' => 'keep_going_after_error', 'caption' => 'Continue import after issues detected?', 'description' => 'The import is processed on a line-by-line basis. Does the import stop or try importing the rest of the data if problems with the data are detected? ' . 'Note that data may have already been entered into the database before the issue occurred. ' . 'Leaving this option on may result in inconsistent data being entered into the database depending on when the problem occurred during processing. ' . 'Note also that errors that occur on the Warehouse rather than in the importer\'s submission builder during processing are unaffected by this option.', 'type' => 'boolean', 'default' => false, 'group' => 'Import Mode'), array('name' => 'presetSettings', 'caption' => 'Preset Settings', 'description' => 'Provide a list of predetermined settings which the user does not need to specify, one on each line in the form name=value. ' . 'The preset settings available are those which are available for input on the first page of the import wizard, depending on the table you ' . 'are inputting data for. You can use the following replacement tokens in the values: {user_id}, {username}, {email} or {profile_*} (i.e. any ' . 'field in the user profile data).', 'type' => 'textarea', 'required' => false)));
     return $retVal;
 }
 /**
  * Get the list of parameters for this form.
  * @return array List of parameters that this form requires.
  */
 public static function get_parameters()
 {
     $retVal = array_merge(parent::get_parameters(), array(array('name' => 'emailShow', 'caption' => 'Show email field even if logged in', 'description' => 'If the survey requests an email address, it is sent implicitly for logged in users. Check this box to show it explicitly.', 'type' => 'boolean', 'default' => false, 'required' => false, 'group' => 'User Interface'), array('name' => 'nameShow', 'caption' => 'Show user profile fields even if logged in', 'description' => 'If the survey requests first name and last name or any field which matches a field in the users profile, these are hidden. ' . 'Check this box to show these fields. Always show these fields if they are required at the warehouse unless the profile module is enabled, ' . '<em>copy field values from user profile</em> is selected and the fields are required in the profile.', 'type' => 'boolean', 'default' => false, 'required' => false, 'group' => 'User Interface'), array('name' => 'copyFromProfile', 'caption' => 'Copy field values from user profile', 'description' => 'Copy any matching fields from the user\'s profile into the fields with matching names in the sample data. ' . 'This works for fields defined in the Drupal Profile module (version 6) or Fields module (version 7) which must be ' . 'enabled to use this feature. Applies whether fields are shown or not.', 'type' => 'boolean', 'default' => false, 'required' => false, 'group' => 'User Interface', 'visible' => !function_exists('module_exists') || module_exists('profile') && substr(VERSION, 0, 1) == '6' || module_exists('field') && substr(VERSION, 0, 1) == '7'), array('name' => 'structure', 'caption' => 'Form Structure', 'description' => 'Define the structure of the form. Each component goes on a new line and is nested inside the previous component where appropriate. The following types of ' . "component can be specified. <br/>" . "<strong>=tab/page name=</strong> is used to specify the name of a tab or wizard page. (Alpha-numeric characters only)<br/>" . "<strong>=*=</strong> indicates a placeholder for putting any custom attribute tabs not defined in this form structure. <br/>" . "<strong>[control name]</strong> indicates a predefined control is to be added to the form with the following predefined controls available: <br/>" . "&nbsp;&nbsp;<strong>[species]</strong> - a species grid or input control. " . "You can change any of the control options for an individual custom attribute control in a grid by putting @control|option=value on the subsequent line(s). " . "For example, if a control is for occAttr:4 then you can set it's default value by specifying @occAttr:4|default=7 on the line after the [species]<br/>" . "If you want to specify a custom template for a grid's species label cell, then override the taxon_label template. If you have multiple grids on the " . "form, you can override each one individually by setting the @taxonLabelTemplate for each grid to the name of a template that you've added to the " . "\$indicia_templates global array. " . "If in single species entry mode and using a select box for data input, you can put a taxon group select above the species input select by " . "setting the option @taxonGroupSelect=true. Control the label and helptext for this control using the options @taxonGroupSelectLabel and @taxonGroupSelectHelpText.<br/>" . "&nbsp;&nbsp;<strong>[species map]</strong> - a species grid or input control: this is the same as the species control, but the sample is broken down " . "into subsamples, each of which has its own location picked from the map. Only the part of the species grid which is being added to or modified at the " . "time is displayed. This control should be placed after the map control, with which it integrates. Species recording must be set to a List (grid mode) rather than single entry. " . "This control does not currently support mixed spatial reference systems, only the first specified will be used. You do not need a [spatial reference] control on the " . "page when using a [species map] control.<br/>" . "&nbsp;&nbsp;<strong>[species map summary]</strong> - a read only grid showing a summary of the data entered using the species map control.<br/>" . "&nbsp;&nbsp;<strong>[species attributes]</strong> - any custom attributes for the occurrence, if not using the grid. Also includes a file upload " . "box and sensitivity input control if relevant. The attrubutes @resizeWidth and @resizeHeight can specified on subsequent lines, otherwise they " . "default to 1600. Note that this control provides a quick way to output all occurrence custom attributes plus photo and sensitivity input controls " . "and outputs all attributes irrespective of the form block or tab. For finer control of the output, see the [occAttr:n], [photos] and [sensitivity] controls.<br/>" . "&nbsp;&nbsp;<strong>[date]</strong> - a sample must always have a date.<br/>" . "&nbsp;&nbsp;<strong>[map]</strong> - a map that links to the spatial reference and location select/autocomplete controls<br/>" . "&nbsp;&nbsp;<strong>[spatial reference]</strong> - a sample must always have a spatial reference.<br/>" . "&nbsp;&nbsp;<strong>[location name]</strong> - a text box to enter a place name.<br/>" . "&nbsp;&nbsp;<strong>[location autocomplete]</strong> - an autocomplete control for picking a stored location. A spatial reference is still required.<br/>" . "&nbsp;&nbsp;<strong>[location url param]</strong> - a set of hidden inputs that insert the location ID read from a URL parameter called location_id into the form. Uses the " . "location's centroid as the sample map reference.<br/>" . "&nbsp;&nbsp;<strong>[location select]</strong> - a select control for picking a stored location. A spatial reference is still required.<br/>" . "&nbsp;&nbsp;<strong>[location map]</strong> - combines location select, map and spatial reference controls for recording only at stored locations.<br/>" . "&nbsp;&nbsp;<strong>[photos]</strong> - use when in single record entry mode to provide a control for uploading occurrence photos. Alternatively use the " . "[species attributes] control to output all input controls for the species automatically. The [photos] control overrides the setting <strong>Occurrence Images</strong>.<br/>" . "&nbsp;&nbsp;<strong>[place search]</strong> - zooms the map to the entered location.<br/>" . "&nbsp;&nbsp;<strong>[recorder names]</strong> - a text box for names. The logged-in user's id is always stored with the record.<br/>" . "&nbsp;&nbsp;<strong>[record status]</strong> - allow recorder to mark record as in progress or complete<br/>" . "&nbsp;&nbsp;<strong>[sample comment]</strong> - a text box for sample level comment. (Each occurrence may also have a comment.) <br/>" . "&nbsp;&nbsp;<strong>[sample photo]</strong>. - a photo upload for sample level images. (Each occurrence may also have photos.) <br/>" . "&nbsp;&nbsp;<strong>[sensitivity]</strong> - outputs a control for setting record sensitivity and the public viewing precision. This control will also output " . "any other occurrence custom attributes which are on an outer block called Sensitivity. Any such attributes will then be disabled when the record is " . "not sensitive, so they can be used to capture information that only relates to sensitive records.<br/>" . "&nbsp;&nbsp;<strong>[zero abundance]</strong>. - use when in single record entry mode to provide a checkbox for specifying negative records.<br/>" . "<strong>@option=value</strong> on the line(s) following any control allows you to override one of the options passed to the control. The options " . "available depend on the control. For example @label=Abundance would set the untranslated label of a control to Abundance. Where the " . "option value is an array, use valid JSON to encode the value. For example an array of strings could be passed as @occAttrClasses=[\"class1\",\"class2\"] " . "or a keyed array as @extraParams={\"preferred\":\"true\",\"orderby\":\"term\"}. " . "Other common options include helpText (set to a piece of additional text to display alongside the control) and class (to add css " . "classes to the control such as control-width-3). <br/>" . "<strong>[*]</strong> is used to make a placeholder for putting any custom attributes that should be inserted into the current tab. When this option is " . "used, you can change any of the control options for an individual custom attribute control by putting @control|option=value on the subsequent line(s). " . "For example, if a control is for smpAttr:4 then you can update it's label by specifying @smpAttr:4|label=New Label on the line after the [*]. " . "You can also set an option for all the controls output by the [*] block by specifying @option=value as for non-custom controls, e.g. " . "set @label=My label to define the same label for all controls in this custom attribute block. " . "You can define the value for a control using the standard replacement tokens for user data, namely {user_id}, {username}, {email} and {profile_*}; " . "replace * in the latter to construct an existing profile field name. For example you could set the default value of an email input using @smpAttr:n|default={email} " . "where n is the attribute ID.<br/>" . "<strong>[smpAttr:<i>n</i>]</strong> is used to insert a particular custom sample attribute identified by its ID number<br/>" . "<strong>[occAttr:<i>n</i>]</strong> is used to insert a particular custom occurrence attribute identified by its ID number when inputting single records at a time. " . "Or use [species attributes] to output the whole lot.<br/>" . "<strong>?help text?</strong> is used to define help text to add to the tab, e.g. ?Enter the name of the site.? <br/>" . "<strong>|</strong> is used insert a split so that controls before the split go into a left column and controls after the split go into a right column.<br/>" . "<strong>all else</strong> is copied to the output html so you can add structure for styling.", 'type' => 'textarea', 'default' => "=Species=\r\n" . "?Please enter the species you saw and any other information about them.?\r\n" . "[species]\r\n" . "@resizeWidth=1500\r\n" . "@resizeHeight=1500\r\n" . "[species attributes]\r\n" . "[*]\r\n" . "=Place=\r\n" . "?Please provide the spatial reference of the record. You can enter the reference directly, or search for a place then click on the map to set it.?\r\n" . "[spatial reference]\r\n" . "[place search]\r\n" . "[map]\r\n" . "[*]\r\n" . "=Other Information=\r\n" . "?Please provide the following additional information.?\r\n" . "[date]\r\n" . "[sample comment]\r\n" . "[*]\r\n" . "=*=", 'group' => 'User Interface'), array('name' => 'edit_taxa_names', 'caption' => 'Include option to edit entered taxa', 'description' => 'Include an icon to allow taxa to be edited after they has been entered into the species grid.', 'type' => 'checkbox', 'default' => false, 'required' => false, 'group' => 'User Interface'), array('name' => 'include_species_grid_link_page', 'caption' => 'Include icon to link to another page from a species grid row?', 'description' => 'Include an icon which links to a page from each row on the species grid e.g. to display details about a taxon. Use the "Species grid page link URL" option to provide a URL.', 'type' => 'checkbox', 'default' => false, 'required' => false, 'group' => 'User Interface'), array('name' => 'species_grid_page_link_url', 'caption' => 'Species grid page link URL', 'description' => 'URL path of the page being linked to by the "Include icon to link to another page from a species grid row" option.
                       The URL path should not include server details or a preceeding slash 
                       e.g. node/216. Note that the current version of the software will only supply a taxa_taxon_list_id value to this page as the parameter.', 'type' => 'textfield', 'default' => false, 'required' => false, 'group' => 'User Interface'), array('name' => 'species_grid_page_link_parameter', 'caption' => 'Species grid page link parameter', 'description' => 'Parameter name used by the page being linked to by the "Species grid page link URL" option. Note in the current version of the software the value
                       of the parameter will always be a taxa_taxon_list_id.', 'type' => 'textfield', 'default' => false, 'required' => false, 'group' => 'User Interface'), array('name' => 'species_grid_page_link_tooltip', 'caption' => 'Species grid page link tooltip', 'description' => 'Mouse pointer tooltip for the "Include icon to link to another page from a species grid row" option.', 'type' => 'textfield', 'default' => false, 'required' => false, 'group' => 'User Interface'), array('name' => 'grid_report', 'caption' => 'Grid Report', 'description' => 'Name of the report to use to populate the grid for selecting existing data from. The report must return a sample_id ' . 'field or occurrence_id field for linking to the data entry form. As a starting point, try ' . 'reports_for_prebuilt_forms/dynamic_sample_occurrence_samples for a list of samples.', 'type' => 'string', 'group' => 'User Interface', 'default' => 'reports_for_prebuilt_forms/dynamic_sample_occurrence_samples'), array('name' => 'verification_panel', 'caption' => 'Include verification precheck button', 'description' => 'Include a "Precheck my records" button which allows the user to request an automated ' . 'verification check to be run against their records before submission, enabling them to provide ' . 'additional information for any records which are likely to be contentious.', 'type' => 'checkbox', 'group' => 'User Interface', 'default' => false, 'required' => false), array('name' => 'users_manage_own_sites', 'caption' => 'Users can save sites', 'description' => 'Allow users to save named sites for recall when they add records in future. Users ' . 'are only able to use their own sites. To use this option, make sure you include a ' . '[location autocomplete] control in the User Interface - Form Structure setting. Use @searchUpdatesSref=true ' . 'on the next line in the form structure to specify that the grid reference for the site should be automatically filled ' . 'in after a site has been selected. You can also add @useLocationName=true on a line after the location autocomplete ' . 'to force any unmatched location names to be stored as a free-text location name against the sample.', 'type' => 'boolean', 'default' => false, 'required' => false, 'group' => 'Locations'), array('name' => 'multiple_occurrence_mode', 'caption' => 'Allow a single ad-hoc record or a list of records', 'description' => 'Method of data entry, one occurrence at a time, via a grid allowing ' . 'entry of multiple occurrences at the same place and date, or allow the user to choose.', 'type' => 'select', 'options' => array('single' => 'Only allow entry of one occurrence at a time', 'multi' => 'Only allow entry of multiple occurrences using a grid', 'either' => 'Allow the user to choose single or multiple occurrence data entry.'), 'default' => 'multi', 'group' => 'Species'), array('fieldname' => 'list_id', 'label' => 'Species List ', 'helpText' => 'The species list that species can be selected from. This list is pre-populated ' . 'into the grid when doing grid based data entry, or provides the list which a species ' . 'can be picked from when doing single occurrence data entry.', 'type' => 'select', 'table' => 'taxon_list', 'valueField' => 'id', 'captionField' => 'title', 'required' => false, 'group' => 'Species', 'siteSpecific' => true), array('fieldname' => 'extra_list_id', 'label' => 'Extra Species List', 'helpText' => 'The second species list that species can be selected from. This list is available for additional ' . 'taxa being added to the grid when doing grid based data entry. When using the single record input mode, if you ' . 'provide a list here as well as in the Species List option above, then both will be available for selection from. ' . 'You might like to use this when you need to augment the species available from a main species list with a few ' . 'additional specialist taxa for example.', 'type' => 'select', 'table' => 'taxon_list', 'valueField' => 'id', 'captionField' => 'title', 'required' => false, 'group' => 'Species', 'siteSpecific' => true), array('fieldname' => 'copy_species_row_data_to_new_rows', 'label' => 'New species grid rows use previous row\'s data', 'helpText' => 'Use this option to enable newly added rows on the species grid to have their default data ' . 'taken from the previous row rather than being initially blank. Use the "Columns to include" option ' . 'to specify which columns you wish to include. The data is copied automatically when the new row is ' . 'created and also when edits are made to the previous row.', 'type' => 'checkbox', 'default' => false, 'required' => false, 'group' => 'Species'), array('name' => 'previous_row_columns_to_include', 'caption' => 'Columns to include', 'description' => 'Comma seperated list of columns you wish to include when using the "New species grid rows use previous row\'s data" option. ' . 'Non-case or white space sensitive. Any unrecognised columns are ignored and the images column cannot be copied.', 'type' => 'textarea', 'required' => false, 'group' => 'Species'), array('fieldname' => 'user_controls_taxon_filter', 'label' => 'User can filter the Extra Species List', 'helpText' => 'Tick this box to enable a filter button in the species column title which allows the user to control ' . 'which species groups are available for selection when adding new species to the grid, e.g. the user can filter ' . 'to allow selection from just one species group.', 'type' => 'checkbox', 'default' => false, 'required' => false, 'group' => 'Species'), array('fieldname' => 'cache_lookup', 'label' => 'Cache lookups', 'helpText' => 'Tick this box to select to use a cached version of the lookup list when ' . 'searching for extra species names to add to the grid, or set to false to use the ' . 'live version (default). The latter is slower and places more load on the warehouse so should only be ' . 'used during development or when there is a specific need to reflect taxa that have only ' . 'just been added to the list.', 'type' => 'checkbox', 'required' => false, 'group' => 'Species', 'siteSpecific' => false), array('name' => 'species_ctrl', 'caption' => 'Single Species Selection Control Type', 'description' => 'The type of control that will be available to select a single species.', 'type' => 'select', 'options' => array('autocomplete' => 'Autocomplete', 'select' => 'Select', 'listbox' => 'List box', 'radio_group' => 'Radio group', 'treeview' => 'Treeview', 'tree_browser' => 'Tree browser'), 'default' => 'autocomplete', 'group' => 'Species'), array('name' => 'sub_species_column', 'caption' => 'Include sub-species in a separate column?', 'description' => 'If checked and doing grid based data entry letting the recorder add species they choose to ' . 'the bottom of the grid, sub-species will be displayed in a separate column so the recorder picks the species ' . 'first then the subspecies. The species checklist must be configured so that species are parents of the subspecies. ' . 'This setting also forces the Cache Lookups option therefore it requires the Cache Builder module to be installed ' . 'on the Indicia warehouse.', 'type' => 'boolean', 'default' => false, 'required' => false, 'group' => 'Species'), array('name' => 'species_include_both_names', 'caption' => 'Include both names in species controls and added rows', 'description' => 'When using a species grid with the ability to add new rows, the autocomplete control by default shows just the searched taxon name in the drop down. ' . 'Set this to include both the latin and common names, with the searched one first. This also controls the label when adding a new taxon row into the grid.', 'type' => 'boolean', 'required' => false, 'group' => 'Species'), array('name' => 'species_include_taxon_group', 'caption' => 'Include taxon group name in species autocomplete and added rows', 'description' => 'When using a species grid with the ability to add new rows, the autocomplete control by default shows just the searched taxon name in the drop down. ' . 'Set this to include the taxon group title.  This also controls the label when adding a new taxon row into the grid.', 'type' => 'boolean', 'required' => false, 'group' => 'Species'), array('name' => 'species_include_id_diff', 'caption' => 'Include identification_difficulty icons in species autocomplete and added rows', 'description' => 'Use data cleaner identification difficulty rules to generate icons indicating when ' . 'hard to ID taxa have been selected.', 'type' => 'boolean', 'required' => false, 'default' => true, 'group' => 'Species'), array('name' => 'occurrence_comment', 'caption' => 'Occurrence Comment', 'description' => 'Should an input box be present for a comment against each occurrence?', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Species'), array('name' => 'occurrence_sensitivity', 'caption' => 'Occurrence Sensitivity', 'description' => 'Should a control be present for sensitivity of each record?  This applies when using grid entry mode or when using the [species attributes] control ' . 'to output all the occurrence related input controls automatically. The [sensitivity] control outputs a sensitivity input control independently of this setting.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Species'), array('name' => 'occurrence_images', 'caption' => 'Occurrence Images', 'description' => 'Should occurrences allow images to be uploaded? This applies when using grid entry mode or when using the [species attributes] control ' . 'to output all the occurrence related input controls automatically. The [photos] control outputs a photos input control independently of this setting.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Species'), array('name' => 'col_widths', 'caption' => 'Grid Column Widths', 'description' => 'Provide percentage column widths for each species checklist grid column as a comma separated list. To leave a column at its default with, put a blank ' . 'entry in the list. E.g. "25,,20" would set the first column to 25% width and the 3rd column to 20%, leaving the other columns as they are.', 'type' => 'string', 'group' => 'Species', 'required' => false), array('name' => 'taxon_filter_field', 'caption' => 'Field used to filter taxa', 'description' => 'If you want to allow recording for just part of the selected list(s), then select which field you will ' . 'use to specify the filter by.', 'type' => 'select', 'options' => array('preferred_name' => 'Preferred name of the taxa', 'taxon_meaning_id' => 'Taxon Meaning ID', 'taxa_taxon_list_id' => 'Taxa Taxon List ID', 'taxon_group' => 'Taxon group title', 'external_key' => 'Taxon external key', 'id' => 'Taxon ID'), 'required' => false, 'group' => 'Species'), array('name' => 'use_url_taxon_parameter', 'caption' => 'Use URL taxon parameter', 'description' => 'Use a URL parameter called taxon to get the filter? Case sensitive. Uses the "Field used to filter taxa" setting to control ' . 'what is being filtered against, e.g. &taxon=Passer+domesticus,Turdus+merula', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Species'), array('name' => 'taxon_filter', 'caption' => 'Taxon filter items', 'description' => 'Taxa can be filtered by entering values into this box. ' . 'Enter one value per line. E.g. enter a list of taxon group titles if you are filtering by taxon group. ' . 'If you provide a single taxon preferred name, taxon meaning ID or external key in this box and you set the <strong>Allow a single ' . 'ad-hoc record or a list of records</strong> setting to "Only allow entry of one occurrence at a time" then the form is set up for ' . 'recording just this single species. Therefore there will be no species picker control or input grid, and the form will always operate ' . 'in the single record, non-grid mode. You may like to include information about what is being recorded in the body text for the page or by using ' . 'the <strong>Include a message stating which species you are recording in single species mode?</strong> checkbox to automatically add a message to the screen. ' . 'You may also want to configure the User Interface section of the form\'s Form Structure to move the [species] and [species] controls ' . 'to a different tab and remove the =species= tab, especially if there are no other occurrence attributes on the form.' . 'The \'Use URL taxon parameter\' option can be used to override the filters specified here.', 'type' => 'textarea', 'required' => false, 'group' => 'Species'), array('name' => 'single_species_message', 'caption' => 'Include a message stating which species you are recording in single species mode?', 'description' => 'Message which displays the species you are recording against in single species mode. When selected, this will automatically be displayed where applicable.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Species'), array('name' => 'species_names_filter', 'caption' => 'Species Names Filter', 'description' => 'Select the filter to apply to the species names which are available to choose from.', 'type' => 'select', 'options' => array('all' => 'All names are available', 'language' => 'Only allow selection of species using common names in the user\'s language', 'preferred' => 'Only allow selection of species using names which are flagged as preferred', 'excludeSynonyms' => 'Allow common names or preferred latin names'), 'default' => 'all', 'group' => 'Species'), array('name' => 'link_species_popups', 'caption' => 'Create popups for certain species', 'description' => 'You can mark some blocks of the form to only be shown as a popup when a certain species is entered into the species grid. For each popup block, ' . 'put the species name on a newline, followed by | then the outer block name, followed by | then the inner block name if relevant. For example, ' . '"Lasius niger|Additional info|Colony info" pops up the controls from the block Additional Info > Colony info when a species is entered with this ' . 'name. For the species name, specify the preferred name from list.', 'type' => 'textarea', 'required' => false, 'group' => 'Species'), array('name' => 'sample_method_id', 'caption' => 'Sample Method', 'type' => 'select', 'table' => 'termlists_term', 'captionField' => 'term', 'valueField' => 'id', 'extraParams' => array('termlist_external_key' => 'indicia:sample_methods'), 'required' => false, 'helpText' => 'The sample method that will be used for created samples.'), array('name' => 'includeLocTools', 'caption' => 'Include Location Tools', 'description' => 'Include a tab for the allocation of locations when displaying the initial grid. This is done using the iform_loctools module.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'Locations'), array('name' => 'loctoolsLocTypeID', 'caption' => 'Location Tools Location Type ID filter', 'description' => 'When performing allocation of locations, filter available locations by this location_type_id.', 'type' => 'int', 'required' => false, 'group' => 'Locations'), array('name' => 'loctoolsPageSize', 'caption' => 'Location Tools Page Size', 'description' => 'When performing allocation of locations, this is the size of each page of locations.', 'type' => 'int', 'required' => true, 'default' => 20, 'group' => 'Locations'), array('name' => 'defaults', 'caption' => 'Default Values', 'description' => 'Supply default values for each field as required. On each line, enter fieldname=value. For custom attributes, ' . 'the fieldname is the untranslated caption. For other fields, it is the model and fieldname, e.g. occurrence.record_status. ' . 'For date fields, use today to dynamically default to today\'s date. NOTE, currently only supports occurrence:record_status and ' . 'sample:date but will be extended in future.', 'type' => 'textarea', 'default' => 'occurrence:record_status=C'), array('name' => 'remembered', 'caption' => 'Remembered Fields', 'description' => 'Supply a list of field names that should be remembered in a cookie, saving re-inputting them if they are likely to repeat. ' . 'For greater flexibility use the @lockable=true option on each control instead.', 'type' => 'textarea', 'required' => false), array('name' => 'edit_permission', 'caption' => 'Permission required for editing other people\'s data', 'description' => 'Set to the name of a permission which is required in order to be able to edit other people\'s data.', 'type' => 'text_input', 'required' => false, 'default' => 'indicia data admin'), array('name' => 'ro_permission', 'caption' => 'Permission required for viewing other people\'s data', 'description' => 'Set to the name of a permission which is required in order to be able to view other people\'s data (not edit).', 'type' => 'text_input', 'required' => false, 'default' => 'indicia data view')));
     return $retVal;
 }
Пример #3
0
 /**
  * Get the list of parameters for this form.
  * @return array List of parameters that this form requires.
  */
 public static function get_parameters()
 {
     $retVal = array_merge(parent::get_parameters(), array(array('name' => 'structure', 'caption' => 'Form Structure', 'description' => 'Define the structure of the form. Each component goes on a new line and is nested inside the previous component where appropriate. The following types of ' . "component can be specified. <br/>" . "<strong>=tab/page name=</strong> is used to specify the name of a tab or wizard page. (Alpha-numeric characters only)<br/>" . "<strong>=*=</strong> indicates a placeholder for putting any custom attribute tabs not defined in this form structure. <br/>" . "<strong>[control name]</strong> indicates a predefined control is to be added to the form with the following predefined controls available: <br/>" . "&nbsp;&nbsp;<strong>[map]</strong> - a map that links to the spatial reference control<br/>" . "&nbsp;&nbsp;<strong>[place search]</strong> - zooms the map to the entered location.<br/>" . "&nbsp;&nbsp;<strong>[spatial reference]</strong> - a location must always have a spatial reference.<br/>" . "&nbsp;&nbsp;<strong>[location name]</strong> - a text box to enter a descriptive name for the locataion.<br/>" . "&nbsp;&nbsp;<strong>[location code]</strong> - a text box to enter an identifying code for the location.<br/>" . "&nbsp;&nbsp;<strong>[location type]</strong> - a list to select the location type (hidden if a filter limits this to a single type).<br/>" . "&nbsp;&nbsp;<strong>[location comment]</strong> - a text box for comments.<br/>" . "&nbsp;&nbsp;<strong>[location photo]</strong> - a photo upload for location images. <br/>" . "<strong>@option=value</strong> on the line(s) following any control allows you to override one of the options passed to the control. The options " . "available depend on the control. For example @label=Abundance would set the untranslated label of a control to Abundance. Where the " . "option value is an array, use valid JSON to encode the value. For example an array of strings could be passed as @occAttrClasses=[\"class1\",\"class2\"] " . "or a keyed array as @extraParams={\"preferred\":\"true\",\"orderby\":\"term\"}. " . "Other common options include helpText (set to a piece of additional text to display alongside the control) and class (to add css " . "classes to the control such as control-width-3). <br/>" . "<strong>[*]</strong> is used to make a placeholder for putting any custom attributes that should be inserted into the current tab. When this option is " . "used, you can change any of the control options for an individual custom attribute control by putting @control|option=value on the subsequent line(s). " . "For example, if a control is for smpAttr:4 then you can update it's label by specifying @smpAttr:4|label=New Label on the line after the [*].<br/>" . "<strong>[locAttr:<i>n</i>]</strong> is used to insert a particular custom attribute identified by its ID number<br/>" . "<strong>?help text?</strong> is used to define help text to add to the tab, e.g. ?Enter the name of the site.? <br/>" . "<strong>all else</strong> is copied to the output html so you can add structure for styling.", 'type' => 'textarea', 'default' => "=Place=\r\n" . "?Please provide the spatial reference of the location. You can enter the reference directly, or search for a place then click on the map to set it.?\r\n" . "[location name]\r\n" . "[location code]\r\n" . "[location type]\r\n" . "[spatial reference]\r\n" . "[place search]\r\n" . "[map]\r\n" . "[*]\r\n" . "=Other Information=\r\n" . "?Please provide the following additional information.?\r\n" . "[location comment]\r\n" . "[*]\r\n" . "=*=", 'group' => 'User Interface'), array('name' => 'grid_report', 'caption' => 'Grid Report', 'description' => 'Name of the report to use to populate the grid for selecting existing data from. The report must return a location_id ' . 'field for linking to the data entry form. As a starting point, try reports_for_prebuilt_forms/simple_location_list.', 'type' => 'string', 'group' => 'User Interface', 'default' => 'reports_for_prebuilt_forms/simple_location_list'), array('name' => 'list_all_locations', 'caption' => 'List all locations', 'description' => 'Should the user be given the option to list all locations in the grid rather than just their own? ' . 'To use this, the selected report must have an ownData parameter and return an editable field. ' . 'See reports_for_prebuilt_forms/simple_location_list_2 for an example.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'User Interface'), array('name' => 'defaults', 'caption' => 'Default Values', 'description' => 'Supply default values for each field as required. On each line, enter fieldname=value. For custom attributes, ' . 'the fieldname is the untranslated caption. For other fields, it is the model and fieldname, e.g. occurrence.record_status. ' . 'For date fields, use today to dynamically default to today\'s date. NOTE, currently only supports occurrence:record_status and ' . 'sample:date but will be extended in future.', 'type' => 'textarea', 'required' => false)));
     return $retVal;
 }
Пример #4
0
 /**
  * Get the list of parameters for this form.
  * @return array List of parameters that this form requires.
  */
 public static function get_parameters()
 {
     $retVal = array_merge(parent::get_parameters(), array(array('name' => 'structure', 'caption' => 'Form Structure', 'description' => 'Define the structure of the form. Each component goes on a new line and is nested inside the previous component where appropriate. The following types of ' . "component can be specified. <br/>" . "<strong>=tab/page name=</strong> is used to specify the name of a tab or wizard page. (Alpha-numeric characters only)<br/>" . "<strong>=*=</strong> indicates a placeholder for putting any custom attribute tabs not defined in this form structure. <br/>" . "<strong>[control name]</strong> indicates a predefined control is to be added to the form with the following predefined controls available: <br/>" . "&nbsp;&nbsp;<strong>[map]</strong> - a map that links to the spatial reference control<br/>" . "&nbsp;&nbsp;<strong>[place search]</strong> - zooms the map to the entered location.<br/>" . "&nbsp;&nbsp;<strong>[spatial reference]</strong> - a location must always have a spatial reference.<br/>" . "&nbsp;&nbsp;<strong>[location name]</strong> - a text box to enter a descriptive name for the locataion.<br/>" . "&nbsp;&nbsp;<strong>[location code]</strong> - a text box to enter an identifying code for the location.<br/>" . "&nbsp;&nbsp;<strong>[location type]</strong> - a list to select the location type (hidden if a filter limits this to a single type).<br/>" . "&nbsp;&nbsp;<strong>[location comment]</strong> - a text box for comments.<br/>" . "&nbsp;&nbsp;<strong>[location photo]</strong> - a photo upload for location images. <br/>" . "<strong>@option=value</strong> on the line(s) following any control allows you to override one of the options passed to the control. The options " . "available depend on the control. For example @label=Abundance would set the untranslated label of a control to Abundance. Where the " . "option value is an array, use valid JSON to encode the value. For example an array of strings could be passed as @occAttrClasses=[\"class1\",\"class2\"] " . "or a keyed array as @extraParams={\"preferred\":\"true\",\"orderby\":\"term\"}. " . "Other common options include helpText (set to a piece of additional text to display alongside the control) and class (to add css " . "classes to the control such as control-width-3). <br/>" . "<strong>[*]</strong> is used to make a placeholder for putting any custom attributes that should be inserted into the current tab. When this option is " . "used, you can change any of the control options for an individual custom attribute control by putting @control|option=value on the subsequent line(s). " . "For example, if a control is for smpAttr:4 then you can update it's label by specifying @smpAttr:4|label=New Label on the line after the [*].<br/>" . "<strong>[locAttr:<i>n</i>]</strong> is used to insert a particular custom attribute identified by its ID number<br/>" . "<strong>?help text?</strong> is used to define help text to add to the tab, e.g. ?Enter the name of the site.? <br/>" . "<strong>all else</strong> is copied to the output html so you can add structure for styling.", 'type' => 'textarea', 'default' => "=Place=\r\n" . "?Please provide the spatial reference of the location. You can enter the reference directly, or search for a place then click on the map to set it.?\r\n" . "[location name]\r\n" . "[location code]\r\n" . "[location type]\r\n" . "[spatial reference]\r\n" . "[place search]\r\n" . "[map]\r\n" . "[*]\r\n" . "=Other Information=\r\n" . "?Please provide the following additional information.?\r\n" . "[location comment]\r\n" . "[*]\r\n" . "=*=", 'group' => 'User Interface'), array('name' => 'grid_report', 'caption' => 'Grid Report', 'description' => 'Name of the report to use to populate the grid for selecting existing data from. The report must return a location_id ' . 'field for linking to the data entry form. As a starting point, try reports_for_prebuilt_forms/simple_location_list.', 'type' => 'string', 'group' => 'User Interface', 'default' => 'reports_for_prebuilt_forms/simple_location_list'), array('name' => 'list_all_locations', 'caption' => 'List all locations', 'description' => 'Should the user be given the option to list all locations in the grid rather than just their own? ' . 'To use this, the selected report must have an ownData parameter and return an editable field. ' . 'See reports_for_prebuilt_forms/simple_location_list_2 for an example.', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'User Interface'), array('name' => 'location_images', 'caption' => 'Location Images', 'description' => 'Should locations allow images to be uploaded?', 'type' => 'boolean', 'required' => false, 'default' => false, 'group' => 'User Interface'), array('name' => 'defaults', 'caption' => 'Default Values', 'description' => 'Supply the ID of the Preferred Boundary Location Attribute in the database.', 'type' => 'textarea', 'required' => false), array('name' => 'preferred_boundary_attribute_id', 'caption' => 'Preferred Boundary Attribute Id', 'description' => 'The location type id of the preferred boundary attribute type.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'count_unit_location_type_id', 'caption' => 'Count Unit Location Type Id', 'description' => 'The location type id of the Count Unit location type.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'count_unit_boundary_location_type_id', 'caption' => 'Count Unit Boundary Location Type Id', 'description' => 'The location type id of the Count Unit Boundary location type.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'attribute_ids_to_store_on_count_unit_boundary', 'caption' => 'Location Attributes to be stored in the Count Unit Boundary', 'description' => 'Comma seperated list of Location Attribute Ids that are to be stored as part of the Count Unit Boundary.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'verified_attribute_id', 'caption' => 'Verification Attribute Id', 'description' => 'Id of the "Verified" location attribute.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'annotation_location_type_id', 'caption' => 'Annotation Location Type Id', 'description' => 'Id of the annotation location type.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'boundary_start_date_id', 'caption' => 'Boundary Start Date Id', 'description' => 'Id of the start date attribute for a count unit boundary.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'boundary_end_date_id', 'caption' => 'Boundary End Date Id', 'description' => 'Id of the end date attribute for a count unit boundary.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'official_reason_for_change_attribute_id', 'caption' => 'Official Reason For Change Id', 'description' => 'Id of the Official Reason For Change location attribute.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'surveys_attribute_id', 'caption' => 'Surveys Attribute Id', 'description' => 'Id of the Surveys location attribute.', 'type' => 'string', 'required' => true, 'group' => 'Configurable Ids'), array('name' => 'administrator_mode', 'caption' => 'Administrator Mode?', 'description' => 'Place page into administrator mode. This enables extra functionality and better privileges for performing certain tasks.', 'type' => 'boolean', 'required' => false, 'group' => 'Administrator Mode')));
     return $retVal;
 }
Пример #5
0
 /**
  * Get the list of parameters for this form.
  * @return array List of parameters that this form requires.
  */
 public static function get_parameters()
 {
     $retVal = array_merge(parent::get_parameters(), array(array('name' => 'structure', 'caption' => 'Form Structure', 'description' => 'Define the structure of the form. Each component goes on a new line and is nested inside the previous component where appropriate. The following types of ' . "component can be specified. <br/>" . "<strong>=tab/page name=</strong> is used to specify the name of a tab or wizard page. (Alpha-numeric characters only)<br/>" . "<strong>=*=</strong> indicates a placeholder for putting any custom attribute tabs not defined in this form structure. <br/>" . "<strong>[control name]</strong> indicates a predefined control is to be added to the form with the following predefined controls available: <br/>" . "&nbsp;&nbsp;<strong>[first name]</strong> - a text box to enter the person's first name.<br/>" . "&nbsp;&nbsp;<strong>[surname]</strong> - a text box to enter the person's surname.<br/>" . "&nbsp;&nbsp;<strong>[email address]</strong> - a text box to enter the person's email address.<br/>" . "<strong>@option=value</strong> on the line(s) following any control allows you to override one of the options passed to the control. The options " . "available depend on the control. For example @label=Last Name would set the untranslated label of a control to Last Name. Where the " . "option value is an array, use valid JSON to encode the value. For example an array of strings could be passed as @extraParams=[\"value1\",\"value2\"] " . "or a keyed array as @extraParams={\"preferred\":\"true\",\"orderby\":\"term\"}. " . "Other common options include helpText (set to a piece of additional text to display alongside the control) and class (to add css " . "classes to the control such as control-width-3). <br/>" . "<strong>[*]</strong> is used to make a placeholder for putting any custom attributes that should be inserted into the current tab. When this option is " . "used, you can change any of the control options for an individual custom attribute control by putting @control|option=value on the subsequent line(s). " . "For example, if a control is for psnAttr:4 then you can update it's label by specifying @psnAttr:4|label=New Label on the line after the [*].<br/>" . "<strong>[psnAttr:<i>n</i>]</strong> is used to insert a particular custom attribute identified by its ID number<br/>" . "<strong>@helpText</strong> is used to define help text to add to the tab, e.g. @helpText=Enter the surname of the person. <br/>" . "<strong>all else</strong> is copied to the output html so you can add structure for styling.", 'type' => 'textarea', 'default' => "=Information=\r\n" . "[first name]\r\n" . "[surname]\r\n" . "[email address]\r\n" . "[*]\r\n" . "=*=", 'group' => 'User Interface'), array('name' => 'defaults', 'caption' => 'Default Values', 'description' => 'Supply default values for each field as required. On each line, enter fieldname=value. For custom attributes, ' . 'the fieldname is the untranslated caption. For other fields, it is the model and fieldname, e.g. person.first_name. ', 'type' => 'textarea', 'required' => false)));
     return $retVal;
 }