Example #1
0
 public static function get_parameters()
 {
     $retVal = array();
     $parentVal = array_merge(parent::get_parameters(), iform_mnhnl_getParameters(), array(array('name' => 'reportFilenamePrefix', 'caption' => 'Report Filename Prefix', 'description' => 'Prefix to be used at the start of the download report filenames.', 'type' => 'string', 'default' => 'bathibernation', 'group' => 'Reporting'), array('name' => 'siteTypeAttr', 'caption' => 'Site Type Attribute', 'description' => 'Caption of the location attribute used to indicate the site type.', 'type' => 'int', 'default' => 'Site type', 'group' => 'Locations'), array('name' => 'entranceDefectiveTermID', 'caption' => 'Entrance hole Attribute, Defective Term ID', 'description' => 'The Entrance hole attribute has a Defective choice which when selected allows an additional text field to be filled in. This field holds the Indicia term meaning id for the checkbox.', 'type' => 'int', 'group' => 'User Interface'), array('name' => 'entranceDefectiveCommentAttrID', 'caption' => 'Defective Entrance Comment Attribute ID', 'description' => 'The Entrance hole attribute has a Defective choice which when selected allows an additional text field to be filled in. This field holds the text field Indicia attribute id', 'type' => 'int', 'group' => 'User Interface'), array('name' => 'disturbanceOtherTermID', 'caption' => 'Disturbance Attribute, Other Term ID', 'description' => 'The Disturbances attribute has an Other choice which when selected allows an additional text field to be filled in. This field holds the Indicia term meaning id for the checkbox.', 'type' => 'int', 'group' => 'User Interface'), array('name' => 'disturbanceCommentAttrID', 'caption' => 'Disturbance Other Comment Attribute ID', 'description' => 'The Disturbances attribute has an Other choice which when selected allows an additional text field to be filled in. This field holds the text field Indicia attribute id', 'type' => 'int', 'group' => 'User Interface'), array('name' => 'removeBreakIDs', 'caption' => 'Remove breaks', 'description' => 'The Sample Attributes to remove the break after. This text field holds a colon separated list of Indicia attribute ids', 'type' => 'string', 'group' => 'User Interface'), array('name' => 'attributeValidation', 'caption' => 'Attribute Validation Rules', 'description' => 'Client Validation rules to be enforced on attributes: allows more options than allowed by straight class led validation.', 'type' => 'textarea', 'required' => false, 'group' => 'User Interface'), array('name' => 'max_species_ids', 'caption' => 'max number of species to be returned by a search', 'description' => 'The maximum number of species to be returned by the drop downs at any one time.', 'default' => 25, 'type' => 'int', 'group' => 'Species')));
     foreach ($parentVal as $param) {
         if ($param['name'] == 'structure') {
             $param['default'] = "=Site=\r\n" . "[custom JS]\r\n" . "[location module]\r\n" . "[location attributes]\r\n" . "@lookUpListCtrl=radio_group\r\n" . "@lookUpKey=meaning_id\r\n" . "@sep= \r\n" . "@tabNameFilter=Site\r\n" . "@class=wide\r\n" . "[location spatial reference]\r\n" . "[location attributes]\r\n" . "@tabNameFilter=SpatialRef\r\n" . "[place search]\r\n" . "[map]\r\n" . "@layers=[\"SiteAreaLayer\",\"SitePathLayer\",\"SitePointLayer\",\"SiteLabelLayer\"]\r\n" . "@editLayer=false\r\n" . "@searchLayer=true\r\n" . "@searchUpdatesSref=false\r\n" . "@maxZoom=17\r\n" . "[point grid]\r\n" . "@srefs=2169,LUREF (m),X,Y,;4326,Lat/Long Deg,Lat,Long,D;4326,Lat/Long Deg:Min,Lat,Long,DM;4326,Lat/Long Deg:Min:Sec,Lat,Long,DMS\r\n" . "[location comment]\r\n" . "[*]\r\n" . "=Conditions=\r\n" . "[date]\r\n" . "[recorder names]\r\n" . "[*]\r\n" . "@sep= \r\n" . "@lookUpKey=meaning_id\r\n" . "[sample comment]\r\n" . "=Species=\r\n" . "[species]\r\n" . "@view=detail\r\n" . "@rowInclusionCheck=alwaysRemovable\r\n" . "@sep= \r\n" . "@lookUpKey=meaning_id\r\n" . "[*]\r\n" . "[lateJS]\r\n";
         }
         if ($param['name'] == 'attribute_termlist_language_filter') {
             $param['default'] = true;
         }
         if ($param['name'] == 'grid_report') {
             $param['default'] = 'reports_for_prebuilt_forms/MNHNL/mnhnl_bats_grid';
         }
         if ($param['name'] != 'species_include_taxon_group' && $param['name'] != 'link_species_popups' && $param['name'] != 'species_include_both_names' && $param['name'] != 'includeLocTools' && $param['name'] != 'loctoolsLocTypeID') {
             $retVal[] = $param;
         }
     }
     return $retVal;
 }
 public static function get_parameters()
 {
     $retVal = array();
     $parentVal = array_merge(parent::get_parameters(), iform_mnhnl_getParameters(), array(array('name' => 'reportFilenamePrefix', 'caption' => 'Report Filename Prefix', 'description' => 'Prefix to be used at the start of the download report filenames.', 'type' => 'string', 'default' => 'ButterflySites', 'group' => 'Reporting'), array('name' => 'max_species_ids', 'caption' => 'max number of species to be returned by a search', 'description' => 'The maximum number of species to be returned by the drop downs at any one time.', 'default' => 100, 'type' => 'int', 'group' => 'Species'), array('name' => 'attributeValidation', 'caption' => 'Attribute Validation Rules', 'description' => 'Client Validation rules to be enforced on attributes: allows more options than allowed by straight class led validation.', 'type' => 'textarea', 'required' => false, 'group' => 'User Interface')));
     foreach ($parentVal as $param) {
         if ($param['name'] == 'structure') {
             $param['default'] = "=Sites=\r\n" . "[lux5kgrid2]\r\n" . "[map]\r\n" . "@layers=[\"ParentWMSLayer\",\"ParentLocationLayer\",\"SitePointLayer\",\"SitePathLayer\",\"SiteAreaLayer\",\"SiteLabelLayer\"]\r\n" . "@editLayer=false\r\n" . "@clickableLayers=[\"ParentWMSLayer\"]\r\n" . "@clickableLayersOutputMode=custom\r\n" . "@clickableLayersOutputDiv=clickableLayersOutputDiv\r\n" . "@clickableLayersOutputFn=setClickedParent\r\n" . "[point grid]\r\n" . "@srefs=2169,LUREF (m),X,Y,;4326,Lat/Long Deg,Lat,Long,D;4326,Lat/Long Deg:Min,Lat,Long,DM;4326,Lat/Long Deg:Min:Sec,Lat,Long,DMS\r\n" . "[sample comment]\r\n" . "=Conditions=\r\n" . "[recorder names]\r\n" . "[*]\r\n" . "@sep=&#32;\r\n" . "@lookUpKey=meaning_id\r\n" . "[year]\r\n" . "@boltTo=passage\r\n" . "[conditions grid]\r\n" . "@sep=<br />\r\n" . "@lookUpKey=meaning_id\r\n" . "@tabNameFilter=ConditionsGrid\r\n" . "@setRowRequired=2\r\n" . "@NumRows=4\r\n" . "@NumAttrCols=3\r\n" . "=Species=\r\n" . "[species grid]\r\n" . "[*]\r\n" . "[late JS]";
         }
         if ($param['name'] == 'attribute_termlist_language_filter') {
             $param['default'] = true;
         }
         if ($param['name'] == 'grid_report') {
             $param['default'] = 'reports_for_prebuilt_forms/MNHNL/mnhnl_butterflies2';
         }
         if ($param['name'] != 'species_include_taxon_group' && $param['name'] != 'link_species_popups' && $param['name'] != 'species_include_both_names') {
             $retVal[] = $param;
         }
     }
     return $retVal;
 }
 /**
  * Get the list of parameters for this form.
  * @return array List of parameters that this form requires.
  */
 public static function get_parameters()
 {
     $parentVal = array_merge(parent::get_parameters(), iform_mnhnl_getParameters(), array(array('name' => 'attributeValidation', 'caption' => 'Attribute Validation Rules', 'description' => 'Client Validation rules to be enforced on attributes: allows more options than allowed by straight class led validation.', 'type' => 'textarea', 'required' => false, 'group' => 'User Interface'), array('name' => 'targetSpeciesAttr', 'caption' => 'Target Species Attribute', 'description' => 'Name of lookup type Sample Attribute used to hold the target species. This is used in the reporting and control.', 'type' => 'text_input', 'group' => 'User Interface', 'required' => false), array('name' => 'targetSpeciesAttrList', 'caption' => 'Target Species Attribute List', 'description' => 'Comma separated list of sample attribute IDs used in the target species grid. This is used in the control and the reporting.', 'type' => 'text_input', 'group' => 'User Interface', 'required' => false), array('name' => 'target_species_subsample_method_id', 'caption' => 'Target Species 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 when creating subsamples in the target species grid.'), array('name' => 'language', 'caption' => 'Language Override', 'description' => 'Two digit language override.', 'type' => 'string', 'required' => true, 'default' => 'en', 'group' => 'User Interface'), array('name' => 'subsample_method_id', 'caption' => 'Subsample 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 subsamples in the species grid.'), array('name' => 'reportFilenamePrefix', 'caption' => 'Report Filename Prefix', 'description' => 'Prefix to be used at the start of the download report filenames.', 'type' => 'string', 'group' => 'Reporting'), array('name' => 'sites_download_report', 'caption' => 'Sites download report', 'description' => 'Name of the sites download report.', 'type' => 'string', 'group' => 'Reporting', 'required' => false), array('name' => 'conditions_download_report', 'caption' => 'Conditions download report', 'description' => 'Name of the conditions download report.', 'type' => 'string', 'group' => 'Reporting', 'required' => false), array('name' => 'species_download_report', 'caption' => 'Species download report', 'description' => 'Name of the species download report.', 'type' => 'string', 'group' => 'Reporting')));
     $retVal = array();
     foreach ($parentVal as $param) {
         if ($param['name'] == 'grid_report') {
             $param['description'] = 'Name of the report to use to populate the grid for selecting existing data. The report must return a sample_id ' . 'field for linking to the data entry form.';
             $param['default'] = 'reports_for_prebuilt_forms/mnhnl_dynamic_2_supersamples';
         }
         if ($param['name'] == 'interface') {
             $param['options'] = array('tabs' => 'Tabs', 'wizard' => 'Wizard');
         }
         // No one_page
         if ($param['name'] != 'no_grid' && $param['name'] != 'occurrence_comment' && $param['name'] != 'occurrence_images' && $param['name'] != 'multiple_occurrence_mode' && $param['fieldname'] != 'list_id' && $param['fieldname'] != 'extra_list_id' && $param['fieldname'] != 'cache_lookup' && $param['fieldname'] != 'user_controls_taxon_filter') {
             $retVal[] = $param;
         }
         // Note the includeLocTools is left in in case any child forms use it
     }
     return $retVal;
 }
 public static function get_parameters()
 {
     $retVal = array();
     $parentVal = array_merge(parent::get_parameters(), iform_mnhnl_getParameters(), array(array('name' => 'attributeValidation', 'caption' => 'Attribute Validation Rules', 'description' => 'Client Validation rules to be enforced on attributes: allows more options than allowed by straight class led validation.', 'type' => 'textarea', 'required' => false, 'group' => 'User Interface'), array('name' => 'targetSpeciesAttr', 'caption' => 'Target Species Attribute', 'description' => 'Name of lookup type Sample Attribute used to hold the target species. This is used in the control and the reporting.', 'type' => 'text_input', 'default' => 'ReptileTargetSpecies', 'group' => 'User Interface'), array('name' => 'targetSpeciesAttrList', 'caption' => 'Target Species Attribute List', 'description' => 'Comma separated list of sample attribute IDs used in the target species grid. This is used in the control and the reporting.', 'type' => 'text_input', 'group' => 'User Interface'), array('name' => 'language', 'caption' => 'Language Override', 'description' => '', 'type' => 'string', 'required' => true, 'default' => 'en', 'group' => 'User Interface'), array('name' => 'reportFilenamePrefix', 'caption' => 'Report Filename Prefix', 'description' => 'Prefix to be used at the start of the download report filenames.', 'type' => 'string', 'default' => 'reptiles', 'group' => 'Reporting'), array('name' => 'sites_download_report', 'caption' => 'Sites download report', 'description' => 'Name of the sites download report.', 'type' => 'string', 'group' => 'Reporting', 'required' => false), array('name' => 'conditions_download_report', 'caption' => 'Conditions download report', 'description' => 'Name of the conditions download report.', 'type' => 'string', 'group' => 'Reporting', 'required' => false), array('name' => 'species_download_report', 'caption' => 'Species download report', 'description' => 'Name of the species download report.', 'type' => 'string', 'group' => 'Reporting', 'default' => 'reports_for_prebuilt_forms/MNHNL/mnhnl_reptile_download_report')));
     foreach ($parentVal as $param) {
         if ($param['name'] == 'structure') {
             $param['default'] = "=Site=\r\n" . "[custom JS]\r\n" . "@attrRestrictionsProcessOrder=<TBD>\r\n" . "@attrRestrictions=<TBD>\r\n" . "[lux5k grid]\r\n" . "[location attributes]\r\n" . "[location spatial reference]\r\n" . "[map]\r\n" . "@layers=[\"ParentWMSLayer\",\"ParentLocationLayer\",\"SitePointLayer\",\"SitePathLayer\",\"SiteAreaLayer\",\"SiteLabelLayer\"]\r\n" . "@editLayer=false\r\n" . "@clickableLayers=[\"ParentWMSLayer\"]\r\n" . "@clickableLayersOutputMode=custom\r\n" . "@clickableLayersOutputDiv=clickableLayersOutputDiv\r\n" . "@clickableLayersOutputFn=setClickedParent\r\n" . "[point grid]\r\n" . "@srefs=2169,LUREF (m),X,Y,;4326,Lat/Long Deg,Lat,Long,D;4326,Lat/Long Deg:Min,Lat,Long,DM;4326,Lat/Long Deg:Min:Sec,Lat,Long,DMS\r\n" . "[location comment]\r\n" . "=Conditions=\r\n" . "[target species grid]\r\n" . "@targetSpeciesTermList=reptile:targetSpecies\r\n" . "@disableOptions=<TBD>\r\n" . "[date]\r\n" . "[recorder names]\r\n" . "[*]\r\n" . "@sep=&#32;\r\n" . "@lookUpKey=meaning_id\r\n" . "[sample comment]\r\n" . "=Species=\r\n" . "[species]\r\n" . "@view=detail\r\n" . "@rowInclusionCheck=alwaysRemovable\r\n" . "@lookUpKey=meaning_id\r\n" . "[*]\r\n" . "@lookUpKey=meaning_id\r\n" . "[late JS]";
         }
         if ($param['name'] == 'attribute_termlist_language_filter') {
             $param['default'] = true;
         }
         if ($param['name'] == 'grid_report') {
             $param['default'] = 'reports_for_prebuilt_forms/MNHNL/mnhnl_reptiles';
         }
         if ($param['name'] == 'extendLocationNameTemplate') {
             $param['default'] = '{name} : created by {Creator}';
         }
         if ($param['name'] != 'species_include_taxon_group' && $param['name'] != 'link_species_popups' && $param['name'] != 'species_include_both_names') {
             $retVal[] = $param;
         }
     }
     return $retVal;
 }