本文整理汇总了PHP中data_entry_helper::loading_block_end方法的典型用法代码示例。如果您正苦于以下问题:PHP data_entry_helper::loading_block_end方法的具体用法?PHP data_entry_helper::loading_block_end怎么用?PHP data_entry_helper::loading_block_end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data_entry_helper
的用法示例。
在下文中一共展示了data_entry_helper::loading_block_end方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_form
//.........这里部分代码省略.........
}
$r .= "</fieldset>\n";
}
// Species tab
$r .= "<fieldset id=\"species\">\n";
if ($args['interface'] == 'one_page') {
$r .= '<legend>' . lang::get('what did you see') . '</legend>';
}
$species_list_args = array('label' => lang::get('Species'), 'fieldname' => 'occurrence:taxa_taxon_list_id', 'table' => 'taxa_taxon_list', 'captionField' => 'taxon', 'valueField' => 'id', 'listId' => $args['species_list_id'], 'columns' => 1, 'parentField' => 'parent_id', 'checkboxCol' => false, 'occAttrs' => array($args['abundance_attr_id']), 'extraParams' => $readAuth + array('view' => 'detail', 'orderby' => 'taxonomic_sort_order'), 'survey_id' => $args['survey_id'], 'header' => false, 'view' => 'detail', 'PHPtaxonLabel' => true);
// Build a nice template to show a picture of each species, with fancybox.
data_entry_helper::add_resource('fancybox');
data_entry_helper::$javascript .= "jQuery('a.fancybox').fancybox();\n";
$indicia_templates['taxon_label'] = 'return \'<div class="taxon-cell">' . '<a href="' . data_entry_helper::$base_url . 'upload/{image_path}" class="fancybox" >' . '<img alt="{taxon}" src="' . data_entry_helper::$base_url . 'upload/med-{image_path}" width="250"/></a>' . '<div>{taxon}</div></div>' . '<div class="taxon-desc"><ul><li>\'.str_replace("\\n", "</li><li>","{description_in_list}").\'</li></ul>' . '<a href="http://www.marine-life.org.uk/northeastcetaceans/?q=\'.
strtolower(str_replace(array(" ", "\\\'"), array("-", ""), "{taxon}")).
\'" target="_blank" class="ui-state-default ui-corner-all indicia-button">' . lang::get('More Info') . '...</a></div>\';';
// Template the taxon label cell
$indicia_templates['taxon_label_cell'] = "\n<td class='scTaxonCell'>{content}</td>";
// Also template the attribute controls to show the label in place.
$indicia_templates['attribute_cell'] = "\n<td class='scOccAttrCell'><label>{label}:</label><br/>{content}</td>";
$r .= data_entry_helper::species_checklist($species_list_args);
if ($args['interface'] == 'wizard') {
$r .= data_entry_helper::wizard_buttons(array('divId' => 'controls', 'page' => $user->uid == 0 ? 'middle' : 'first'));
}
$r .= "</fieldset>";
// --Place tab--
$r .= "<fieldset id=\"place\">\n";
if ($args['interface'] == 'one_page') {
$r .= '<legend>' . lang::get('where was it') . '</legend>';
}
$r .= data_entry_helper::radio_group(array('label' => 'Where were you when you made the sighting?', 'fieldname' => 'smpAttr:' . $args['platform_attr_id'], 'table' => 'termlists_term', 'captionField' => 'term', 'valueField' => 'id', 'extraParams' => $readAuth + array('termlist_id' => $args['platform_termlist_id']), 'sep' => '<br />', 'labelClass' => 'auto', 'class' => 'inline sighting-platform', 'validation' => array('required')));
$r .= '<div id="place_wrapper" class="hidden">';
// Some instructions only visible when entering data from a boat
$r .= '<p class="boat_mode page-notice ui-state-highlight ui-corner-all">' . lang::get('Instructions for when on boat') . '</p>';
// Some instructions only visible when entering data from the shore
$r .= '<p class="shore_mode page-notice ui-state-highlight ui-corner-all">' . lang::get('Instructions for clicking on map') . '</p>';
$r .= '<div class="boat_mode">';
// Add help examples to the lat and long boxes
$indicia_templates['sref_textbox_latlong'] = '<label for="{idLat}">{labelLat}:</label>' . '<input type="text" id="{idLat}" name="{fieldnameLat}" {class} {disabled} value="{default}" /> <p class="helpText">e.g. 55:12.345N</p>' . '<label for="{idLong}">{labelLong}:</label>' . '<input type="text" id="{idLong}" name="{fieldnameLong}" {class} {disabled} value="{default}" /> <p class="helpText">e.g. 0:45.678W</p>' . '<input type="hidden" id="imp-geom" name="{table}:geom" value="{defaultGeom}" />' . '<input type="text" id="{id}" name="{fieldname}" style="display:none" value="{default}" />';
$r .= data_entry_helper::sref_and_system(array('systems' => array(4326 => lang::get('Latitude, Longitude')), 'splitLatLong' => true, 'helpText' => lang::get('Instructions for latlong')));
$r .= '</div>';
// Initially, we hide the map. Only show it when the user selects the sighting was from the shore,
// as a click on the map for boat recordings will not be accurate.
$r .= '<div class="shore_mode">';
$options = iform_map_get_map_options($args, $readAuth);
$olOptions = iform_map_get_ol_options($args);
$options['maxZoom'] = 9;
// Switch to degrees and decimal minutes for lat long.
$options['latLongFormat'] = 'DM';
$r .= data_entry_helper::map_panel($options, $olOptions);
// Now, add some JavaScript to show or hide the map. Show it for when the sighting was from the shore.
// Hide it for boat based sightings as we want a GPS coordinate in this case. The JavaScript looks for the
// checked radio button to see the value
data_entry_helper::$javascript .= 'jQuery(".sighting-platform input").click(
function() {
var platformId = jQuery("input[name=smpAttr\\\\:' . $args['platform_attr_id'] . ']:checked").val();
if (platformId == ' . $args['platform_mapped_term_id'] . ') {
jQuery("#place_wrapper").removeClass("hidden");
jQuery(".shore_mode").removeClass("hidden");
jQuery(".boat_mode").addClass("hidden");
} else {
jQuery("#place_wrapper").removeClass("hidden");
jQuery(".shore_mode").addClass("hidden");
jQuery(".boat_mode").removeClass("hidden");
}
}
);' . "\n";
// Force existing setting of the radio buttons to reload when showign page after validation failure
data_entry_helper::$onload_javascript .= '
jQuery("input[name=smpAttr\\\\:' . $args['platform_attr_id'] . ']:checked").trigger("click");
';
$r .= '</div></div>';
if ($args['interface'] == 'wizard') {
$r .= data_entry_helper::wizard_buttons(array('divId' => 'controls'));
}
$r .= '</fieldset>';
// --Other information tab--
$r .= "<fieldset id=\"other\">\n";
// Get authorisation tokens to update and read from the Warehouse.
$r .= data_entry_helper::get_auth($args['website_id'], $args['password']);
$r .= "<input type=\"hidden\" name=\"website_id\" value=\"" . $args['website_id'] . "\" />\n";
$r .= "<input type=\"hidden\" name=\"survey_id\" value=\"" . $args['survey_id'] . "\" />\n";
$r .= "<input type=\"hidden\" name=\"occurrence:record_status\" value=\"C\" />\n";
if ($args['interface'] == 'one_page') {
$r .= '<legend>' . lang::get('other information') . '</legend>';
}
$r .= data_entry_helper::date_picker(array('label' => lang::get('Sighting Date'), 'fieldname' => 'sample:date'));
$indicia_templates['timeFormat'] = '<label>hh:mm</label><br/>';
$r .= data_entry_helper::text_input(array('label' => lang::get('Sighting Time'), 'fieldname' => 'smpAttr:' . $args['sample_time_attr_id'], 'class' => 'control-width-1', 'suffixTemplate' => 'timeFormat'));
$r .= data_entry_helper::textarea(array('label' => lang::get('Any other information'), 'fieldname' => 'sample:comment', 'class' => 'control-width-6', 'helpText' => lang::get('Instructions for any other info')));
$r .= '<div class="footer">' . data_entry_helper::checkbox(array('label' => lang::get('happy for contact'), 'labelClass' => 'auto', 'fieldname' => 'smpAttr:' . $args['contact_attr_id'])) . '</div>';
if ($args['interface'] == 'wizard') {
$r .= data_entry_helper::wizard_buttons(array('divId' => 'controls', 'page' => 'last'));
} else {
$r .= "<input type=\"submit\" class=\"ui-state-default ui-corner-all\" value=\"Save\" />\n";
}
$r .= "</fieldset></div>";
$r .= "</form>";
$r .= data_entry_helper::loading_block_end();
return $r;
}
示例2: array
<?php
// Get authorisation tokens to update and read from the Warehouse.
$auth = data_entry_helper::get_read_write_auth($config['website_id'], $config['password']);
echo $auth['write'];
$readAuth = $auth['read'];
?>
<input type='hidden' id='website_id' name='website_id' value='<?php
echo $config['website_id'];
?>
' />
<input type='hidden' id='record_status' name='record_status' value='C' />
<?php
echo 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' => $config['species_checklist_taxon_list'])));
echo data_entry_helper::date_picker(array('label' => 'Date', 'fieldname' => 'sample:date'));
echo data_entry_helper::file_box(array('caption' => 'Upload your photos', 'resizeWidth' => 1024, 'resizeHeight' => 768, 'table' => 'occurrence_image', 'runtimes' => array('html4')));
echo data_entry_helper::sref_and_system(array('label' => 'Grid ref'));
echo data_entry_helper::select(array('label' => 'Survey', 'fieldname' => 'sample:survey_id', 'table' => 'survey', 'captionField' => 'title', 'valueField' => 'id', 'extraParams' => $readAuth));
echo data_entry_helper::textarea(array('label' => 'Comment', 'fieldname' => 'sample:comment', 'class' => 'wide'));
?>
<input type="submit" class="ui-state-default ui-corner-all" value="Save" />
</form>
<?php
echo data_entry_helper::loading_block_end();
echo data_entry_helper::dump_remaining_errors();
echo data_entry_helper::dump_javascript();
?>
</div>
</body>
</html>