<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'); ?> </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
public function act_edit_involvement() { $this->vp_list = Browse::getVpList($this->event_id); $involvement_form = involvement_form('edit'); if (isset($_POST['update'])) { $status = shn_form_validate($involvement_form); if ($status) { $inv = new Involvement(); $inv->LoadFromRecordNumber($_REQUEST['inv_id']); $inv->LoadRelationships(); $inv->LoadManagementData(); form_objects($involvement_form, $inv); $inv->SaveAll(); set_redirect_header('events', 'vp_list', null, array('inv_id' => $inv->involvement_record_number, 'type' => 'inv')); return; } } //if an involvement is requested if (isset($_GET['inv_id'])) { $this->set_inv(); } //if an act is requested if (isset($_GET['act_id'])) { $this->set_act(); } }
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; } } }
echo "<h3>" . _t('ADDITIONAL_DETAILS') . "</h3> "; $ad_form = generate_formarray($ad_type, 'view'); popuate_formArray($ad_form, $ad); shn_form_get_html_labels($ad_form, false); } break; case 'inv': echo "<h3>" . _t('VIEW_INVOLVEMENT_RECORD') . "</h3> "; echo "<br />"; ?> <a class="btn" href="<?php echo get_url('events', 'edit_involvement', null, array('eid' => $_GET['eid'], 'row' => $_GET['row'], 'inv_id' => $_GET['inv_id'])); ?> "><i class="icon-edit"></i> <?php echo _t('EDIT_THIS_INVOLVEMENT'); ?> </a><?php echo "<br />"; echo "<br />"; $involvement_form = involvement_form('view'); popuate_formArray($involvement_form, $inv); shn_form_get_html_labels($involvement_form, false); break; } ?> </div> <?php } ?> </div>