} ?> <form action="" method="post" id="product_form"> <input type="hidden" name="_process" value="save_product" /> <input type="hidden" name="product_id" value="<?php echo $product_id; ?> " /> <?php module_form::set_required(array('fields' => array('name' => 'Name'))); module_form::prevent_exit(array('valid_exits' => array('.submit_button'))); $fieldset_data = array('heading' => array('type' => 'h3', 'title' => 'Product Information'), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array()); $fieldset_data['elements'][] = array('title' => 'Name', 'fields' => array(array('type' => 'text', 'name' => 'name', 'value' => $product['name']))); $fieldset_data['elements'][] = array('title' => 'Category', 'fields' => array(array('type' => 'select', 'name' => 'product_category_id', 'options' => module_product::get_product_categories(), 'options_array_id' => 'product_category_name', 'value' => $product['product_category_id']))); $fieldset_data['elements'][] = array('title' => 'Hours/Quantity', 'fields' => array(array('type' => 'text', 'name' => 'quantity', 'value' => $product['quantity']))); $fieldset_data['elements'][] = array('title' => 'Amount', 'fields' => array(array('type' => 'currency', 'name' => 'amount', 'value' => $product['amount']))); $fieldset_data['elements'][] = array('title' => 'Description', 'fields' => array(array('type' => 'textarea', 'name' => 'description', 'value' => $product['description']))); $types = module_job::get_task_types(); $types['-1'] = _l('Default'); $fieldset_data['elements'][] = array('title' => 'Task Type', 'fields' => array(array('type' => 'select', 'name' => 'default_task_type', 'options' => $types, 'value' => isset($product['default_task_type']) ? $product['default_task_type'] : -1, 'blank' => false))); $fieldset_data['elements'][] = array('title' => 'Billable', 'fields' => array(array('type' => 'checkbox', 'name' => 'billable', 'value' => isset($product['billable']) ? $product['billable'] : 1))); $fieldset_data['elements'][] = array('title' => 'Taxable', 'fields' => array(array('type' => 'checkbox', 'name' => 'taxable', 'value' => isset($product['taxable']) ? $product['taxable'] : 1))); echo module_form::generate_fieldset($fieldset_data); unset($fieldset_data); $form_actions = array('class' => 'action_bar action_bar_center', 'elements' => array(array('type' => 'save_button', 'name' => 'butt_save', 'value' => _l('Save')), array('ignore' => !(int) $product_id, 'type' => 'delete_button', 'name' => 'butt_del', 'value' => _l('Delete')), array('type' => 'button', 'name' => 'cancel', 'value' => _l('Cancel'), 'class' => 'submit_button', 'onclick' => "window.location.href='" . $module->link_open(false) . "';"))); echo module_form::generate_form_actions($form_actions); ?>
<?php /** * Copyright: dtbaker 2012 * Licence: Please check CodeCanyon.net for licence details. * More licence clarification available here: http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca * Package Date: 2015-11-25 02:55:20 * IP Address: 67.79.165.254 */ if (!module_config::can_i('view', 'Settings')) { redirect_browser(_BASE_HREF); } $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array(); $product_categories = module_product::get_product_categories($search); $heading = array('title' => 'Product Categories', 'type' => 'h2', 'main' => true, 'button' => array()); if (module_product::can_i('create', 'Products')) { $heading['button'][] = array('title' => "Create New Category", 'type' => 'add', 'url' => module_product::link_open_category('new')); } print_heading($heading); ?> <form action="" method="post"> <?php /** START TABLE LAYOUT **/ $table_manager = module_theme::new_table_manager(); $columns = array(); $columns['product_name'] = array('title' => _l('Category Name'), 'callback' => function ($product) {