当前位置: 首页>>代码示例>>PHP>>正文


PHP data_entry_helper::text_input方法代码示例

本文整理汇总了PHP中data_entry_helper::text_input方法的典型用法代码示例。如果您正苦于以下问题:PHP data_entry_helper::text_input方法的具体用法?PHP data_entry_helper::text_input怎么用?PHP data_entry_helper::text_input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在data_entry_helper的用法示例。


在下文中一共展示了data_entry_helper::text_input方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_form

 /**
  * Return the generated form output.
  * @param array $args List of parameter values passed through to the form depending on how the form has been configured.
  * This array always contains a value for language.
  * @param object $node The Drupal node object.
  * @param array $response When this form is reloading after saving a submission, contains the response from the service call.
  * Note this does not apply when redirecting (in this case the details of the saved object are in the $_GET data).
  * @return Form HTML.
  */
 public static function get_form($args, $node, $response = null)
 {
     $reloadPath = self::get_reload_path();
     $auth = data_entry_helper::get_read_write_auth($args['website_id'], $args['password']);
     $r = "<form method=\"post\" id=\"entry_form\" action=\"{$reloadPath}\">\n";
     $r .= $auth['write'];
     data_entry_helper::$entity_to_load = array();
     if (!empty($_GET['termlists_term_id'])) {
         data_entry_helper::load_existing_record($auth['read'], 'termlists_term', $_GET['termlists_term_id']);
         // map fields to their appropriate supermodels
         data_entry_helper::$entity_to_load['term:term'] = data_entry_helper::$entity_to_load['termlists_term:term'];
         data_entry_helper::$entity_to_load['term:id'] = data_entry_helper::$entity_to_load['termlists_term:term_id'];
         data_entry_helper::$entity_to_load['meaning:id'] = data_entry_helper::$entity_to_load['termlists_term:meaning_id'];
         if (function_exists('hostsite_set_page_title')) {
             hostsite_set_page_title(lang::get('Edit {1}', data_entry_helper::$entity_to_load['term:term']));
         }
     }
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'website_id', 'default' => $args['website_id']));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'termlists_term:id'));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'termlists_term:termlist_id', 'default' => $args['termlist_id']));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'termlists_term:preferred', 'default' => 't'));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'term:id'));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'term:language_id', 'default' => $args['language_id']));
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'meaning:id'));
     // request automatic JS validation
     data_entry_helper::enable_validation('entry_form');
     $r .= data_entry_helper::text_input(array('label' => lang::get('Term'), 'fieldname' => 'term:term', 'helpText' => lang::get('Please provide the term'), 'validation' => array('required'), 'class' => 'control-width-5'));
     $r .= "<input type=\"submit\" name=\"form-submit\" id=\"delete\" value=\"Delete\" />\n";
     $r .= "<input type=\"submit\" name=\"form-submit\" value=\"Save\" />\n";
     $r .= '<form>';
     self::set_breadcrumb($args);
     return $r;
 }
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:42,代码来源:term.php

示例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;
 }
开发者ID:joewoodhouse,项目名称:client_helpers,代码行数:48,代码来源:site_survey_recording_form.php

示例3: get_control_locationcode

 protected static function get_control_locationcode($auth, $args, $tabalias, $options)
 {
     return data_entry_helper::text_input(array_merge(array('label' => lang::get('LANG_Location_Code'), 'fieldname' => 'location:code', 'class' => 'control-width-5'), $options));
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:4,代码来源:dynamic_location.php

示例4: array

echo data_entry_helper::text_input(array('label' => 'Period Start', 'fieldname' => 'summariser_definition:period_start', 'default' => html::initial_value($values, 'summariser_definition:period_start'), 'helpText' => 'Define the first day of each period. There are 2 options.<br/>' . "&nbsp;&nbsp;<strong>weekday=&lt;n&gt;</strong> where <strong>&lt;n&gt;</strong> is a number between 1 (for Monday) and 7 (for Sunday).<br/>" . "&nbsp;&nbsp;<strong>date=MMM/DD</strong> where <strong>MMM/DD</strong> is a month/day combination: e.g. choosing Apr-1 will start each week on the day of the week on which the 1st of April occurs.<br/>", 'validation' => 'required'));
echo data_entry_helper::text_input(array('label' => 'Period One Contains', 'fieldname' => 'summariser_definition:period_one_contains', 'default' => html::initial_value($values, 'summariser_definition:period_one_contains'), 'helpText' => 'Calculate week one as the week containing this date: value should be in the format <strong>MMM/DD</strong>, which is a month/day combination: e.g. choosing Apr-1 will mean week one contains the date of the 1st of April. Default is the Jan-01', 'validation' => 'required'));
echo data_entry_helper::select(array('label' => 'Attribute to Sum', 'fieldname' => 'summariser_definition:occurrence_attribute_id', 'lookupValues' => $other_data['occAttrs'], 'default' => html::initial_value($values, 'summariser_definition:occurrence_attribute_id'), 'helpText' => 'The occurrence attribute which is used as the count associated with the occurrence. If not provided then each occurrence has a count of one.'));
echo data_entry_helper::checkbox(array('label' => 'Calculate Estimates', 'fieldname' => 'summariser_definition:calculate_estimates', 'default' => html::initial_value($values, 'summariser_definition:calculate_estimates')));
?>
<fieldset><legend>Data Handling</legend>
<?php 
echo data_entry_helper::select(array('label' => 'Summary Data Combination method', 'fieldname' => 'summariser_definition:data_combination_method', 'lookupValues' => array('A' => 'Add all occurrences together', 'M' => 'Choose the value from the sample with the greatest count', 'L' => 'Average over all samples for that location during that period'), 'default' => html::initial_value($values, 'summariser_definition:data_combination_method'), 'helpText' => 'When data is aggregated for a location/period combination, this determines how.'));
echo data_entry_helper::select(array('label' => 'Data Rounding', 'fieldname' => 'summariser_definition:data_rounding_method', 'lookupValues' => array('N' => 'To the nearest integer, .5 rounds up', 'U' => 'Up: To the integer greater than or equal to the value', 'D' => 'Down: To the integer less than or equal to the value', 'X' => 'None (may result in non-integer values)'), 'default' => html::initial_value($values, 'summariser_definition:data_rounding_method'), 'helpText' => 'When data is averaged, this determines what rounding is carried out. Note that anything between 0 and 1 will be rounded up to 1.'));
?>
</fieldset><fieldset><legend>Estimate Generation</legend>
<p>Only one interpolation option (linear) available at the moment.</p>
<?php 
// Only one interpolation option at the moment. This may change in future. Keep hidden control until that point.
// 'L' = 'Linear interpolation'
echo data_entry_helper::hidden_text(array('fieldname' => 'summariser_definition:interpolation', 'default' => 'L'));
echo data_entry_helper::text_input(array('label' => 'Season Limits', 'fieldname' => 'summariser_definition:season_limits', 'default' => html::initial_value($values, 'summariser_definition:season_limits'), 'helpText' => 'This is a comma separated pair of the week numbers for the start and end of the season. When provided, and data is not entered for these weeks, the value is taken as zero, irrespective of the First/Last value processing. First/Last value processing is not carried out outwith these weeks.'));
echo data_entry_helper::select(array('label' => 'First Value Processing', 'fieldname' => 'summariser_definition:first_value', 'lookupValues' => array('X' => 'No special processing', 'H' => 'The entry for the previous week is half the entered value'), 'default' => html::initial_value($values, 'summariser_definition:first_value'), 'helpText' => 'When encountering the first entered value, this determines what happens.'));
echo data_entry_helper::select(array('label' => 'Last Value Processing', 'fieldname' => 'summariser_definition:last_value', 'lookupValues' => array('X' => 'No special processing', 'H' => 'The entry for the next week is half the entered value'), 'default' => html::initial_value($values, 'summariser_definition:last_value'), 'helpText' => 'When encountering the last entered value, this determines what happens.'));
?>
</fieldset>
<?php 
echo $metadata;
echo html::form_buttons($existing, false, false);
data_entry_helper::$dumped_resources[] = 'jquery';
data_entry_helper::$dumped_resources[] = 'jquery_ui';
data_entry_helper::$dumped_resources[] = 'fancybox';
echo data_entry_helper::dump_javascript();
?>
</fieldset>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:summariser_definition_edit.php

示例5: iform_mnhnl_recordernamesControl

function iform_mnhnl_recordernamesControl($node, $auth, $args, $tabalias, $options)
{
    $values = array();
    $userlist = array();
    $results = db_query('SELECT uid, name FROM {users}');
    while ($result = db_fetch_object($results)) {
        $account = user_load($result->uid);
        if ($account->uid != 1 && user_access($args['permission_name'], $account)) {
            $userlist[$result->name] = $result->name;
        }
    }
    if (isset(data_entry_helper::$entity_to_load['sample:recorder_names'])) {
        if (!is_array(data_entry_helper::$entity_to_load['sample:recorder_names'])) {
            $values = explode("\r\n", data_entry_helper::$entity_to_load['sample:recorder_names']);
        } else {
            $values = data_entry_helper::$entity_to_load['sample:recorder_names'];
        }
    }
    foreach ($values as $value) {
        // ensure all existing entries are in list.
        $userlist[$value] = $value;
    }
    if (isset($options['disabled']) && $options['disabled']) {
        return data_entry_helper::text_input(array_merge(array('id' => 'sample:recorder_names', 'fieldname' => 'sample:recorder_names[]', 'label' => lang::get('Recorder names'), 'default' => implode(', ', $values)), $options));
    }
    $r = data_entry_helper::listbox(array_merge(array('id' => 'sample:recorder_names', 'fieldname' => 'sample:recorder_names[]', 'label' => lang::get('Recorder names'), 'size' => 6, 'multiselect' => true, 'default' => $values, 'lookupValues' => $userlist, 'validation' => array('required')), $options));
    return $r . "<span id='RecorderInstructions'>" . lang::get('LANG_RecorderInstructions') . "</span><br />";
}
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:28,代码来源:mnhnl_common.php

示例6: prebuilt_form_picker

 /**
  * Outputs a pair of linked selects, for picking a prebuilt form from the library. The first select is for picking a form 
  * category and the second select is populated by AJAX for picking the actual form.
  * @param array $options Options array with the following possibilities:<ul>
  * <li><b>form</b><br/>
  * Optional. The name of the form to select as a default value.</li>
  * <li><b>includeOutputDiv</b><br/>
  * Set to true to generate a div after the controls which will receive the form parameter
  * controls when a form is selected.</li>
  * <li><b>needWebsiteInputs</b><br/>
  * Defaults to false. In this state, the website ID and password controls are not displayed
  * when both the values are already specified, though hidden inputs are put into the form.
  * When set to true, the website ID and password input controls are always included in the form output.
  * </li>
  * </ul>
  */
 public static function prebuilt_form_picker($options)
 {
     require_once 'data_entry_helper.php';
     form_helper::add_resource('jquery_ui');
     $path = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . self::relative_client_helper_path();
     $r = '';
     if (!($dir = opendir($path . 'prebuilt_forms/'))) {
         throw new Exception('Cannot open path to prebuilt form library.');
     }
     while (false !== ($file = readdir($dir))) {
         $parts = explode('.', $file);
         if ($file != "." && $file != ".." && strtolower($parts[count($parts) - 1]) == 'php') {
             require_once $path . 'prebuilt_forms/' . $file;
             $file_tokens = explode('.', $file);
             ob_start();
             if (is_callable(array('iform_' . $file_tokens[0], 'get_' . $file_tokens[0] . '_definition'))) {
                 $definition = call_user_func(array('iform_' . $file_tokens[0], 'get_' . $file_tokens[0] . '_definition'));
                 $definition['title'] = lang::get($definition['title']);
                 $forms[$definition['category']][$file_tokens[0]] = $definition;
                 if (isset($options['form']) && $file_tokens[0] == $options['form']) {
                     $defaultCategory = $definition['category'];
                 }
             } elseif (is_callable(array('iform_' . $file_tokens[0], 'get_title'))) {
                 $title = call_user_func(array('iform_' . $file_tokens[0], 'get_title'));
                 $forms['Miscellaneous'][$file_tokens[0]] = array('title' => $title);
                 if (isset($options['form']) && $file_tokens[0] == $options['form']) {
                     $defaultCategory = 'Miscellaneous';
                 }
             }
             ob_end_clean();
         }
     }
     if (isset($defaultCategory)) {
         $availableForms = array();
         foreach ($forms[$defaultCategory] as $form => $def) {
             $availableForms[$form] = $def['title'];
         }
     } else {
         $defaultCategory = '';
         $availableForms = array('' => '&lt;Please select a category first&gt;');
     }
     closedir($dir);
     // makes an assoc array from the categories.
     $categories = array_merge(array('' => '&lt;Please select&gt;'), array_combine(array_keys($forms), array_keys($forms)));
     // translate categories
     foreach ($categories as $key => &$value) {
         $value = lang::get($value);
     }
     asort($categories);
     if (isset($options['needWebsiteInputs']) && !$options['needWebsiteInputs'] && !empty($options['website_id']) && !empty($options['password'])) {
         $r .= '<input type="hidden" id="website_id" name="website_id" value="' . $options['website_id'] . '">';
         $r .= '<input type="hidden" id="password" name="password" value="' . $options['password'] . '">';
     } else {
         $r .= data_entry_helper::text_input(array('label' => lang::get('Website ID'), 'fieldname' => 'website_id', 'helpText' => lang::get('Enter the ID of the website record on the Warehouse you are using.'), 'default' => isset($options['website_id']) ? $options['website_id'] : ''));
         $r .= data_entry_helper::text_input(array('label' => lang::get('Password'), 'fieldname' => 'password', 'helpText' => lang::get('Enter the password for the website record on the Warehouse you are using.'), 'default' => isset($options['password']) ? $options['password'] : ''));
     }
     $r .= data_entry_helper::select(array('id' => 'form-category-picker', 'label' => lang::get('Select Form Category'), 'helpText' => lang::get('Select the form category pick a form from.'), 'lookupValues' => $categories, 'default' => $defaultCategory));
     $r .= data_entry_helper::select(array('id' => 'form-picker', 'fieldname' => 'iform', 'label' => lang::get('Select Form'), 'helpText' => lang::get('Select the Indicia form you want to use.'), 'lookupValues' => $availableForms, 'default' => isset($options['form']) ? $options['form'] : ''));
     // div for the form instructions
     $details = '';
     if (isset($options['form'])) {
         if (isset($forms[$defaultCategory][$options['form']]['description'])) {
             $details .= '<p>' . $forms[$defaultCategory][$options['form']]['description'] . '</p>';
         }
         if (isset($forms[$defaultCategory][$options['form']]['helpLink'])) {
             $details .= '<p><a href="' . $forms[$defaultCategory][$options['form']]['helpLink'] . '">Find out more...</a></p>';
         }
         if ($details !== '') {
             $details = "<div class=\"ui-state-highlight ui-corner-all page-notice\">{$details}</div>";
         }
     }
     $r .= "<div id=\"form-def\">{$details}</div>\n";
     $r .= '<input type="button" value="' . lang::get('Load Settings Form') . '" id="load-params" disabled="disabled" />';
     if (isset($options['includeOutputDivs']) && $options['includeOutputDivs']) {
         $r .= '<div id="form-params"></div>';
     }
     self::add_form_picker_js($forms);
     return $r;
 }
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:95,代码来源:form_helper.php

示例7: get_control_locationname

 /** 
  * Get the location name control.
  */
 private static function get_control_locationname($auth, $args, $tabalias, $options)
 {
     return data_entry_helper::text_input(array_merge(array('label' => lang::get('LANG_Location_Name'), 'fieldname' => 'sample:location_name', 'class' => 'control-width-5'), $options));
 }
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:7,代码来源:mnhnl_dynamic_1.php

示例8: get_form


//.........这里部分代码省略.........
        $first = true;
        foreach ($taxa as $taxon) {
            data_entry_helper::$javascript .= ($first ? '' : ',') . "{id: " . $taxon['id'] . ", taxon: \"" . htmlSpecialChars($taxon['taxon']) . "\"}\n";
            $first = false;
        }
        data_entry_helper::$javascript .= "];";
        // TBD Breadcrumb
        $r .= '<h1 id="poll-banner">' . lang::get('LANG_Main_Title') . '</h1>
<div id="refresh-message" style="display:none" ><p>' . lang::get('LANG_Please_Refresh_Page') . '</p></div>
<div id="filter" class="ui-accordion ui-widget ui-helper-reset">
	<div id="filter-header" class="ui-accordion-header ui-helper-reset ui-state-active ui-accordion-content-active ui-corner-top">
	  	<div id="results-collections-title">
	  		<span>' . lang::get('LANG_Filter_Title') . '</span>
    	</div>
	</div>';
        if (user_access('IForm n' . $node->nid . ' save filter')) {
            $r .= '<div id="filter-save" class="ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active"><div id="gallery-filter-retrieve-wrapper">
<div id="gallery-filter-retrieve-image"><img
src="/' . path_to_theme() . '/css/gallery_filter.png" 
alt="Mes filtres" title="Mes filtres" /></div> <div id="gallery-filter-retrieve"></div>
</div>
   <input value="' . lang::get('LANG_Enter_Filter_Name') . '" type="text" id="gallery-filter-save-name" /><input value="' . lang::get('LANG_Save_Filter_Button') . '" type="button" id="gallery-filter-save-button" /></div>';
        }
        $r .= '<div id="filter-spec" class="ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active">
	  <div class="ui-accordion ui-widget ui-helper-reset">
		<div id="name-filter-header" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
	  		<div id="fold-name-button" class="ui-state-default ui-corner-all fold-button fold-button-folded">&nbsp;</div>
	  		<div id="reset-name-button" class="ui-state-default ui-corner-all reset-button">' . lang::get('LANG_Reset_Filter') . '</div>
	  		<div id="general-filter-title">
		  		<span>' . lang::get('LANG_Name_Filter_Title') . '</span>
      		</div>
		</div>
	    <div id="name-filter-body" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-all">
	        ' . data_entry_helper::text_input(array('label' => lang::get('LANG_Name'), 'fieldname' => 'username', 'suffixTemplate' => 'nosuffix')) . '
  		</div>
		<div id="date-filter-header" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
	  		<div id="fold-date-button" class="ui-state-default ui-corner-all fold-button fold-button-folded">&nbsp;</div>
	  		<div id="reset-date-button" class="ui-state-default ui-corner-all reset-button">' . lang::get('LANG_Reset_Filter') . '</div>
	  		<div id="general-filter-title">
		  		<span>' . lang::get('LANG_Date_Filter_Title') . '</span>
      		</div>
		</div>
	    <div id="date-filter-body" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-all">
        	<label for="start_date" >' . lang::get('LANG_Created_Between') . ':</label>
  			<input type="text" size="10" id="start_date" name="start_date" value="' . lang::get('click here') . '" />
  			<input type="hidden" id="real_start_date" name="real_start_date" />
  			<label for="end_date" >' . lang::get('LANG_And') . ':</label>
  			<input type="text" size="10" id="end_date" name="end_date" value="' . lang::get('click here') . '" />
  			<input type="hidden" id="real_end_date" name="real_end_date" />
  		</div>
  		<div id="flower-filter-header" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
	  		<div id="fold-flower-button" class="ui-state-default ui-corner-all fold-button fold-button-folded">&nbsp;</div>
	  		<div id="reset-flower-button" class="ui-state-default ui-corner-all reset-button">' . lang::get('LANG_Reset_Filter') . '</div>
	  		<div id="flower-filter-title">
		  		<span>' . lang::get('LANG_Flower_Filter_Title') . '</span>
      		</div>
		</div>
		<div id="flower-filter-body" class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-all">
		  ' . data_entry_helper::select($flower_ctrl_args) . '
 		  <input type="text" name="flower:taxon_extra_info" class="taxon-info" value="' . lang::get('LANG_More_Precise') . '"
	 		onclick="if(this.value==\'' . lang::get('LANG_More_Precise') . '\'){this.value=\'\'; this.style.color=\'#000\'}"  
            onblur="if(this.value==\'\'){this.value=\'' . lang::get('LANG_More_Precise') . '\'; this.style.color=\'#555\'}" />
		  ' . str_replace("\n", "", data_entry_helper::outputAttribute($occurrence_attributes[$args['flower_type_attr_id']], $defAttrOptions)) . str_replace("\n", "", data_entry_helper::outputAttribute($location_attributes[$args['habitat_attr_id']], $defAttrOptions)) . '
    	</div>
		<div id="insect-filter-header" class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
	  		<div id="fold-insect-button" class="ui-state-default ui-corner-all fold-button fold-button-folded">&nbsp;</div>
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:67,代码来源:pollenator_gallery.php

示例9: get_control_latlongs

 /**
  * A set of input controls for defining the transect.
  */
 protected static function get_control_latlongs($auth, $args, $tabAlias, $options)
 {
     $r = data_entry_helper::text_input(array('label' => 'Transect start', 'fieldname' => 'gpsstart', 'helpText' => lang::get('Transect start, GPS coordinate (decimal WGS84 latitude and longitude). Click once on the map to set.')));
     $r .= data_entry_helper::text_input(array('label' => 'Transect end', 'fieldname' => 'gpsend', 'helpText' => lang::get('Transect end, GPS coordinate (decimal WGS84 latitude and longitude). Click again on the map to set.')));
     return $r;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:9,代码来源:big_sea_survey.php

示例10: get_form


//.........这里部分代码省略.........
        $insect_ctrl_args = array('label' => lang::get('LANG_Insect_Species'), 'fieldname' => 'insect:taxa_taxon_list_id', 'table' => 'taxa_taxon_list', 'captionField' => 'taxon', 'valueField' => 'id', 'columns' => 2, 'blankText' => lang::get('LANG_Choose_Taxon'), 'extraParams' => $readAuth + array('taxon_list_id' => $args['insect_list_id'], 'orderby' => 'taxon'), 'suffixTemplate' => 'nosuffix');
        $focus_insect_ctrl_args = $insect_ctrl_args;
        $focus_insect_ctrl_args['fieldname'] = 'determination:taxa_taxon_list_id';
        $options = iform_map_get_map_options($args, $readAuth);
        $olOptions = iform_map_get_ol_options($args);
        // The maps internal projection will be left at its default of 900913.
        $options['initialFeatureWkt'] = null;
        $options['proxy'] = '';
        $options['suffixTemplate'] = 'nosuffix';
        $options2 = $options;
        $options['searchLayer'] = 'true';
        $options['editLayer'] = 'false';
        $options['layers'] = array('polygonLayer');
        $options2['divId'] = "map2";
        $options2['layers'] = array('locationLayer');
        // TBD Breadcrumb
        $r .= '
<div id="filter" class="ui-accordion ui-widget ui-helper-reset">
	<div id="filter-header" class="ui-accordion-header ui-helper-reset ui-state-active ui-accordion-content-active ui-corner-top">
	  	<div id="results-collections-title">
	  		<span>' . lang::get('LANG_Filter_Title') . '</span>
    	</div>
	</div>
	<div id="filter-spec" class="ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active">
	  <div class="ui-accordion ui-widget ui-helper-reset">
		<div id="name-filter-header" class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-all">
	  		<div id="fold-name-button" class="ui-state-default ui-corner-all fold-button">&nbsp;</div>
	  		<div id="reset-name-button" class="ui-state-default ui-corner-all reset-button">' . lang::get('LANG_Reset_Filter') . '</div>
	  		<div id="general-filter-title">
		  		<span>' . lang::get('LANG_Name_Filter_Title') . '</span>
      		</div>
		</div>
	    <div id="name-filter-body" class="ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active ui-corner-all">
	        ' . data_entry_helper::text_input(array('label' => lang::get('LANG_Name'), 'fieldname' => 'username', 'suffixTemplate' => 'nosuffix')) . '
  		</div>
		<div id="date-filter-header" class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-all">
	  		<div id="fold-date-button" class="ui-state-default ui-corner-all fold-button">&nbsp;</div>
	  		<div id="reset-date-button" class="ui-state-default ui-corner-all reset-button">' . lang::get('LANG_Reset_Filter') . '</div>
	  		<div id="general-filter-title">
		  		<span>' . lang::get('LANG_Date_Filter_Title') . '</span>
      		</div>
		</div>
	    <div id="date-filter-body" class="ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active ui-corner-all">
        	<label for="start_date" >' . lang::get('LANG_Created_Between') . ':</label>
  			<input type="text" size="10" id="start_date" name="start_date" value="' . lang::get('click here') . '" />
       		<label for="start_date" >' . lang::get('LANG_And') . ':</label>
  			<input type="text" size="10" id="end_date" name="end_date" value="' . lang::get('click here') . '" />
  		</div>
  		<div id="flower-filter-header" class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-all">
	  		<div id="fold-flower-button" class="ui-state-default ui-corner-all fold-button">&nbsp;</div>
	  		<div id="reset-flower-button" class="ui-state-default ui-corner-all reset-button">' . lang::get('LANG_Reset_Filter') . '</div>
	  		<div id="flower-filter-title">
		  		<span>' . lang::get('LANG_Flower_Filter_Title') . '</span>
      		</div>
		</div>
		<div id="flower-filter-body" class="ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active ui-corner-all">
		  ' . data_entry_helper::select($flower_ctrl_args) . data_entry_helper::outputAttribute($occurrence_attributes[$args['flower_type_attr_id']], $defAttrOptions) . data_entry_helper::outputAttribute($location_attributes[$args['habitat_attr_id']], $defAttrOptions) . '
    	</div>
		<div id="insect-filter-header" class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-all">
	  		<div id="fold-insect-button" class="ui-state-default ui-corner-all fold-button">&nbsp;</div>
			<div id="reset-insect-button" class="ui-state-default ui-corner-all reset-button">' . lang::get('LANG_Reset_Filter') . '</div>
	  		<div id="insect-filter-title">
		  		<span>' . lang::get('LANG_Insect_Filter_Title') . '</span>
      		</div>
		</div>
		<div id="insect-filter-body" class="ui-accordion-content ui-helper-reset ui-widget-content ui-accordion-content-active ui-corner-all">
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:67,代码来源:pollenator_gallery.php

示例11: array

    ?>
  <input type="hidden" name="milestone:id" value="<?php 
    echo html::initial_value($values, 'milestone:id');
    ?>
" />
<?php 
    echo $metadata;
}
echo data_entry_helper::hidden_text(array('fieldname' => 'milestone:id', 'default' => html::initial_value($values, 'milestone:id')));
echo data_entry_helper::hidden_text(array('fieldname' => 'website_id', 'default' => html::initial_value($values, 'milestone:website_id')));
echo data_entry_helper::text_input(array('label' => 'Title', 'fieldname' => 'milestone:title', 'class' => 'control-width-4', 'default' => html::initial_value($values, 'milestone:title')));
echo data_entry_helper::select(array('label' => 'Count what?', 'fieldname' => 'milestone:entity', 'lookupValues' => array('T' => 'Species or taxa', 'O' => 'Records', 'M' => 'Media/photos'), 'default' => html::initial_value($values, 'milestone:entity'), 'helpText' => 'Are you targetting a total count of species, records or media/photos for this milestone?'));
echo data_entry_helper::text_input(array('label' => 'Count', 'fieldname' => 'milestone:count', 'class' => 'control-width-2', 'default' => html::initial_value($values, 'milestone:count'), 'helpText' => 'What is the target number that must be reached to hit the milestone?'));
echo data_entry_helper::text_input(array('label' => 'Group ID', 'fieldname' => 'milestone:group_id', 'class' => 'control-width-2', 'default' => html::initial_value($values, 'milestone:group_id'), 'helpText' => 'Optional ID of the recording group associated with the milestone, only users that are members of this group will receive the milestone award.'));
echo data_entry_helper::textarea(array('label' => 'Success message', 'fieldname' => 'milestone:success_message', 'class' => 'control-width-6', 'default' => html::initial_value($values, 'milestone:success_message'), 'helpText' => 'This message will be sent to the user on reaching the milestone as a notification.'));
echo data_entry_helper::text_input(array('label' => 'Awarded by', 'fieldname' => 'milestone:awarded_by', 'class' => 'control-width-6', 'default' => html::initial_value($values, 'milestone:awarded_by'), 'helpText' => 'Which organisation is awarding the milestone? This will appear in the from field for the notification sent to the recorder.'));
//The filter title is actually generated using the milestone title we enter. There are issues with using the built-in validator to detect duplicate titles because the filter supermodel is validated
//first. The filter requires a unique title/sharing/created_by_id option that isn't included in the model, the issue is only
//detected once the system tries to add the filter to the database, this will fail with a general error without even getting as far as doing the milestone model's
//title duplciate detection.
//So to fix this, collect the existing filters from the database so we can compare the titles with the one we create and then
//do the validation manually.
$readAuth = data_entry_helper::get_read_auth(0 - $_SESSION['auth_user']->id, kohana::config('indicia.private_key'));
$existingFilterData = data_entry_helper::get_population_data(array('table' => 'filter', 'extraParams' => $readAuth, 'nocache' => true));
//When we save a milestone when we need to automatically set the filter title as there isn't a separate field
//to fill this in.
//Also hide the "who" filter as we don't need this for milestones as they can apply to all users
//Also manually do the unique milestone/filter title validation (see note above)
data_entry_helper::$javascript .= "\nvar existingFilterData=" . json_encode($existingFilterData) . ";  \n\$('#pane-filter_who').hide();\n\$('#milestones-form').submit(function() {\n  \$('#filter-title-val').val('" . 'Filter for milestone' . " ' + \$('#milestone\\\\:title').val());\n  for (var i = 0; i<existingFilterData.length;i++) {\n    //Note we must allow a duplicate title in the situaton where the duplicate title is for the already existing item\n    if (existingFilterData[i]['title']==\$('#filter-title-val').val() && existingFilterData[i]['id']!=\$('#filter\\\\:id').val()) {\n      alert('The filter title is generated from the milestone title you have entered and would cause a duplicate filter title, please choose a different title');\n      return false;\n    }\n  }\n  \$('#filter-def-val').val(JSON.stringify(indiciaData.filter.def));\n});\n";
$readAuth = data_entry_helper::get_read_auth(0 - $_SESSION['auth_user']->id, kohana::config('indicia.private_key'));
$filterPanelHTML = '<h3>Specify the filter used to define which records count</h3>';
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:milestone_edit.php

示例12: get_params_form_control


//.........这里部分代码省略.........
     if (isset($options['defaults'][$key])) {
         $ctrlOptions['default'] = $options['defaults'][$key];
     } elseif (isset($info['default'])) {
         $ctrlOptions['default'] = $info['default'];
     }
     if ($info['datatype'] == 'idlist') {
         // idlists are not for human input so use a hidden.
         $r .= "<input type=\"hidden\" name=\"{$fieldPrefix}{$key}\" value=\"" . self::get_preset_param($options, $key) . "\" class=\"" . $fieldPrefix . "idlist-param\" />\n";
     } elseif (isset($options['extraParams']) && array_key_exists($key, $options['extraParams'])) {
         $r .= "<input type=\"hidden\" name=\"{$fieldPrefix}{$key}\" value=\"" . self::get_preset_param($options, $key) . "\" />\n";
     } elseif ($info['datatype'] == 'lookup' && isset($info['population_call'])) {
         // population call is colon separated, of the form direct|report:table|view|report:idField:captionField:params(key=value,key=value,...)
         $popOpts = explode(':', $info['population_call']);
         $extras = array();
         // if there are any extra parameters on the report lookup call, apply them
         if (count($popOpts) >= 5) {
             // because any extra params might contain colons, any colons from item 5 onwards are considered part of the extra params. So we
             // have to take the remaining items and re-implode them, then split them by commas instead. E.g. population call could be set to
             // direct:term:id:term:term=a:b - in this case option 5 (term=a:b) is not to be split by colons.
             $extraItems = explode(',', implode(':', array_slice($popOpts, 4)));
             foreach ($extraItems as $extraItem) {
                 $extraItem = explode('=', $extraItem);
                 $extras[$extraItem[0]] = $extraItem[1];
             }
         }
         // allow local page configuration to apply extra restrictions on the return values: e.g. only return some location_types from the termlist
         if (isset($options['param_lookup_extras']) && isset($options['param_lookup_extras'][$key])) {
             foreach ($options['param_lookup_extras'][$key] as $param => $value) {
                 // direct table access can handle 'in' statements, reports can't.
                 $extras[$param] = $popOpts[0] == 'direct' ? $value : (is_array($value) ? implode(',', $value) : $value);
             }
             // $extras[$param] = $value;
         }
         $ctrlOptions = array_merge($ctrlOptions, array('valueField' => $popOpts[2], 'captionField' => $popOpts[3], 'blankText' => '<please select>', 'extraParams' => $options['readAuth'] + $extras));
         if ($popOpts[0] == 'direct') {
             $ctrlOptions['table'] = $popOpts[1];
         } else {
             $ctrlOptions['report'] = $popOpts[1];
         }
         if (isset($info['linked_to']) && isset($info['linked_filter_field'])) {
             $ctrlOptions['filterIncludesNulls'] = false;
             //exclude null entries from filter field by default
             if (isset($options['extraParams']) && array_key_exists($info['linked_to'], $options['extraParams'])) {
                 // if the control this is linked to is hidden because it has a preset value, just use that value as a filter on the
                 // population call for this control
                 $ctrlOptions = array_merge($ctrlOptions, array('extraParams' => array_merge($ctrlOptions['extraParams'], array('query' => json_encode(array('in' => array($info['linked_filter_field'] => array($options['extraParams'][$info['linked_to']], null))))))));
             } else {
                 // otherwise link the 2 controls
                 $ctrlOptions = array_merge($ctrlOptions, array('parentControlId' => $fieldPrefix . $info['linked_to'], 'filterField' => $info['linked_filter_field'], 'parentControlLabel' => $options['form'][$info['linked_to']]['display']));
             }
         }
         //If user has set option, then make any lookup parameter an autocomplete, note that autocomplete controls also have a "selectMode"
         //which is why there is a further option provided if you want to use that mode.
         if (!empty($options['forceLookupParamAutocomplete']) && $options['forceLookupParamAutocomplete'] == true) {
             if (!empty($options['forceLookupParamAutocompleteSelectMode']) && $options['forceLookupParamAutocompleteSelectMode'] == true) {
                 $ctrlOptions['selectMode'] = true;
             }
             $r .= data_entry_helper::autocomplete($ctrlOptions);
         } else {
             $r .= data_entry_helper::select($ctrlOptions);
         }
     } elseif ($info['datatype'] == 'lookup' && isset($info['lookup_values'])) {
         // Convert the lookup values into an associative array
         $lookups = explode(',', $info['lookup_values']);
         $lookupsAssoc = array();
         foreach ($lookups as $lookup) {
             $lookup = explode(':', $lookup);
             $lookupsAssoc[$lookup[0]] = $lookup[1];
         }
         $ctrlOptions = array_merge($ctrlOptions, array('blankText' => '<' . lang::get('please select') . '>', 'lookupValues' => $lookupsAssoc));
         //If user has set option, then make any lookup parameter an autocomplete, note that autocomplete controls also have a "selectMode"
         //which is why there is a further option provided if you want to use that mode.
         if (!empty($options['forceLookupParamAutocomplete']) && $options['forceLookupParamAutocomplete'] == true) {
             if (!empty($options['forceLookupParamAutocompleteSelectMode']) && $options['forceLookupParamAutocompleteSelectMode'] == true) {
                 $ctrlOptions['selectMode'] = true;
             }
             $r .= data_entry_helper::autocomplete($ctrlOptions);
         } else {
             $r .= data_entry_helper::select($ctrlOptions);
         }
     } elseif ($info['datatype'] == 'date') {
         $r .= data_entry_helper::date_picker($ctrlOptions);
     } elseif ($info['datatype'] == 'geometry') {
         $tools = array('Polygon', 'Line', 'Point');
     } elseif ($info['datatype'] == 'polygon') {
         $tools = array('Polygon');
     } elseif ($info['datatype'] == 'line') {
         $tools = array('Line');
     } elseif ($info['datatype'] == 'point') {
         $tools = array('Point');
     } else {
         if (method_exists('data_entry_helper', $info['datatype'])) {
             $ctrl = $info['datatype'];
             $r .= data_entry_helper::$ctrl($ctrlOptions);
         } else {
             $r .= data_entry_helper::text_input($ctrlOptions);
         }
     }
     return $r;
 }
开发者ID:joewoodhouse,项目名称:client_helpers,代码行数:101,代码来源:helper_base.php

示例13: get_form

 /**
  * Return the generated form output.
  * @param array $args List of parameter values passed through to the form depending on how the form has been configured.
  * This array always contains a value for language.
  * @param object $node The Drupal node object.
  * @param array $response When this form is reloading after saving a submission, contains the response from the service call.
  * Note this does not apply when redirecting (in this case the details of the saved object are in the $_GET data).
  * @return Form HTML.
  * @todo: Implement this method 
  */
 public static function get_form($args, $node, $response = null)
 {
     global $indicia_templates, $user;
     data_entry_helper::enable_validation('entry_form');
     $url = !empty($_SERVER['HTTPS']) ? "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] : "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
     $r = data_entry_helper::loading_block_start();
     $r .= "<form method=\"post\" id=\"entry_form\" action=\"{$url}\">\n";
     $readAuth = data_entry_helper::get_read_auth($args['website_id'], $args['password']);
     $r .= "<div id=\"controls\">\n";
     if ($args['interface'] != 'one_page') {
         $r .= "<ul>\n";
         if ($user->uid == 0) {
             $r .= '  <li><a href="#about_you"><span>' . lang::get('about you') . "</span></a></li>\n";
         }
         $r .= '  <li><a href="#species"><span>' . lang::get('what did you see') . "</span></a></li>\n";
         $r .= '  <li><a href="#place"><span>' . lang::get('where was it') . "</span></a></li>\n";
         $r .= '  <li><a href="#other"><span>' . lang::get('other information') . "</span></a></li>\n";
         $r .= "</ul>\n";
         data_entry_helper::enable_tabs(array('divId' => 'controls', 'style' => $args['interface']));
     }
     if ($user->uid == 0) {
         $r .= "<fieldset id=\"about_you\">\n";
         if ($args['interface'] == 'one_page') {
             $r .= '<legend>' . lang::get('about you') . '</legend>';
         }
         $r .= data_entry_helper::text_input(array('label' => lang::get('first name'), 'fieldname' => 'smpAttr:' . $args['first_name_attr_id'], 'class' => 'control-width-4', 'validation' => array('required')));
         $r .= data_entry_helper::text_input(array('label' => lang::get('surname'), 'fieldname' => 'smpAttr:' . $args['surname_attr_id'], 'class' => 'control-width-4', 'validation' => array('required')));
         $r .= data_entry_helper::text_input(array('label' => lang::get('phone number'), 'fieldname' => 'smpAttr:' . $args['phone_attr_id'], 'class' => 'control-width-4'));
         $r .= data_entry_helper::text_input(array('label' => lang::get('email'), 'fieldname' => 'smpAttr:' . $args['email_attr_id'], 'class' => 'control-width-4 optional', 'validation' => array('email')));
         if ($args['interface'] == 'wizard') {
             $r .= data_entry_helper::wizard_buttons(array('divId' => 'controls', 'page' => 'first'));
         }
         $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");
//.........这里部分代码省略.........
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:101,代码来源:ad_hoc_cetaceans.php

示例14: get_control_emailaddress

 protected static function get_control_emailaddress($auth, $args, $tabalias, $options)
 {
     return data_entry_helper::text_input(array_merge(array('label' => lang::get('LANG_Email_Address'), 'fieldname' => 'person:email_address', 'class' => 'control-width-5'), $options));
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:4,代码来源:dynamic_person.php

示例15: array

<legend>Verification rule details</legend>
<?php 
data_entry_helper::link_default_stylesheet();
data_entry_helper::enable_validation('entry-form');
if (isset($values['verification_rule:id'])) {
    ?>
  <input type="hidden" name="verification_rule:id" value="<?php 
    echo html::initial_value($values, 'verification_rule:id');
    ?>
" />
<?php 
}
echo data_entry_helper::text_input(array('label' => 'Title', 'fieldname' => 'verification_rule:title', 'class' => 'control-width-4', 'validation' => array('required'), 'default' => html::initial_value($values, 'verification_rule:title')));
echo data_entry_helper::textarea(array('label' => 'Description', 'fieldname' => 'verification_rule:description', 'class' => 'control-width-6', 'default' => html::initial_value($values, 'verification_rule:description')));
echo data_entry_helper::text_input(array('label' => 'Test Type', 'fieldname' => 'verification_rule:test_type', 'class' => 'control-width-4', 'validation' => array('required'), 'default' => html::initial_value($values, 'verification_rule:test_type')));
echo data_entry_helper::text_input(array('label' => 'Source URL', 'fieldname' => 'verification_rule:source_url', 'class' => 'control-width-6', 'default' => html::initial_value($values, 'verification_rule:source_url'), 'helpText' => 'When this verification rule file was imported, this identifies the name of the file ' . 'it was imported from'));
echo data_entry_helper::text_input(array('label' => 'Source Filename', 'fieldname' => 'verification_rule:source_filename', 'class' => 'control-width-6', 'default' => html::initial_value($values, 'verification_rule:source_filename')));
echo data_entry_helper::text_input(array('label' => 'Error Message', 'fieldname' => 'verification_rule:error_message', 'class' => 'control-width-6', 'validation' => array('required'), 'default' => html::initial_value($values, 'verification_rule:error_message')));
echo data_entry_helper::checkbox(array('label' => 'Reverse Rule', 'fieldname' => 'verification_rule:reverse_rule', 'default' => html::initial_value($values, 'verification_rule:reverse_rule'), 'helpText' => 'Tick this box to reverse the rule logic - i.e. items that pass the test are flagged as failures.'));
echo data_entry_helper::textarea(array('label' => 'Metadata', 'fieldname' => 'metaFields:metadata', 'class' => 'control-width-6', 'default' => html::initial_value($values, 'metaFields:metadata'), 'helpText' => 'Additional settings from the header of the verification rule file, in parameter=value format with ' . 'one parameter per line'));
echo data_entry_helper::textarea(array('label' => 'Other Data', 'fieldname' => 'metaFields:data', 'class' => 'control-width-6', 'default' => html::initial_value($values, 'metaFields:data'), 'helpText' => 'Additional settings from the data part of the verification rule file, with blocks of data items ' . 'started by a header name in square brackets, followed by parameters in parameter=value format with ' . 'one parameter per line'));
echo $metadata;
echo html::form_buttons(html::initial_value($values, 'verification_rule:id') != null, false, false);
data_entry_helper::link_default_stylesheet();
data_entry_helper::$dumped_resources[] = 'jquery';
data_entry_helper::$dumped_resources[] = 'jquery_ui';
data_entry_helper::$dumped_resources[] = 'fancybox';
echo data_entry_helper::dump_javascript();
?>
</fieldset>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:verification_rule_edit.php


注:本文中的data_entry_helper::text_input方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。