本文整理汇总了PHP中data_entry_helper::map方法的典型用法代码示例。如果您正苦于以下问题:PHP data_entry_helper::map方法的具体用法?PHP data_entry_helper::map怎么用?PHP data_entry_helper::map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data_entry_helper
的用法示例。
在下文中一共展示了data_entry_helper::map方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_form
/**
* Return the generated form output.
* @return Form HTML.
*/
public static function get_form($args)
{
$r = "<form method=\"post\">\n";
// Get authorisation tokens to update and read from the Warehouse.
$r .= data_entry_helper::get_auth(1, 'password');
$readAuth = data_entry_helper::get_read_auth($args['website_id'], $args['password']);
$r .= '<input type="hidden" name="website_id" value="' . $args['website_id'] . '" />' . "\n";
$r .= '<input type="hidden" name="sample:survey_id" value="' . $args['survey_id'] . '" />' . "\n";
$r .= "<input type=\"hidden\" id=\"record_status\" value=\"C\" />\n";
$r .= data_entry_helper::autocomplete(array('label' => 'Species', 'fieldname' => 'occurrence:taxa_taxon_list_id', 'table' => 'taxa_taxon_list', 'captionField' => 'taxon', 'valueField' => 'id', 'extraParams' => $readAuth + array('taxon_list_id' => $args['taxon_list_id'])));
$r .= data_entry_helper::date_picker(array('label' => 'Date', 'fieldname' => 'sample:date'));
$r .= data_entry_helper::map();
$r .= "<input type=\"submit\" class=\"ui-state-default ui-corner-all\" value=\"Save\" />\n";
$r .= "</form>";
return $r;
}
示例2: get_form
/**
* Return the generated form output.
* @return Form HTML.
*/
public static function get_form($args)
{
data_entry_helper::enable_tabs(array('divId' => 'controls'));
$r = "<form method=\"post\">\n";
// Get authorisation tokens to update and read from the Warehouse.
$r .= data_entry_helper::get_auth($args['website_id'], $args['password']);
$readAuth = data_entry_helper::get_read_auth($args['website_id'], $args['password']);
$r .= "<input type=\"hidden\" id=\"website_id\" name=\"website_id\" value=\"" . $args['website_id'] . "\" />\n";
$r .= "<input type=\"hidden\" id=\"record_status\" name=\"record_status\" value=\"C\" />\n";
$r .= "<div id=\"controls\">\n";
// Create a list which jQuery can parse to create the tabs.
$r .= "<ul>\r\n <li><a href=\"#recorder\"><span>Recorder</span></a></li>\r\n <li><a href=\"#site\"><span>Site</span></a></li>\r\n <li><a href=\"#species_tab_1\"><span>" . $args['tab_title_1'] . "</span></a></li>\n";
if ($args['list_id_2']) {
$r .= "<li><a href=\"#species_tab_2\"><span>" . $args['tab_title_2'] . "</span></a></li>\n";
}
if ($args['list_id_3']) {
$r .= "<li><a href=\"#species_tab_3\"><span>" . $args['tab_title_3'] . "</span></a></li>\n";
}
if ($args['list_id_4']) {
$r .= "<li><a href=\"#species_tab_4\"><span>" . $args['tab_title_4'] . "</span></a></li>\n";
}
$r .= "</ul>\n";
$r .= "<div id=\"recorder\">\n";
$r .= data_entry_helper::select(array('label' => 'Title', 'fieldname' => 'smpAttr:5', 'table' => 'termlists_term', 'captionField' => 'term', 'valueField' => 'id', 'extraParams' => $readAuth + array('termlist_external_key' => 'indicia:titles')));
$r .= data_entry_helper::text_input(array('label' => 'First name', 'fieldname' => 'smpAttr:6'));
$r .= data_entry_helper::text_input(array('label' => 'Last name', 'fieldname' => 'smpAttr:7'));
$r .= data_entry_helper::text_input(array('label' => 'Email', 'fieldname' => 'smpAttr:8'));
// Postcode before address since entering the postcode auto-populates part of the address.
$r .= data_entry_helper::postcode_textbox(array('label' => 'Postcode', 'fieldname' => 'smpAttr:10', 'linkedAddressBoxId' => 'address', 'hiddenFields' => false));
$r .= data_entry_helper::textarea(array('label' => 'Address', 'fieldname' => 'smpAttr:9', 'id' => 'address'));
$r .= "</div>\n";
$r .= "<div id=\"site\">\n";
$r .= data_entry_helper::map();
$r .= data_entry_helper::date_picker(array('label' => 'Date', 'fieldname' => 'sample:date'));
$r .= "</div>\n";
$r .= "<div id=\"species_tab_1\">\n";
$species_list_args = array('label' => 'Species', 'fieldname' => 'occurrence:taxa_taxon_list_id', 'table' => 'taxa_taxon_list', 'captionField' => 'taxon', 'valueField' => 'id', 'columns' => 2, 'extraParams' => $readAuth + array('taxon_list_id' => $args['list_id_1']));
$r .= data_entry_helper::species_checklist($species_list_args);
$r .= "</div>\n";
$r .= "</div>\n";
$r .= "<input type=\"submit\" class=\"ui-state-default ui-corner-all\" value=\"Save\" />\n";
$r .= "</form>";
return $r;
}
示例3: get_form
/**
* Return the generated form output.
* @return Form HTML.
*/
public static function get_form($args)
{
$r = "<form method=\"post\">\n";
// Get authorisation tokens to update and read from the Warehouse.
$r .= data_entry_helper::get_auth($args['website_id'], $args['password']);
$readAuth = data_entry_helper::get_read_auth($args['website_id'], $args['password']);
$r .= "<input type=\"hidden\" id=\"website_id\" name=\"website_id\" value=\"" . $args['website_id'] . "\" />\n";
$r .= "<input type=\"hidden\" id=\"record_status\" name=\"record_status\" value=\"C\" />\n";
$r .= "<div id=\"controls\">\n";
if ($args['tabs']) {
$r .= "<ul>\n <li><a href=\"#species\"><span>Species</span></a></li>\n <li><a href=\"#place\"><span>Place</span></a></li>\n <li><a href=\"#other\"><span>Other Information</span></a></li>\n </ul>\n";
data_entry_helper::enable_tabs(array('divId' => 'controls'));
}
$r .= "<div id=\"species\">\n";
$extraParams = $readAuth + array('taxon_list_id' => $args['list_id']);
if ($args['preferred']) {
$extraParams += array('preferred' => 't');
}
$species_list_args = array('label' => 'Species', 'itemTemplate' => 'select_species', 'fieldname' => 'occurrence:taxa_taxon_list_id', 'table' => 'taxa_taxon_list', 'captionField' => 'taxon', 'valueField' => 'id', 'columns' => 2, 'extraParams' => $extraParams);
// Dynamically generate the species selection control required.
$r .= call_user_func(array('data_entry_helper', $args['species_ctrl']), $species_list_args);
$r .= "</div>\n";
$r .= "<div id=\"place\">\n";
// for this form, use bing and no geoplanet lookup, since then it requires no API keys so is a good
// quick demo of how things work.
$mapOptions = array('presetLayers' => array('bing_aerial'), 'locate' => false);
if ($args['tabs']) {
$mapOptions['tabDiv'] = 'place';
}
$r .= data_entry_helper::map($mapOptions);
$r .= "</div>\n";
$r .= "<div id=\"other\">\n";
$r .= data_entry_helper::date_picker(array('label' => 'Date', 'fieldname' => 'sample:date'));
$r .= data_entry_helper::select(array('label' => 'Survey', 'fieldname' => 'sample:survey_id', 'table' => 'survey', 'captionField' => 'title', 'valueField' => 'id', 'extraParams' => $readAuth));
$r .= data_entry_helper::textarea(array('label' => 'Comment', 'fieldname' => 'sample:comment', 'class' => 'wide'));
$r .= "</div>\n";
$r .= "</div>\n";
$r .= "<input type=\"submit\" class=\"ui-state-default ui-corner-all\" value=\"Save\" />\n";
$r .= "</form>";
return $r;
}
示例4:
<form method="post" enctype="multipart/form-data" >
<?php
// Get authentication information
echo data_entry_helper::get_auth($config['website_id'], $config['password']);
?>
<input type='hidden' id='website_id' name='website_id' value='1' />
<input type='hidden' id='record_status' name='record_status' value='C' />
<input type='hidden' id='id' name='id' value='<?php
echo data_entry_helper::check_default_value('id');
?>
' />
<?php
echo data_entry_helper::autocomplete(array('label' => 'Taxon', 'fieldname' => 'occurrence:taxa_taxon_list_id', 'table' => 'taxa_taxon_list', 'captionField' => 'taxon', 'valueField' => 'id', 'extraParams' => $readAuth));
echo data_entry_helper::date_picker(array('label' => 'Date', 'fieldname' => 'sample:date'));
echo data_entry_helper::map();
echo data_entry_helper::text_input(array('label' => 'Locality Description', 'fieldname' => 'sample:location_name', 'class' => 'wide'));
echo data_entry_helper::select(array('label' => 'Survey', 'fieldname' => 'sample:survey_id', 'table' => 'survey', 'captionField' => 'title', 'valueField' => 'id', 'extraParams' => $readAuth));
?>
<br />
<label for='occurrence:determiner_id:caption'>Determiner:</label>
<?php
echo data_entry_helper::autocomplete('occurrence:determiner_id', 'person', 'caption', 'id', $readAuth);
?>
<br />
<?php
echo data_entry_helper::textarea(array('label' => 'Comment', 'fieldname' => 'sample:comment'));
echo data_entry_helper::image_upload(array('label' => 'Image Upload', 'fieldname' => 'occurrence:image'));
?>
<fieldset>
<legend>Occurrence attributes</legend>