Commit | Line | Data |
---|---|---|
bda4a4be | 1 | <?php |
de77377e TM |
2 | $this->process_http_request_post('new', false, false, "$URL_INTERNAL/2"); |
3 | switch($SUBPATH[0]) { | |
bda4a4be TM |
4 | default: case 1: |
5 | echo $this->render_form_add('model'); | |
6 | break; | |
7 | case 2: | |
8 | $model_id = trim($_GET['last']); | |
9 | $columns = $this->db->get_columns('item'); | |
10 | $selectbox = $this->db->columns_get_selectbox($columns, 'item'); | |
11 | ||
12 | $current = array(array( | |
13 | 'model_id' => $model_id, | |
14 | 'item_quantity' => 1, | |
15 | 'status_id' => 1 | |
16 | )); | |
17 | ||
18 | $action = $_SERVER['SCRIPT_NAME'].'/item/new'; | |
19 | echo $this->html->render_insert_form('item', $columns, $selectbox, $current, false, $action); | |
20 | break; | |
21 | } |