public function act_subformat_edit()
 {
     $this->subformat_name = $_GET['subformat'];
     $this->subid = $_GET['subid'];
     $subformats_model = new SubformatsModel($this->subformat_name);
     if (isset($_POST['save'])) {
         $subformat = $subformats_model->fill_from_post('edit');
         $subformat->record_number = $this->get_entity_id();
         $subformat->_saved = true;
         $subformat->SaveAll();
         set_redirect_header($_GET['mod'], 'subformat_list', null, array(subformat => $this->subformat_name));
     }
     $this->fields = generate_formarray($this->subformat_name, 'edit', false, true);
     $subformat = $subformats_model->get_one($_GET['subid']);
     popuate_formArray($this->fields, $subformat);
     foreach ($data as $key => $value) {
         $this->fields[$key]['extra_opts']['value'] = $value;
     }
 }
Beispiel #2
0
?>
</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>&nbsp;</span>

                    <button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php 
echo _t('SAVE');
Beispiel #3
0
            ?>
</a><?php 
            echo '<br />';
            echo '<br />';
            $source_form = person_form('view');
            popuate_formArray($source_form, $source);
            shn_form_get_html_labels($source_form, false);
            break;
        case 'information':
            echo "<h3>" . _t('VIEW_INFORMATION_RECORD') . "</h3>";
            ?>
	
			<br />
			<a class="btn " href="<?php 
            echo get_url('events', 'edit_information', null, array('eid' => $event_id, 'information_id' => $_GET['information_id']));
            ?>
"><i class="icon-edit"></i> <?php 
            echo _t('EDIT_THIS_INFORMATION');
            ?>
</a>
			<br /><br />
<?php 
            $information_form = generate_formarray('information', 'view');
            popuate_formArray($information_form, $information);
            shn_form_get_html_labels($information_form, false);
            break;
    }
}
?>
</div>
            ?>
</a>
<?php 
            echo '<br />';
            echo '<br />';
            $person_form = person_form('view');
            popuate_formArray($person_form, $intervening_party);
            shn_form_get_html_labels($person_form, false);
            break;
        case 'intv':
            echo "<h3>" . _t('VIEW_INTERVENTION_RECORD') . "</h3>";
            echo '<br />';
            ?>
<a class="btn " href="<?php 
            echo get_url('events', 'edit_intv', null, array('intervention_id' => $intervention->intervention_record_number));
            ?>
"><i class="icon-edit "></i> <?php 
            echo _t('EDIT_THIS_INTERVENTION');
            ?>
</a><?php 
            echo '<br />';
            echo '<br />';
            $intervention_form = intervention_form('view');
            popuate_formArray($intervention_form, $intervention);
            shn_form_get_html_labels($intervention_form, false);
            break;
    }
}
?>
</div>
    ?>
</a>
            <?php 
}
?>
        <a class="btn btn-grey" href="<?php 
echo get_url('docu', 'delete_document', null, array('doc_id' => $_GET['doc_id']));
?>
"><i class="icon-trash"></i>  <?php 
echo _t('DELETE_DOCUMENT');
?>
</a>
        <?php 
if ($supporting_docs->uri == null) {
    shnMessageQueue::addInformation('No attachment found to this Document.');
}
?>
    

        <br /><br />
        <?php 
$document_form = document_form('view');
$document_form['file_size'] = array('type' => 'text', 'label' => 'File Size', 'map' => array('entity' => 'supporting_docs_meta', 'field' => 'file_size'));
popuate_formArray($document_form, $supporting_docs_meta);
shn_form_get_html_labels($document_form, false);
?>

    </div>
</div>
<?php 
//set_redirect_header('docu','view_document');
        ?>
                <a class="btn btn-primary" href="<?php 
        echo get_url('events', 'add_information', null, array('eid' => $event_id));
        ?>
"><i class="icon-chevron-right icon-white"></i> <?php 
        echo _t('NEXT');
        ?>
</a>
<?php 
    }
    ?>

        </div></div>
        <?php 
    $person_form = person_form('view');
    popuate_formArray($person_form, $source);
    shn_form_get_html_labels($person_form, false);
}
?>
    <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>

Beispiel #7
0
    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> 
                                <button type='submit' class='btn btn-primary' ><i class="icon-chevron-right icon-white"></i> <?php 
    echo _t('NEXT');
    ?>
</button>
                            </div></div></div>

                    <?php 
} else {
    $ad_form = generate_formarray($ad_type, 'edit');
    popuate_formArray($ad_form, $ad);
    $fields = shn_form_get_html_fields($ad_form);
    place_form_elements($ad_form, $fields);
    ?>
                    <input type="hidden" name="ad_type" value='<?php 
    echo $ad_type;
    ?>
' />
                    <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');
    ?>
                        class="icon-edit"></i> <?php 
echo _t('CONTINUE_EDITING_THIS_EVENT_RECORD');
?>
</a>
                <?php 
if (isFormatActive('act')) {
    ?>
                    <a href="<?php 
    get_url('events', 'vp_list', null);
    ?>
" class="btn btn-primary"><i
                            class="icon-plus icon-white"></i> <?php 
    echo _t('ADD_VICTIMS_AND_PERPETRATORS_TO_THIS_EVENT');
    ?>
                    </a>
                <?php 
}
?>

            </div>
        </div>
    </div>

    <?php 
$event_form = event_form('view');
popuate_formArray($event_form, $event);
shn_form_get_html_labels($event_form, false);
?>
    <br/>
</div>
        ?>
                    <a class="btn btn-primary" href="<?php 
        echo get_url('events', 'add_intv', null, array('eid' => $event_id));
        ?>
"><i class="icon-chevron-right icon-white"></i> <?php 
        echo _t('NEXT');
        ?>
</a>
                <?php 
    }
    ?>

            </div></div>
        <?php 
    $person_form = person_form('view');
    popuate_formArray($person_form, $intv_party);
    shn_form_get_html_labels($person_form, false);
}
?>
    <div class="control-group">
        <div > 
            <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>
          
            <?php 
if (acl_is_entity_allowed_boolean('person', 'create')) {
Beispiel #10
0
            </tr>	

            <?php 
    }
    ?>
        </tbody>
    </table>
<?php 
    $coe_form = generate_formarray('chain_of_events', 'view');
    $coe = new ChainOfEvents();
    foreach ($related_events as $key => $record) {
        echo '<br /><h3>' . _t('CHANE_OF_EVENTS_') . ++$key . ' : ' . get_mt_term($record['type_of_chain_of_events']) . '</h3>';
        echo '<h3>' . _t('RELATED_EVENT') . $key . ' : ' . $record['event_title'] . '</h3><br />';
        //print victim details
        $coe->LoadFromRecordNumber($record['coe_id']);
        $coe->LoadRelationships();
        popuate_formArray($coe_form, $coe);
        shn_form_get_html_labels($coe_form, false);
        echo "<br class='page_break' />";
    }
}
?>
</div>
<?php 
if ($conf['print_event_sidebar']) {
    echo "<div class='span3'>" . $conf['print_event_sidebar'] . "</div>";
}
?>
    

</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>&nbsp;</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>&nbsp;</span>
         <button type="submit" class="btn btn-primary" name="update" ><i class="icon-ok icon-white"></i> <?php 
echo _t('SAVE');
Beispiel #12
0
            echo _t('MORE_ABOUT_THIS_EVENT');
            ?>
</a><?php 
            echo "<br />";
            echo "<br />";
            $event_form = event_form('view');
            popuate_formArray($event_form, $related_event);
            shn_form_get_html_labels($event_form, false);
            break;
        case 'coe_view':
            echo "<h3>" . _t('VIEW_CHAIN_OF_EVENTS_RECORD') . "</h3>&nbsp;";
            echo "<br />";
            ?>
<a class="btn " href="<?php 
            echo get_url('events', 'edit_coe', null, array('coeid' => $_GET['coe_id']));
            ?>
"><i class="icon-edit "></i> <?php 
            echo _t('EDIT_THIS_CHAIN_OF_EVENT');
            ?>
</a><?php 
            echo "<br />";
            echo "<br />";
            $chain_of_events_form = chain_of_events_form('view');
            popuate_formArray($chain_of_events_form, $coe);
            shn_form_get_html_labels($chain_of_events_form, false);
            break;
    }
}
?>
</div>
 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;
 }
Beispiel #14
0
        $person->LoadRelationships();
        $bio->LoadFromRecordNumber($record['biographic_details_record_number']);
        $bio->LoadRelationships();
        popuate_formArray($bio_form, $bio);
        shn_form_get_html_labels($bio_form, false);
        echo '<br />';
    }
    foreach ($biographics_reverse as $key => $record) {
        echo '<br /><h3>' . ++$key . '. ' . _t('PERSON_NAME') . ' : ' . $record['person_name'] . '</h3><br />';
        //print victim details
        $person->LoadFromRecordNumber($record['person']);
        $person->LoadRelationships();
        $bio->LoadFromRecordNumber($record['biographic_details_record_number']);
        $bio->reverse();
        $bio->LoadRelationships();
        popuate_formArray($bio_form, $bio);
        shn_form_get_html_labels($bio_form, false);
        echo '<br />';
    }
}
?>
</div>
<?php 
if ($conf['print_person_sidebar']) {
    echo "<div class='span3'>" . $conf['print_person_sidebar'] . "</div>";
}
?>
    

</div>
        ?>
<a class="btn  btn-primary" href="<?php 
        echo get_url('events', 'add_act', null, array('eid' => $event_id, 'victim' => $victim->person_record_number));
        ?>
"><i class="icon-chevron-right icon-white"></i> <?php 
        echo _t('NEXT');
        ?>
</a>
<?php 
    }
    ?>
 
            </div></div>
<?php 
    $person_form = person_form('view');
    popuate_formArray($person_form, $victim);
    shn_form_get_html_labels($person_form, false);
}
?>

    <div class="control-group">
            <div >
                <a class="btn" href="<?php 
echo get_url('events', 'vp_list', null, array('eid' => $event_id));
?>
"><i class="icon-remove-circle"></i> <?php 
echo _t('CANCEL');
?>
</a>

Beispiel #16
0
        <a class="btn btn-grey" href="<?php 
    echo get_url('person', 'delete_person', null);
    ?>
"><i class="icon-trash"></i>  <?php 
    echo _t('DELETE_THIS_PERSON');
    ?>
</a>
    <?php 
}
?>
        <br />
    <br />
    <?php 
$person_form = person_form('view');
unset($person_form['person_addresses']);
popuate_formArray($person_form, $person);
shn_form_get_html_labels($person_form, false);
if (count($biographics) != 0 || count($biographics_reverse) != 0) {
    ?>
        <br />
        <br />

        <table class="table table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th><?php 
    echo _t('CONTEXTUAL_INFORMATION');
    ?>
</th>
                </tr>
            </thead>
    if (isset($perpetrator)) {
        ?>
<a class="btn btn-primary" href="<?php 
        echo get_url('events', 'add_involvement', null, array('eid' => $event_id, 'perpetrator' => $perpetrator->person_record_number));
        ?>
"><i class="icon-chevron-right icon-white"></i> <?php 
        echo _t('NEXT');
        ?>
</a>
<?php 
    }
    ?>
            </div></div>
<?php 
    $person_form = person_form('view');
    popuate_formArray($person_form, $perpetrator);
    shn_form_get_html_labels($person_form, false);
}
?>
<div class="control-group">
            <div > 
                <a class="btn" href="<?php 
echo get_url('events', 'vp_list', null, array('eid' => $event_id));
?>
"><i class="icon-remove-circle"></i> <?php 
echo _t('Add Perpetrator later');
?>
</a>

<a class="btn" href="<?php 
echo get_url('events', 'add_perpetrator', 'new_perpetrator', array('eid' => $event_id));
 function act_biography_list()
 {
     include_once APPROOT . 'inc/lib_form_util.inc';
     include_once APPROOT . 'inc/lib_uuid.inc';
     $biography_form = biographic_form('view');
     $this->person_form = person_form('view');
     $this->pid = $_SESSION['pid'];
     if ($this->pid != null) {
         $this->person = $this->person_information($this->pid, $this->person_form);
         $_SESSION['ppid'] = $this->pid;
     }
     switch ($_GET['type']) {
         case 'bd':
             popuate_formArray($biography_form, $this->biographic_details);
             $this->biography_form = $biography_form;
             break;
         case 'rp':
             $this->related_person = new Person();
             if (isset($_GET['reverse'])) {
                 $this->related_person->LoadFromRecordNumber($this->biographic_details->person);
             } else {
                 $this->related_person->LoadFromRecordNumber($this->biographic_details->related_person);
             }
             $this->related_person->LoadRelationships();
             $person_form = person_form('view');
             popuate_formArray($person_form, $this->related_person);
             $this->related_person_form = $person_form;
             break;
         default:
     }
     $this->biography_list($this->pid);
 }