本文整理汇总了PHP中shn_form_get_html_fields函数的典型用法代码示例。如果您正苦于以下问题:PHP shn_form_get_html_fields函数的具体用法?PHP shn_form_get_html_fields怎么用?PHP shn_form_get_html_fields使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了shn_form_get_html_fields函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: address_form
public function address_form()
{
include_once APPROOT . 'inc/lib_form_util.inc';
echo "<h4>" . _t('ADDING_ADDRESS___') . "</h4>";
$address_form = address_form('new');
$fields = shn_form_get_html_fields($address_form);
$fields = place_form_elements($address_form, $fields);
foreach ($address_form as $field_id => $field_name) {
$validate_field_name = "validate_" . $field_id;
$validate_field_value = $field_name['extra_opts']['validation'][1];
echo "<input type='hidden' name='{$validate_field_name}' value='{$validate_field_value}'/>";
}
?>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn" name="save_address" onclick="listAddress(); return false;" ><i class="icon-ok"></i> <?php
echo _t('SAVE_ADDRESS');
?>
</button>
<a class="btn" id="close_address_frm" href="#address_field"><i class="icon-remove"></i> <?php
echo _t('CLOSE');
?>
</a>
</div></div>
<?php
}
示例2: array
</button>
</div>
</div><input type="hidden" value="<?php
echo $victim_dob;
?>
" name="vdate_of_birth"/>
<input type="hidden" value="<?php
echo $victim_dob_type;
?>
" name="vdob_type"/>
<?php
//$act_form = generate_formarray('act', 'edit');
$act_form['update'] = array('type' => 'submit', 'label' => _t('SAVE'));
$act_form['age_at_time_of_victimisation']['extra_opts']['onclick'] = "getAge(this.form);";
popuate_formArray($act_form, $act);
$fields = shn_form_get_html_fields($act_form);
place_form_elements($act_form, $fields);
?>
<div class="control-group">
<div >
<a class="btn" href="<?php
echo get_url('events', 'vp_list', null, array('eid' => $event_id, 'act_id' => $_GET['act_id'], 'row' => $_GET['row'], 'type' => 'act'));
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a> <span> </span>
<button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
?>
示例3: _t
?>
<h2><?php
echo _t('MICRO_THESAURI_CUSTOMIZATION');
?>
</h2>
<div class="form-container">
<form class="form-horizontal" action="<?php
get_url('admin', 'mt_customization');
?>
" method='get'>
<fieldset>
<input type="hidden" name="mod" value="admin" />
<input type="hidden" name="act" value="mt_customization" />
<?php
$fields = shn_form_get_html_fields($customization_form, false);
?>
<div class='control-group'><?php
echo $fields['mt_select'];
?>
</div>
<div class="control-group">
<div class="controls"><button type="submit" name="change_mt" class="btn" ><i class="icon-ok"></i> <?php
echo _t('SELECT');
?>
</button>
</div></div>
</fieldset>
</form>
</div>
示例4: _t
<?php
global $conf;
?>
<div class='panel'>
<h2><?php
echo _t('MY_PREFERENCES') . " : {$username} ";
?>
</h2>
<?php
$fields = shn_form_get_html_fields($user_form);
?>
<div class="form-container">
<form class="form-horizontal" action='<?php
echo get_url('home', 'edit_user');
?>
' method='post'>
<?php
echo $fields['first_name'];
?>
<?php
echo $fields['last_name'];
?>
<?php
echo $fields['organization'];
?>
<?php
echo $fields['designation'];
?>
示例5: edit_person_information
public function edit_person_information($person_id, $person_form)
{
$person = new Person();
$person->LoadFromRecordNumber($person_id);
$person->LoadRelationships();
$person->LoadAddresses();
popuate_formArray($person_form, $person);
$this->person_form = $person_form;
$this->fields = shn_form_get_html_fields($person_form);
return $person;
}
示例6: act_browse
public function act_browse()
{
global $conf;
include_once APPROOT . 'inc/lib_form.inc';
require_once APPROOT . 'mod/analysis/analysisModule.class.php';
$analysisModule = new analysisModule();
$sqlStatement = $analysisModule->generateSqlforEntity('supporting_docs_meta', null, $_GET, 'browse');
$entity_type_form_results = generate_formarray('supporting_docs_meta', 'browse');
$entity_type_form_results['doc_id']['type'] = 'text';
if (isset($entity_type_form_results['format'])) {
$entity_type_form_results['format']['type'] = 'text';
}
$field_list = array();
foreach ($entity_type_form_results as $field_name => $field) {
// Generates the view's Label list
$field_list[$field['map']['field']] = $field['label'];
}
if (is_array($conf['browsefields']['supporting_docs_meta']) && in_array("eventslinks", $conf['browsefields']['supporting_docs_meta'])) {
$field_list['eventslinks'] = _t('LINKS');
}
foreach ($entity_type_form_results as $fieldName => &$field) {
$field['extra_opts']['help'] = null;
$field['label'] = null;
$field['extra_opts']['clari'] = null;
$field['extra_opts']['value'] = $_GET[$fieldName];
$field['extra_opts']['required'] = null;
$field['extra_opts']['class'] = "input-block-level";
}
$entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
$htmlFields = array();
//iterate through the search fields, checking input values
foreach ($entity_type_form_results as $field_name => $x) {
// Generates the view's Label list
$htmlFields[$field_name] = $entity_fields_html[$field_name];
}
$this->result_pager = Browse::getExecuteSql($sqlStatement);
$this->result_pager->setArgumentEncoder($this->argumentEncoder);
$this->columnValues = $this->result_pager->get_page_data();
$this->columnValues = set_links_in_recordset($this->columnValues, 'supporting_docs_meta');
set_huriterms_in_record_array($entity_type_form_results, $this->columnValues);
foreach ($this->columnValues as $k => $v) {
$linksa = array();
$links = Browse::getDocumentLinks($v['doc_id'], 'event');
foreach ($links as $record) {
$linksa[] = "<a href=\"" . get_record_url($record['record_number'], "event") . "\" >" . $record['record_number'] . "</a>";
}
$this->columnValues[$k]['eventslinks'] = implode("<br/>", $linksa);
}
//rendering the view
$this->columnNames = $field_list;
$this->htmlFields = $htmlFields;
//var_dump($this->columnNames , $this->columnValues , $htmlFields );
}
示例7: get_url
<a class="btn" href="<?php
echo get_url('events', 'coe_list');
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a>
<button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
?>
</button>
</div>
</div><?php
$chain_of_events_form['update'] = array('type' => 'submit', 'label' => _t('SAVE'));
$fields = shn_form_get_html_fields($chain_of_events_form);
include 'chain_of_event_form.php';
?>
<div class="control-group">
<div >
<a class="btn" href="<?php
echo get_url('events', 'coe_list');
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a>
<button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
示例8: get_url
?>
<a class="btn" href="<?php
echo get_url('events', 'intv_list', null, array('eid' => $event_id));
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a>
<button type="submit" name="finish" class="btn btn-primary"><i class="icon-chevron-right icon-white"></i> <?php
echo _t('FINISH');
?>
</button>
</div></div><?php
$fields = shn_form_get_html_fields($intervention_form);
place_form_elements($intervention_form, $fields);
?>
<br />
<div class="control-group">
<div >
<a class="btn" href="<?php
echo get_url('events', 'add_intv_party', null, array('person_id' => $_SESSION['intv']['intv_party']));
?>
"><i class="icon-chevron-left"></i> <?php
echo _t('BACK');
?>
</a>
<?php
/* <button type="submit" name="more" class="btn"><i class="icon-plus"></i> <?php echo _t('ADD_INTERVENTIONS')?></button>*/
?>
示例9: get_url
<a class="btn" href="<?php
echo get_url('events', 'src_list', null, array('eid' => $event_id));
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a>
<button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
?>
</button>
</div>
</div><?php
$information_form['update'] = array('type' => 'submit', 'label' => _t('SAVE'));
$fields = shn_form_get_html_fields($information_form);
place_form_elements($information_form, $fields);
?>
<div class="control-group">
<div >
<a class="btn" href="<?php
echo get_url('events', 'src_list', null, array('eid' => $event_id));
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a>
<button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
?>
示例10: get_url
<a class="btn" href="<?php
echo get_url('events', 'vp_list', null, array('eid' => $event_id, 'inv_id' => $_GET['inv_id'], 'row' => $_GET['row'], 'type' => 'inv'));
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a> <span> </span>
<button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
?>
</button>
</div>
</div><?php
$involvement_form = involvement_form('edit');
popuate_formArray($involvement_form, $inv);
$fields = shn_form_get_html_fields($involvement_form);
place_form_elements($involvement_form, $fields);
?>
<div class="control-group">
<div >
<a class="btn" href="<?php
echo get_url('events', 'vp_list', null, array('eid' => $event_id, 'inv_id' => $_GET['inv_id'], 'row' => $_GET['row'], 'type' => 'inv'));
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a> <span> </span>
<button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
?>
示例11: foreach
foreach ($fields as $field) {
if ($field['type'] == 'hidden') {
continue;
}
?>
<td>
<?php
if ($field['type'] == 'location') {
$id = $field['field_number'] + $count;
$title = $field['label'];
$latitude_property = $field['map']['field'] . '_latitude';
$longitude_property = $field['map']['field'] . '_longitude';
unset($field['label']);
$field['extra_opts']['value'] = array('latitude' => $subformat->{$latitude_property}, 'longitude' => $subformat->{$longitude_property});
$field['extra_opts']['value']['name'] = $id;
$content = shn_form_get_html_fields(array($id => $field), false)[0];
?>
<a href="" class="" data-toggle="modal" data-target="#<?php
echo $id;
?>
">
<?php
echo $subformat->{$latitude_property};
?>
/
<?php
echo $subformat->{$longitude_property};
?>
</a>
<?php
include 'modal.php';
示例12: entity_search_form
public function entity_search_form($entity_type)
{
include_once APPROOT . 'inc/lib_form_util.inc';
if ($entity_type != null) {
switch ($entity_type) {
case 'event':
$this->search_header = _t("EVENT_SEARCH_FORM");
$this->search_form = event_form('search');
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'person':
$this->search_header = _t("PERSON_SEARCH_FORM");
$this->search_form = person_form('search');
$this->address_search_form($this->search_form);
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'victim':
$this->search_header = _t("VICTIM_SEARCH_FORM");
$this->search_form = victim_form('search');
$this->address_search_form($this->search_form);
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'perpetrator':
$this->search_header = _t("PERPETRATOR_SEARCH_FORM");
$this->search_form = perpetrator_form('search');
$this->address_search_form($this->search_form);
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'source':
$this->search_header = _t("SOURCE_SEARCH_FORM");
$this->search_form = source_form('search');
$this->address_search_form($this->search_form);
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'intervening_party':
$this->search_header = _t("INTERVENING_PARTY_SEARCH_FORM");
$this->search_form = intervening_party_form('search');
$this->address_search_form($this->search_form);
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'information':
$this->search_header = _t("INFORMATION_SEARCH_FORM");
$this->search_form = information_form('search');
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'intervention':
$this->search_header = _t("INTERVENTION_SEARCH_FORM");
$this->search_form = intervention_form('search');
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'act':
$this->search_header = _t("ACT_SEARCH_FORM");
$this->search_form = act_form('search');
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'involvement':
$this->search_header = _t("INVOLVEMENT_SEARCH_FORM");
$this->search_form = involvement_form('search');
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
case 'supporting_docs_meta':
$this->search_header = _t("DOCUMENT_SEARCH_FORM");
$this->search_form = document_form('search');
formArrayRefine($this->search_form);
$this->fields = shn_form_get_html_fields($this->search_form);
break;
}
}
}
示例13: _t
' method='post'>
<center>
<?php
if (!$field_help_text) {
?>
<button type="submit" name="update" class='btn btn-primary' ><i class="icon-ok icon-white"></i> <?php
echo _t('UPDATE_FORM');
?>
</button>
<?php
}
?>
</center> <?php
if (isset($entity_form)) {
$fields1 = shn_form_get_html_fields($entity_form);
}
$file = 'field_customization_' . $sub_act . '.php';
if (file_exists(APPROOT . 'mod/admin/tpls/' . $file)) {
include_once $file;
} else {
throw new shn404Exception();
}
?>
<center>
<?php
if (!$field_help_text) {
?>
<button type="submit" name="update" class='btn btn-primary' ><i class="icon-ok icon-white"></i> <?php
echo _t('UPDATE_FORM');
示例14: searchResult
protected function searchResult()
{
include_once APPROOT . 'inc/lib_form.inc';
require_once APPROOT . 'mod/analysis/analysisModule.class.php';
$analysisModule = new analysisModule();
$sqlStatement = $analysisModule->generateSqlforEntity('supporting_docs_meta', null, $_POST, 'search');
$entity_type_form_results = generate_formarray('supporting_docs_meta', 'browse');
$entity_type_form_results['doc_id']['type'] = 'text';
$field_list = array();
foreach ($entity_type_form_results as $field_name => $field) {
$field_list[$field['map']['field']] = $field['label'];
}
foreach ($entity_type_form_results as $fieldName => &$field) {
$field['extra_opts']['help'] = null;
$field['label'] = null;
$field['extra_opts']['clari'] = null;
$field['extra_opts']['value'] = $_GET[$fieldName];
$field['extra_opts']['required'] = null;
}
$entity_fields_html = shn_form_get_html_fields($entity_type_form_results);
$htmlFields = array();
//iterate through the search fields, checking input values
foreach ($entity_type_form_results as $field_name => $x) {
// Generates the view's Label list
$htmlFields[$field_name] = $entity_fields_html[$field_name];
}
$result_pager = Browse::getExecuteSql($sqlStatement);
$columnValues = $result_pager->get_page_data();
$columnValues = set_links_in_recordset($columnValues, 'supporting_docs_meta');
set_huriterms_in_record_array($entity_type_form_results, $columnValues);
//rendering the view
$columnNames = $field_list;
$this->htmlFields = $htmlFields;
if ($columnValues != null && count($columnValues)) {
$result_pager->render_post_pages();
shn_form_get_html_doc_search_ctrl($columnNames, $columnValues, $htmlFields);
$result_pager->render_post_pages();
} else {
shnMessageQueue::addInformation(_t('NO_RECORDS_WERE_FOUND_'));
echo shnMessageQueue::renderMessages();
}
}
示例15: get_url
<a class="btn" href="<?php
echo get_url('events', 'get_event');
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a>
<button type="submit" class="btn btn-primary" name="save" ><i class="icon-ok icon-white"></i> <?php
echo _t('SAVE');
?>
</button>
</div>
</div> <?php
$fields = shn_form_get_html_fields($event_form);
?>
<?php
$fields = place_form_elements($event_form, $fields);
?>
<div class="control-group">
<div >
<a class="btn" href="<?php
echo get_url('events', 'get_event');
?>
"><i class="icon-remove-circle"></i> <?php
echo _t('CANCEL');
?>
</a>
<button type="submit" class="btn btn-primary" name="save" ><i class="icon-ok icon-white"></i> <?php