Commit | Line | Data |
---|---|---|
bda4a4be | 1 | <?php |
89f6ee24 | 2 | die(T('Hors service!')); |
de77377e TM |
3 | $this->process_http_request_post('new', false, false, "$URL_INTERNAL/2"); |
4 | switch($SUBPATH[0]) { | |
bda4a4be TM |
5 | default: case 1: |
6 | echo $this->render_form_add('model'); | |
7 | break; | |
d0e7939c | 8 | case 2: //TODO: reuse assistants/store for this step |
bda4a4be TM |
9 | $model_id = trim($_GET['last']); |
10 | $columns = $this->db->get_columns('item'); | |
11 | $selectbox = $this->db->columns_get_selectbox($columns, 'item'); | |
12 | ||
13 | $current = array(array( | |
14 | 'model_id' => $model_id, | |
15 | 'item_quantity' => 1, | |
253705f2 TM |
16 | 'status_id' => 1, |
17 | 'item_author' => $this->db->auth->get_user_id() | |
bda4a4be TM |
18 | )); |
19 | ||
20 | $action = $_SERVER['SCRIPT_NAME'].'/item/new'; | |
21 | echo $this->html->render_insert_form('item', $columns, $selectbox, $current, false, $action); | |
22 | break; | |
23 | } |