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


PHP html::form_buttons方法代码示例

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


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

示例1: array

            break;
        case 'B':
            echo data_entry_helper::checkbox(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
            break;
        case 'G':
            echo '<input type="hidden" name="' . $name . '" value="' . $attr['value'] . '" id="imp-geom"/>';
            echo '<label>' . $attr['caption'] . ':</label>';
            echo map_helper::map_panel(array('presetLayers' => array('osm'), 'editLayer' => true, 'clickForSpatialRef' => false, 'layers' => array(), 'initial_lat' => 55, 'initial_long' => -2, 'initial_zoom' => 4, 'width' => 870, 'height' => 400, 'standardControls' => array('panZoomBar', 'layerSwitcher', 'hoverFeatureHighlight', 'drawPolygon', 'modifyFeature', 'clearEditLayer')));
            break;
        default:
            echo data_entry_helper::text_input(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
    }
}
?>
 </ol>
 </fieldset>
<?php 
// some script to handle drawn polygons. Only allow 1 polygon on the layer
data_entry_helper::$javascript .= "mapInitialisationHooks.push(function(div) {\n  function featureChangeEvent(evt) {\n    var featuresToRemove=[];\n    \$.each(evt.feature.layer.features, function(idx, feature) {\n      if (feature.id !== evt.feature.id) {\n        featuresToRemove.push(feature);\n      }\n    });\n    evt.feature.layer.removeFeatures(featuresToRemove);\n    \$('#imp-geom').val(evt.feature.geometry.toString());\n  }\n  div.map.editLayer.events.on({'featureadded': featureChangeEvent, 'afterfeaturemodified': featureChangeEvent}); \n});\n";
echo html::form_buttons(html::initial_value($values, 'taxa_taxon_list:id') != null);
data_entry_helper::$dumped_resources[] = 'jquery';
data_entry_helper::$dumped_resources[] = 'jquery_ui';
data_entry_helper::$dumped_resources[] = 'fancybox';
data_entry_helper::link_default_stylesheet();
echo data_entry_helper::dump_javascript();
?>
</form>
</div>


开发者ID:BirenRathod,项目名称:indicia-code,代码行数:28,代码来源:taxa_taxon_list_edit.php

示例2: foreach

 <?php 
    foreach ($values['attributes'] as $attr) {
        $name = 'psnAttr:' . $attr['person_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'];
        }
        switch ($attr['data_type']) {
            case 'D':
            case 'V':
                echo data_entry_helper::date_picker(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
                break;
            case 'L':
                echo data_entry_helper::select(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['raw_value'], 'lookupValues' => $values['terms_' . $attr['termlist_id']], 'blankText' => '<Please select>'));
                break;
            case 'B':
                echo data_entry_helper::checkbox(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
                break;
            default:
                echo data_entry_helper::text_input(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
        }
    }
    ?>
 </ol>
 </fieldset>
<?php 
}
echo html::form_buttons(html::initial_value($values, 'person:id') != null);
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:person_edit.php

示例3: isset

"
    <?php 
echo $enabled;
?>
 /> <?php 
echo html::error_message($model->getError('valid_max'));
?>
  </li>
  <li id="li_valid_date_in_past">
    <label class="narrow" for="valid_date_in_past">Date is in past</label><?php 
echo form::checkbox('valid_date_in_past', TRUE, isset($model->valid_date_in_past) and $model->valid_date_in_past == 't', 'class="vnarrow" ' . $enabled);
echo html::error_message($model->getError('valid_date_in_past'));
?>
  </li>
  <li id="li_valid_time"><label class="narrow" for="valid_integer">Time</label><?php 
echo form::checkbox('valid_time', TRUE, isset($model->valid_time) and $model->valid_time == 't', 'class="vnarrow" ' . $enabled);
?>
</li>
</ol>
</fieldset>
<?php 
// Output the view that lets this custom attribute associate with websites, surveys, checklists
// or whatever is appropriate for the attribute type.
$this->associationsView->other_data = $other_data;
$this->associationsView->model = $model;
echo $this->associationsView;
echo $metadata;
echo html::form_buttons(html::initial_value($values, $model->object_name . ':id') != null);
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:custom_attribute_edit.php

示例4:

            case 'L':
                echo data_entry_helper::select(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['raw_value'], 'lookupValues' => $values['terms_' . $attr['termlist_id']], 'blankText' => '<Please select>'));
                break;
            case 'B':
                echo data_entry_helper::checkbox(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
                break;
            default:
                echo data_entry_helper::text_input(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
        }
    }
    ?>
</ol>
</fieldset>
<?php 
}
echo html::form_buttons(html::initial_value($values, 'subject_observation:id') != null, false, false);
data_entry_helper::$dumped_resources[] = 'jquery';
data_entry_helper::$dumped_resources[] = 'json';
data_entry_helper::$dumped_resources[] = 'jquery_ui';
data_entry_helper::$dumped_resources[] = 'fancybox';
data_entry_helper::link_default_stylesheet();
echo data_entry_helper::dump_javascript();
?>
</form>
<?php 
if ($tabs) {
    ?>
</div>
<div id="occurrences">
TODO - filter occurrences list to display linked occurrences
</div>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:subject_observation_edit.php

示例5: foreach

if ($parent_id != null && array_key_exists('parent_website_id', $values) && $values['parent_website_id'] !== null) {
    $website_id = $values['parent_website_id'];
} else {
    $website_id = html::initial_value($values, 'taxon_list:website_id');
    if ($this->auth->logged_in('CoreAdmin') || !$website_id && $id !== null) {
        // Core admin can select Warehouse as owner. Other users can only have this option in the list if the
        // list is already assigned to the warehouse in which case the list is read only.
        echo '<option value="">&lt;Warehouse&gt;</option>';
    }
    foreach ($other_data['websites'] as $website) {
        echo '  <option value="' . $website->id . '" ';
        if ($website->id == $website_id) {
            echo 'selected="selected" ';
        }
        echo '>' . $website->title . '</option>';
    }
}
?>
</select>
<?php 
echo html::error_message($model->getError('taxon_list:website_id'));
?>
</li>
</ol>
</fieldset>
<?php 
echo html::form_buttons(html::initial_value($values, 'taxon_list:id') != null, $this->get_read_only($values));
?>
</form>
</div>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:taxon_list_edit.php

示例6: foreach

 *
 * @package	Core
 * @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'));
?>
<form class="iform" action="<?php 
echo url::site() . 'trigger/save';
?>
" method="post">
<fieldset>
<legend>Enter the parameters for the trigger</legend>
<?php 
// dump out the previous page form's values
foreach ($_POST as $key => $value) {
    if ($key != 'submit' && substr($key, 0, 6) != 'param-') {
        echo "<input type=\"hidden\" name=\"{$key}\" value=\"{$value}\"/>\n";
    }
}
// Ask the report grid code to build us a parameters form.
echo data_entry_helper::report_grid(array('id' => 'params', 'paramsOnly' => true, 'dataSource' => $_POST['trigger:trigger_template_file'], 'readAuth' => $readAuth, 'ignoreParams' => array('date'), 'completeParamsForm' => false, 'paramDefaults' => $other_data['defaults']));
?>
 </fieldset>
 <?php 
echo html::form_buttons(true);
?>
 </form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:params_edit.php

示例7: foreach

}
?>
 >
  <option value=''>&lt;Warehouse&gt;</option>
<?php 
if (!is_null($this->auth_filter)) {
    $websites = ORM::factory('website')->in('id', $this->auth_filter['values'])->orderby('title', 'asc')->find_all();
} else {
    $websites = ORM::factory('website')->orderby('title', 'asc')->find_all();
}
foreach ($websites as $website) {
    echo '	<option value="' . $website->id . '" ';
    if ($website->id == $website_id) {
        echo 'selected="selected" ';
    }
    echo '>' . $website->title . '</option>';
}
?>
</select>
<?php 
echo html::error_message($model->getError('termlist:website_id'));
?>
</li>
</ol>
</fieldset>
<?php 
echo html::form_buttons(html::initial_value($values, 'termlist:id') != null && html::initial_value($values, 'termlist:id') != '', false, false);
echo html::error_message($model->getError('deleted'));
?>
</form>
</div>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:31,代码来源:termlist_edit.php

示例8:

?>
" />
<legend>Taxon Group details</legend>
<ol>
<li>
<label for="title">Title</label>
<input id="title" name="taxon_group:title" value="<?php 
echo html::initial_value($values, 'taxon_group:title');
?>
" />
<?php 
echo html::error_message($model->getError('taxon_group:title'));
?>
</li>
<li>
<label for="title">External key</label>
<input id="title" name="taxon_group:external_key" value="<?php 
echo html::initial_value($values, 'taxon_group:external_key');
?>
" />
<?php 
echo html::error_message($model->getError('taxon_group:external_key'));
?>
</li>
</ol>
</fieldset>
<?php 
echo html::form_buttons(html::initial_value($values, 'taxon_group:id') != null);
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:taxon_group_edit.php

示例9:

<input id="parent" name="termlists_term:parent" readonly="readonly" value="<?php 
$parent_id = html::initial_value($values, 'termlists_term:parent_id');
echo $parent_id != null ? html::specialchars(ORM::factory('termlists_term', $parent_id)->term->term) : '';
?>
" />
</li>
<li>
<label for="synonyms">Synonyms
<span class="ui-state-highlight ui-widget-content ui-corner-all" title="Enter synonyms one per line. Optionally follow each name by a | character then the 3 character code for the language, e.g. 'Countryside | eng'.">?</span></label>
<textarea rows="7" columns="40" id="synonyms" name="metaFields:synonyms"><?php 
echo html::initial_value($values, 'metaFields:synonyms');
?>
</textarea>
</li>
<li>
<label for="sort_order">Sort Order in List</label>
<input id="sort_order" name="termlists_term:sort_order" class="narrow" value="<?php 
echo html::initial_value($values, 'termlists_term:sort_order');
?>
" />
<?php 
echo html::error_message($model->getError('termlists_term:sort_order'));
?>
</li>
</fieldset>
<?php 
echo html::form_buttons(html::initial_value($values, 'termlists_term:id') != null);
echo html::error_message($model->getError('deleted'));
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:termlists_term_edit.php

示例10: foreach

    echo html::error_message($model->getError('user:password'));
}
?>
</ol>
</fieldset>
<fieldset>
<legend>Website Roles</legend>
<ol>
<?php 
foreach ($model->users_websites as $website) {
    echo '<li><label class="wide" for="' . $website['name'] . '">' . $website['title'] . '</label>';
    echo '  <select class="narrow" id="' . $website['name'] . '" name="' . $website['name'] . '">';
    echo '	<option>None</option>';
    $site_roles = ORM::factory('site_role')->orderby('title', 'asc')->find_all();
    foreach ($site_roles as $site_role) {
        echo '	<option value="' . $site_role->id . '" ';
        if ($site_role->id == $website['value']) {
            echo 'selected="selected" ';
        }
        echo '>' . $site_role->title . '</option>';
    }
    echo '</select></li>';
}
?>
</ol>
</fieldset>
<?php 
echo html::form_buttons($model->id != null);
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:user_edit.php

示例11: array

" />
<?php 
echo html::error_message($model->getError('taxon_relation_type:reverse_term'));
?>
</li>
<li>
<label for="relation_code">Relation Code</label>
<select id="data_type" name="taxon_relation_type:relation_code">
		<option value=''>&lt;Please Select&gt;</option>
		<?php 
$optionlist = array('0' => 'Mutually Exclusive', '1' => 'At Least Partial Overlap', '3' => 'Same or part of', '7' => 'The same as');
foreach ($optionlist as $key => $option) {
    echo '	<option value="' . $key . '" ';
    if ($key == html::initial_value($values, 'taxon_relation_type:relation_code')) {
        echo 'selected="selected" ';
    }
    echo '>' . $option . '</option>';
}
?>
	</select> <?php 
echo html::error_message($model->getError('taxon_relation_type:relation_code'));
?>
	</li>
</ol>
</fieldset>
<?php 
echo html::form_buttons(html::initial_value($values, 'taxon_relation_type:id') != null);
?>
</form>

开发者ID:BirenRathod,项目名称:indicia-code,代码行数:29,代码来源:taxon_relation_type_edit.php

示例12:

<form class="cmxform" action="<?php 
echo url::site() . 'title/save';
?>
" method="post">
<?php 
echo $metadata;
?>
<fieldset>
<legend>Title details</legend>
<input type="hidden" name="title:id" value="<?php 
echo html::initial_value($values, 'title:id');
?>
" />
<ol>
<li>
<label for="title">Title</label>
<input class="narrow" id="title" name="title:title" value="<?php 
echo html::initial_value($values, 'title:title');
?>
" />
<?php 
echo html::error_message($model->getError('title:title'));
?>
</li>
</ol>
</fieldset>
<?php 
echo html::form_buttons(html::initial_value($values, 'title:id') != null);
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:title_edit.php

示例13:

<li>
<label for="password2">Retype Password</label>
<input type="password" id="password2" name="password2" value="<?php 
echo html::initial_value($values, 'password2');
?>
" />
<?php 
echo html::error_message($model->getError('website:password2'));
?>
</li>
<li>
<input type="hidden" name="website:verification_checks_enabled" value="f" />
<label for="verification_checks_enabled">Enable auto-verification checks:</label>
<?php 
$checked = html::initial_value($values, 'website:verification_checks_enabled') === 't' ? 'checked="checked"' : '';
?>
<input type="checkbox" id="verification_checks_enabled" name="website:verification_checks_enabled" <?php 
echo $checked;
?>
/>
<?php 
echo html::error_message($model->getError('website:verification_checks_enabled'));
?>
</li>
</ol>
</fieldset>
<?php 
echo html::form_buttons(html::initial_value($values, 'website:id') != null);
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:website_edit.php

示例14: switch

        }
        switch ($attr['data_type']) {
            case 'D':
            case 'V':
                echo data_entry_helper::date_picker(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
                break;
            case 'L':
                echo data_entry_helper::select(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['raw_value'], 'lookupValues' => $values['terms_' . $attr['termlist_id']], 'blankText' => '<Please select>'));
                break;
            case 'B':
                echo data_entry_helper::checkbox(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
                break;
            default:
                echo data_entry_helper::text_input(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
        }
    }
    ?>
</ol>
</fieldset>
<?php 
}
echo html::form_buttons(html::initial_value($values, 'identifier:id') != null, false, false);
data_entry_helper::$dumped_resources[] = 'jquery';
data_entry_helper::$dumped_resources[] = 'json';
data_entry_helper::$dumped_resources[] = 'jquery_ui';
data_entry_helper::$dumped_resources[] = 'fancybox';
data_entry_helper::link_default_stylesheet();
echo data_entry_helper::dump_javascript();
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:identifier_edit.php

示例15: switch

        switch ($attr['data_type']) {
            case 'D':
            case 'V':
                echo data_entry_helper::date_picker(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
                break;
            case 'L':
                echo data_entry_helper::select(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['raw_value'], 'lookupValues' => $values['terms_' . $attr['termlist_id']], 'blankText' => '<Please select>'));
                break;
            case 'B':
                echo data_entry_helper::checkbox(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
                break;
            default:
                echo data_entry_helper::text_input(array('label' => $attr['caption'], 'fieldname' => $name, 'default' => $attr['value']));
        }
    }
    ?>
 </ol>
 </fieldset>
<?php 
}
echo html::form_buttons(html::initial_value($values, 'survey:id') != null);
data_entry_helper::$dumped_resources[] = 'jquery';
data_entry_helper::$dumped_resources[] = 'jquery_ui';
data_entry_helper::$dumped_resources[] = 'fancybox';
data_entry_helper::enable_validation('survey-edit');
data_entry_helper::link_default_stylesheet();
data_entry_helper::$javascript .= "\n// ensure the parent lookup does not allow an inappropriate survey to be selected (i.e. self or wrong website)\nfunction setParentFilter() {  \n  var filter={\"query\":{}};\n  filter.query.notin=['id', [1]];\n  filter.query.where=['website_id', \$('#survey\\\\:website_id').val()];\n  filter.query=JSON.stringify(filter.query);\n  \$('#survey\\\\:parent_id\\\\:title').setExtraParams(filter);\n}\n\$('#survey\\\\:website_id').change(function() {\n  \$('#survey\\\\:parent_id\\\\:title').val('');\n  \$('#survey\\\\:parent_id').val('');\n  setParentFilter();\n});\nsetParentFilter();\n";
echo data_entry_helper::dump_javascript();
?>
</form>
开发者ID:BirenRathod,项目名称:indicia-code,代码行数:30,代码来源:survey_edit.php


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