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


PHP data_entry_helper::autocomplete方法代码示例

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


在下文中一共展示了data_entry_helper::autocomplete方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
 }
开发者ID:BirenRathod,项目名称:drupal-6,代码行数:20,代码来源:basic_2.php

示例2: 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)
 {
     global $indicia_templates;
     iform_load_helpers(array('map_helper', 'report_helper'));
     // apply defaults
     $args = array_merge(array(), $args);
     $reloadPath = self::getReloadPath();
     data_entry_helper::$website_id = $args['website_id'];
     $auth = data_entry_helper::get_read_write_auth($args['website_id'], $args['password']);
     if (!empty($_GET['user_trust_id'])) {
         self::loadExistingUserTrust($_GET['user_trust_id'], $auth, $args);
     }
     $r = "<form method=\"post\" id=\"entry_form\" action=\"{$reloadPath}\">\n";
     $r .= $auth['write'] . "<input type=\"hidden\" id=\"website_id\" name=\"website_id\" value=\"" . $args['website_id'] . "\" />\n";
     $r .= data_entry_helper::hidden_text(array('fieldname' => 'user_trust:id'));
     $r .= data_entry_helper::autocomplete(array('label' => lang::get('Recorder to trust'), 'fieldname' => 'user_trust:user_id', 'table' => 'user', 'valueField' => 'id', 'captionField' => 'person_name', 'extraParams' => $auth['read'] + array('view' => 'detail'), 'class' => 'control-width-4'));
     $col1 = '<p>Define the combination of survey, taxon group and/or location that this recorder is trusted for below.</p>';
     $col1 .= '<fieldset><legend>' . lang::get('Trust settings') . '</legend>';
     $col1 .= data_entry_helper::autocomplete(array('label' => lang::get('Trust records in this survey'), 'fieldname' => 'user_trust:survey_id', 'table' => 'survey', 'valueField' => 'id', 'captionField' => 'title', 'blankText' => '<' . lang::get('any') . '>', 'extraParams' => $auth['read'] + array('sharing' => 'verification'), 'class' => 'control-width-4'));
     $col1 .= data_entry_helper::autocomplete(array('label' => lang::get('Trust records in this taxon group'), 'fieldname' => 'user_trust:taxon_group_id', 'table' => 'taxon_group', 'valueField' => 'id', 'captionField' => 'title', 'blankText' => '<' . lang::get('any') . '>', 'extraParams' => $auth['read'], 'class' => 'control-width-4'));
     $col1 .= data_entry_helper::autocomplete(array('label' => lang::get('Trust records in this location'), 'fieldname' => 'user_trust:location_id', 'table' => 'location', 'valueField' => 'id', 'captionField' => 'name', 'blankText' => '<' . lang::get('any') . '>', 'extraParams' => $auth['read'] + array('location_type_id' => variable_get('indicia_profile_location_type_id', '')), 'class' => 'control-width-4'));
     $col2 = '<p>' . lang::get('Review this recorder\'s experience in the tabs below') . '</p>';
     $col2 .= '<div id="summary-tabs">';
     $col2 .= data_entry_helper::tab_header(array('tabs' => array('#tab-surveys' => lang::get('Surveys'), '#tab-taxon-groups' => lang::get('Taxon groups'), '#tab-locations' => lang::get('Locations'))));
     data_entry_helper::enable_tabs(array('divId' => 'summary-tabs'));
     $col2 .= '<div id="tab-surveys">';
     $col2 .= report_helper::report_grid(array('id' => 'surveys-summary', 'readAuth' => $auth['read'], 'dataSource' => 'library/surveys/filterable_surveys_verification_breakdown', 'ajax' => TRUE, 'autoloadAjax' => FALSE, 'extraParams' => array('my_records' => 1)));
     $col2 .= '</div>';
     $col2 .= '<div id="tab-taxon-groups">';
     $col2 .= report_helper::report_grid(array('id' => 'taxon-groups-summary', 'readAuth' => $auth['read'], 'dataSource' => 'library/taxon_groups/filterable_taxon_groups_verification_breakdown', 'ajax' => TRUE, 'autoloadAjax' => FALSE, 'extraParams' => array('my_records' => 1)));
     $col2 .= '</div>';
     $col2 .= '<div id="tab-locations">';
     $col2 .= report_helper::report_grid(array('id' => 'locations-summary', 'readAuth' => $auth['read'], 'dataSource' => 'library/locations/filterable_locations_verification_breakdown', 'ajax' => TRUE, 'autoloadAjax' => FALSE, 'extraParams' => array('my_records' => 1, 'location_type_id' => variable_get('indicia_profile_location_type_id', ''))));
     $col2 .= '</div>';
     $col2 .= '</div>';
     $r .= str_replace(array('{col-1}', '{col-2}'), array($col1, $col2), $indicia_templates['two-col-50']);
     $r .= '</fieldset>';
     $r .= '<input type="submit" class="indicia-button" id="save-button" value="' . (empty(data_entry_helper::$entity_to_load['user_trust_id:id']) ? lang::get('Grant trust') : lang::get('Update trust settings')) . "\" />\n";
     if (!empty($_GET['user_trust_id'])) {
         $r .= '<input type="submit" class="indicia-button" id="delete-button" name="delete-button" value="' . lang::get('Revoke this trust') . "\" />\n";
         data_entry_helper::$javascript .= "\$('#delete-button').click(function(e) {\n        if (!confirm(\"Are you sure you want to revoke this trust?\")) {\n          e.preventDefault();\n          return false;\n        }\n      });\n";
     }
     $r .= '</form>';
     data_entry_helper::enable_validation('entry_form');
     return $r;
 }
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:55,代码来源:user_trust_edit.php

示例3: array

 *
 * @package	People tidier
 * @subpackage Views
 * @author	Indicia Team
 * @license	http://www.gnu.org/licenses/gpl.html GPL
 * @link 	http://code.google.com/p/indicia/
 */
require_once DOCROOT . 'client_helpers/data_entry_helper.php';
$readAuth = data_entry_helper::get_read_auth(0 - $_SESSION['auth_user']->id, kohana::config('indicia.private_key'));
?>
<p>Search for people records in the database that might be the same person as the currently selected person. Use * for wildcards to help when searching:</p>
<div class="ui-helper-clearfix">
<div class="left" style="width: 45%">
<h2>User search</h2>
<?php 
echo data_entry_helper::autocomplete(array('label' => 'Search', 'fieldname' => 'person_id', 'table' => 'person', 'captionField' => 'caption', 'valueField' => 'id', 'extraParams' => $readAuth + array('query' => urlencode(json_encode(array('notin' => array('id', $personId)))))));
data_entry_helper::$javascript .= "\$('input#person_id\\:caption').change(function(event) {\n  var personId=\$('input#person_id').val(), table;\n  \$('#found-person-id').val(personId);\n  jQuery.ajax({ \n    type: 'GET', \n    url: '" . url::site() . "people_tidier/person_panel/'+personId, \n    data: {}, \n    success: function(table) {\n      \$('#selected-person').html(table);\n      \$('#resolution input').attr('disabled','');\n    },\n  });\n});\n\n\$('#resolution').submit(function(e){\n  if (!confirm('Are you absolutely sure that the 2 person records on this page refer to the same person and that you want to merge them into 1 record?'))\n    e.preventDefault();\n});\n";
?>
<div id="selected-person" style="margin-left: 160px"></div>
</div>
<div class="right" style="width: 45%">
<h2>Selected user</h2>
<?php 
echo $currentPersonPanel;
?>
</div>
</div>
<form method="post" id="resolution" action="<?php 
echo url::site();
?>
people_tidier/merge_people" class="ui-helper-clearfix">
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:index.php

示例4: get_params_form_control

 /**
  * Returns a control to insert onto a parameters form.
  * @param string $key The unique identifier of this control.
  * @param array $info Configuration options for the parameter as defined in the report, including the 
  * description, display (label), default and datatype.
  * @param array $options Control options array
  * @param array $tools Any tools to be embedded in the map toolbar are returned in this 
  * parameter rather than as the return result of the function.
  * @return string The HTML for the form parameter.
  */
 private static function get_params_form_control($key, $info, $options, &$tools)
 {
     $r = '';
     $fieldPrefix = isset($options['fieldNamePrefix']) ? $options['fieldNamePrefix'] . '-' : '';
     $ctrlOptions = array('label' => lang::get($info['display']), 'helpText' => $options['helpText'] ? $info['description'] : '', 'fieldname' => $fieldPrefix . $key, 'nocache' => isset($options['nocache']) && $options['nocache']);
     // If this parameter is in the URL or post data, put it in the control instead of the original default
     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');
//.........这里部分代码省略.........
开发者ID:joewoodhouse,项目名称:client_helpers,代码行数:101,代码来源:helper_base.php

示例5: array

<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>
<label for='<?php 
echo $config['dafor'];
?>
'>Abundance DAFOR:</label>
<?php 
echo data_entry_helper::select($config['dafor'], 'termlists_term', 'term', 'id', $readAuth + array('termlist_id' => $config['dafor_termlist']));
?>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:test_data_entry.php

示例6: array

<?php 
data_entry_helper::enable_validation('entry-form');
echo $metadata;
?>
<fieldset>
<input type="hidden" name="identifiers_subject_observation:id" value="<?php 
echo $id;
?>
" />
<input type="hidden" name="identifiers_subject_observation:subject_observation_id" value="<?php 
echo html::initial_value($values, 'identifiers_subject_observation:subject_observation_id');
?>
" />
<legend>Identifier Details</legend>
<?php 
echo data_entry_helper::autocomplete(array('label' => 'Identifier', 'fieldname' => 'identifiers_subject_observation:identifier_id', 'table' => 'identifier', 'captionField' => 'coded_value', 'valueField' => 'id', 'extraParams' => $readAuth, 'default' => html::initial_value($values, 'identifiers_subject_observation:identifier_id'), 'defaultCaption' => html::initial_value($values, 'identifier:coded_value'), 'validation' => 'required'));
echo data_entry_helper::checkbox(array('fieldname' => 'identifiers_subject_observation:matched', 'label' => 'Matched', 'helpText' => 'Does this observation match a known identifier?', 'default' => html::initial_value($values, 'identifiers_subject_observation:matched')));
echo data_entry_helper::select(array('fieldname' => 'identifiers_subject_observation:verified_status', 'label' => 'Verified status', 'helpText' => 'Status of this identifier observation.', 'lookupValues' => array('' => 'Please select>', 'U' => 'unknown', 'M' => 'misread', 'V' => 'verified'), 'default' => html::initial_value($values, 'identifiers_subject_observation:verified_status'), 'validation' => 'required'));
?>
</fieldset>

 <?php 
if (array_key_exists('attributes', $values) && count($values['attributes']) > 0) {
    ?>
  <fieldset>
 <legend>Custom Attributes</legend>
 <ol>
 <?php 
    foreach ($values['attributes'] as $attr) {
        $name = 'isoAttr:' . $attr['identifiers_subject_observation_attribute_id'];
        // if this is an existing attribute, tag it with the attribute value record id so we can re-save it
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:identifiers_subject_observation_edit.php

示例7: report_filter_panel


//.........这里部分代码省略.........
            if (is_array($list)) {
                $list = implode(',', $list);
            }
            $paneNames = 'filter_' . str_replace(',', ',filter_', $list);
            $paneList = explode(',', $paneNames);
            $filterModules[$category] = array_intersect_key($filters, array_fill_keys($paneList, 1));
        }
    } else {
        $filterModules = array('' => $filters);
    }
    foreach ($filterModules as $category => $list) {
        if ($category) {
            $r .= '<fieldset class="collapsible collapsed">' . '<legend>' . '<span class="fieldset-legend">' . $category . '</span>' . '</legend>' . '<div class="fieldset-wrapper">';
        }
        foreach ($list as $moduleName => $module) {
            $r .= "<div class=\"pane\" id=\"pane-{$moduleName}\"><a class=\"fb-filter-link\" href=\"#controls-{$moduleName}\"><span class=\"pane-title\">" . $module->get_title() . '</span>';
            $r .= '<span class="filter-desc"></span></a>';
            $r .= "</div>";
        }
        if ($category) {
            $r .= '</div></fieldset>';
        }
    }
    $r .= '</div>';
    // filter panes
    $r .= '<div class="toolbar">';
    if ($options['allowSave']) {
        $r .= '<label for="filter:title">' . lang::get('Save filter as') . ':</label> <input id="filter:title" class="control-width-5"/>';
        if ($options['admin']) {
            $r .= '<br/>';
            if (empty($options['adminCanSetSharingTo'])) {
                throw new exception('Report standard params panel in admin mode so adminCanSetSharingTo option must be populated.');
            }
            $r .= data_entry_helper::autocomplete(array('label' => 'For who?', 'fieldname' => 'filters_user:user_id', 'table' => 'user', 'valueField' => 'id', 'captionField' => 'person_name', 'formatFunction' => "function(item) { return item.person_name + ' (' + item.email_address + ')'; }", 'extraParams' => $readAuth + array('view' => 'detail'), 'class' => 'control-width-5'));
            $r .= data_entry_helper::textarea(array('label' => 'Description', 'fieldname' => 'filter:description'));
        }
        $r .= '<img src="' . data_entry_helper::$images_path . 'nuvola/save-22px.png" width="22" height="22" alt="Save filter" title="Save filter" class="button" id="filter-save"/>';
        $r .= '<img src="' . data_entry_helper::$images_path . 'trash-22px.png" width="22" height="22" alt="Bin this filter" title="Bin this filter" class="button disabled" id="filter-delete"/>';
    }
    $r .= '</div></div>';
    // toolbar + clearfix
    if (!empty($options['filters_user_id'])) {
        // if we are preloading based on a filter user ID, we need to get the information now so that the sharing mode can be known
        // when loading controls
        $fu = data_entry_helper::get_population_data(array('table' => 'filters_user', 'extraParams' => $readAuth + array('id' => $options['filters_user_id']), 'caching' => false));
        if (count($fu) !== 1) {
            throw new exception('Could not find filter user record');
        }
        $options['sharing'] = report_filters_sharing_code_to_full_term($fu[0]['filter_sharing']);
    }
    report_helper::$javascript .= "indiciaData.lang={pleaseSelect:\"" . lang::get('Please select') . "\"};\n";
    // create the hidden panels required to populate the popups for setting each type of filter up.
    $hiddenStuff = '';
    foreach ($filterModules as $category => $list) {
        foreach ($list as $moduleName => $module) {
            $hiddenStuff .= "<div style=\"display: none\"><div class=\"filter-popup\" id=\"controls-{$moduleName}\"><form action=\"#\" class=\"filter-controls\"><fieldset>" . $module->get_controls($readAuth, $options) . '<button class="fb-close" type="button">Cancel</button>' . '<button class="fb-apply" type="submit">Apply</button></fieldset></form></div></div>';
            $shortName = str_replace('filter_', '', $moduleName);
            report_helper::$javascript .= "indiciaData.lang.NoDescription{$shortName}='" . lang::get('Click to Filter ' . ucfirst($shortName)) . "';\n";
        }
    }
    $r .= '</div>';
    report_helper::$js_read_tokens = $readAuth;
    report_helper::$javascript .= "indiciaData.lang.CreateAFilter='" . lang::get('Create a filter') . "';\n";
    report_helper::$javascript .= "indiciaData.lang.ModifyFilter='" . lang::get('Modify filter') . "';\n";
    report_helper::$javascript .= "indiciaData.lang.FilterReport='" . lang::get('New report') . "';\n";
    report_helper::$javascript .= "indiciaData.lang.FilterSaved='" . lang::get('The filter has been saved') . "';\n";
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:67,代码来源:report_filters.php

示例8: array

echo data_entry_helper::loading_block_start();
?>
<form method="post" enctype="multipart/form-data">
<?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>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:file_upload.php

示例9: alert

        alert(data);
      } else {
        // if OK, it returns the new record ID. Add it to the grid, using the global var created
        // when the grid was created.
        indiciaData.reports.termlists_term.grid_termlists_term.addRecords('id', data);
      }
    }
  );
};
/*]]>*/
</script>
<?php 
    require_once DOCROOT . 'client_helpers/data_entry_helper.php';
    $readAuth = data_entry_helper::get_read_auth(0 - $_SESSION['auth_user']->id, kohana::config('indicia.private_key'));
    echo '<div class="linear-form">';
    echo data_entry_helper::autocomplete(array('label' => 'Add term', 'fieldname' => 'add-from-parent', 'helpText' => 'Search for terms in the parent list to quickly add them into this list.', 'table' => 'termlists_term', 'captionField' => 'term', 'valueField' => 'id', 'extraParams' => $readAuth + array('termlist_id' => $parent_list_id), 'afterControl' => '<input type="button" value="Add" onclick="add_parent_term();" />'));
    echo '</div>';
}
echo $grid;
?>
<br/>
<form action="<?php 
echo url::site() . 'termlists_term/create/' . $termlist_id;
?>
" method="post">
<?php 
if (isset($parent_id)) {
    ?>
<input type="hidden" value="<?php 
    echo $parent_id;
    ?>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:index.php

示例10: array

echo data_entry_helper::text_input(array('label' => 'Name', 'fieldname' => 'location:name', 'default' => html::initial_value($values, 'location:name'), 'validation' => 'required', 'disabled' => $disabled));
echo data_entry_helper::text_input(array('label' => 'Code', 'fieldname' => 'location:code', 'default' => html::initial_value($values, 'location:code'), 'disabled' => $disabled));
echo data_entry_helper::select(array('label' => 'Type', 'fieldname' => 'location:location_type_id', 'default' => html::initial_value($values, 'location:location_type_id'), 'lookupValues' => $other_data['type_terms'], 'blankText' => '<Please select>', 'disabled' => $disabled));
echo data_entry_helper::textarea(array('label' => 'Comment', 'fieldname' => 'location:comment', 'default' => html::initial_value($values, 'location:comment'), 'disabled' => $disabled));
echo data_entry_helper::sref_and_system(array('label' => 'Spatial Ref', 'fieldname' => 'location:centroid_sref', 'geomFieldname' => 'location:centroid_geom', 'default' => html::initial_value($values, 'location:centroid_sref'), 'defaultGeom' => html::initial_value($values, 'location:centroid_geom'), 'systems' => spatial_ref::system_list(), 'defaultSystem' => html::initial_value($values, 'location:centroid_sref_system'), 'class' => 'control-width-3', 'validation' => 'required', 'disabled' => $disabled));
?>
  <input type="hidden" name="location:boundary_geom" id="imp-boundary-geom" value="<?php 
echo $boundary_geom;
?>
"/>
  <p class="instruct">Zoom the map in by double-clicking then single click on the location's centre to set the
  spatial reference. The more you zoom in, the more accurate the reference will be.</p>
  <?php 
$readAuth = data_entry_helper::get_read_auth(0 - $_SESSION['auth_user']->id, kohana::config('indicia.private_key'));
echo map_helper::map_panel(array('readAuth' => $readAuth, 'presetLayers' => array('osm'), 'editLayer' => true, 'layers' => array(), 'initial_lat' => 52, 'initial_long' => -2, 'initial_zoom' => 7, 'width' => 870, 'height' => 400, 'initialFeatureWkt' => $centroid_geom, 'standardControls' => $disabled_input === 'YES' ? array('layerSwitcher', 'panZoomBar') : array('layerSwitcher', 'panZoomBar', 'drawPolygon', 'drawLine', 'modifyFeature'), 'allowPolygonRecording' => true));
echo data_entry_helper::autocomplete(array('label' => 'Parent location', 'fieldname' => 'location:parent_id', 'table' => 'location', 'captionField' => 'name', 'valueField' => 'id', 'extraParams' => $readAuth, 'default' => html::initial_value($values, 'location:parent_id'), 'defaultCaption' => html::initial_value($values, 'parent:name'), 'disabled' => $disabled));
if ($this->auth->logged_in('CoreAdmin')) {
    //Only core admin can create public locations.
    echo data_entry_helper::checkbox(array('label' => 'Available to all websites', 'fieldname' => 'location:public', 'default' => html::initial_value($values, 'location:public'), 'disabled' => $disabled));
}
?>
  </fieldset>
</div>

<?php 
if (is_null($id) || $this->auth->logged_in('CoreAdmin') || $values['location:public'] === 'f') {
    //No need to display for public locations unless core admin.
    ?>
  
<div id="websites">
  <fieldset>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:location_edit.php

示例11: foreach

?>
<p>This page allows you to specify the details of a survey in which samples and records can be organised.</p>
<form class="cmxform" action="<?php 
echo url::site() . 'survey/save';
?>
" method="post" id="survey-edit">
<?php 
echo $metadata;
?>
<fieldset>
<legend>Survey dataset details</legend>
<?php 
echo data_entry_helper::hidden_text(array('fieldname' => 'survey:id', 'default' => html::initial_value($values, 'survey:id')));
echo data_entry_helper::text_input(array('label' => 'Title', 'fieldname' => 'survey:title', 'default' => html::initial_value($values, 'survey:title'), 'validation' => 'required', 'helpText' => 'Provide a title for your survey dataset'));
echo data_entry_helper::textarea(array('label' => 'Description', 'fieldname' => 'survey:description', 'default' => html::initial_value($values, 'survey:description'), 'validation' => 'required', 'helpText' => 'Provide an optional description of your survey to help when browsing survey datasets on the warehouse'));
echo data_entry_helper::autocomplete(array('label' => 'Parent survey', 'fieldname' => 'survey:parent_id', 'table' => 'survey', 'captionField' => 'title', 'valueField' => 'id', 'extraParams' => $readAuth, 'default' => html::initial_value($values, 'survey:parent_id'), 'defaultCaption' => html::initial_value($values, 'parent:title'), 'helpText' => 'Set a parent for your survey to allow grouping of survey datasets in reports'));
echo data_entry_helper::select(array('label' => 'Website', 'fieldname' => 'survey:website_id', 'default' => html::initial_value($values, 'survey:website_id'), 'lookupValues' => $other_data['websites'], 'helpText' => 'The survey must belong to a website registration'));
?>
</fieldset>
<?php 
if (array_key_exists('attributes', $values) && count($values['attributes']) > 0) {
    ?>
 <fieldset>
 <legend>Custom attributes</legend>
 <ol>
 <?php 
    foreach ($values['attributes'] as $attr) {
        $name = 'srvAttr:' . $attr['survey_attribute_id'];
        // if this is an existing attribute, tag it with the attribute value record id so we can re-save it
        if ($attr['id']) {
            $name .= ':' . $attr['id'];
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:survey_edit.php

示例12: function

echo $this->taxon_list_id;
?>
,
      taxon_group_id: $('#add-group').val()
    }, function(data, textStatus) {
      if (isNaN(parseInt(data)))
        // if text returned, it is a message to display
        alert(data);
      else
        // if OK, it returns the new record ID. Add it to the grid.
        if (data!==0)
          indiciaData.reports.taxon_groups_taxon_list.grid_taxon_groups_taxon_list.addRecords('id', data);
    }
  );
}

/*]]>*/
</script>
<?php 
require_once DOCROOT . 'client_helpers/data_entry_helper.php';
$readAuth = data_entry_helper::get_read_auth(0 - $_SESSION['auth_user']->id, kohana::config('indicia.private_key'));
echo '<div class="linear-form">';
echo data_entry_helper::autocomplete(array('label' => 'Add taxon group', 'fieldname' => 'add-group', 'helpText' => 'Search for taxon groups to quickly add them into this list.', 'table' => 'taxon_group', 'captionField' => 'title', 'valueField' => 'id', 'extraParams' => $readAuth, 'afterControl' => '<input type="button" value="Add" onclick="add_taxon_group();" />'));
echo '</div>';
echo $grid;
if (request::is_ajax()) {
    // When viewing as an AJAX loaded tab, don't reload jQuery as it is already on the page.
    data_entry_helper::$dumped_resources[] = 'jquery';
}
data_entry_helper::link_default_stylesheet();
echo data_entry_helper::dump_javascript(true);
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:index.php

示例13: get_control_observerautocomplete

 /**
  * Get the observer control as an autocomplete.
  */
 protected static function get_control_observerautocomplete($auth, $args, $tabAlias, $options)
 {
     global $user;
     //Get the name of the currently logged in user
     $defaultUserData = data_entry_helper::get_report_data(array('dataSource' => 'library/users/get_people_details_for_website_or_user', 'readAuth' => $auth['read'], 'extraParams' => array('user_id' => hostsite_get_user_field('indicia_user_id'), 'website_id' => $args['website_id'])));
     //If we are in edit mode then we need to get the name of the saved observer for the sample
     if (!empty($_GET['sample_id']) && !empty($args['observer_name'])) {
         $existingUserData = data_entry_helper::get_population_data(array('table' => 'sample_attribute_value', 'extraParams' => $auth['read'] + array('sample_id' => $_GET['sample_id'], 'sample_attribute_id' => $args['observer_name'])));
     }
     $observer_list_args = array_merge_recursive(array('extraParams' => array_merge($auth['read'])), $options);
     $observer_list_args['label'] = t('Observer Name');
     $observer_list_args['extraParams']['website_id'] = $args['website_id'];
     $observer_list_args['captionField'] = 'fullname_surname_first';
     $observer_list_args['id'] = 'obSelect:' . $args['observer_name'];
     $observer_list_args['report'] = 'library/users/get_people_details_for_website_or_user';
     //Auto-fill the observer name with the name of the observer of the existing saved sample if it exists,
     //else default to current user name
     if (!empty($existingUserData[0]['value'])) {
         $observer_list_args['defaultCaption'] = $existingUserData[0]['value'];
     } else {
         if (empty($_GET['sample_id'])) {
             $observer_list_args['defaultCaption'] = $defaultUserData[0]['fullname_surname_first'];
         }
     }
     return data_entry_helper::autocomplete($observer_list_args);
 }
开发者ID:joewoodhouse,项目名称:client_helpers,代码行数:29,代码来源:dynamic_shorewatch.php

示例14:

?>
<input type='hidden' id='website_id' name='website_id' value='<?php 
echo $config['website_id'];
?>
' />
<input type='hidden' id='survey_id' name='survey_id' value='<?php 
echo $config['survey_id'];
?>
' />
<input type='hidden' id='record_status' name='occurrence:record_status' value='C' />
<?php 
echo flickr_helper::flickr_selector();
?>
<label for='occurrence:taxa_taxon_list_id:taxon'>Taxon:</label>
<?php 
echo data_entry_helper::autocomplete('occurrence:taxa_taxon_list_id', 'taxa_taxon_list', 'taxon', 'id', $readAuth);
?>
<label for="date">Date:</label>
<?php 
echo data_entry_helper::date_picker('sample:date');
echo data_entry_helper::map();
?>
<input type="submit" value="Save" />
</fieldset>

</form>
<?php 
echo data_entry_helper::dump_javascript();
?>
</body>
</html>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:flickr.php


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