function _loadFormEditCategory() { parent::_loadFormEditCategory(); // TODO: Change the autogenerated stub $this->add($this->form->text(array('label' => 'Nhập tên', 'name' => 'cat_name', 'id' => 'cat_name', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên nhóm nhân viên', 'value' => $this->f['cat_name']))); $this->add($this->form->ajaxUploadFile(array('label' => 'Ảnh đại diện', 'name' => 'cat_picture', 'id' => 'cat_picture', 'browse_id' => 'browse_img', 'viewer_id' => 'viewer_img', 'value' => $this->f['cat_picture']))); $this->add($this->form->textarea(array('label' => 'Ghi chú', 'name' => 'cat_note', 'id' => 'cat_note', 'value' => $this->f['cat_note']))); }
function _loadFormEditCategory() { parent::_loadFormEditCategory(); // TODO: Change the autogenerated stub $this->add($this->form->text(array('label' => 'Nhập tên', 'name' => 'cus_cat_name', 'id' => 'cus_cat_name', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên nhóm khách hàng', 'value' => $this->f['cus_cat_name']))); $this->add($this->form->number(array('label' => 'Tỉ lệ giảm giá', 'name' => 'cus_cat_discount', 'id' => 'cus_cat_discount', 'addon' => '%', 'value' => $this->f['cus_cat_discount']))); $this->add($this->form->number(array('label' => 'Doanh số', 'name' => 'cus_cat_sales', 'id' => 'cus_cat_sales', 'addon' => 'vnđ', 'value' => $this->f['cus_cat_sales']))); $this->add($this->form->ajaxUploadFile(array('label' => 'Ảnh đại diện', 'name' => 'cus_cat_picture', 'id' => 'cus_cat_picture', 'browse_id' => 'browse_img', 'viewer_id' => 'viewer_img', 'value' => get_picture_path($this->f['cus_cat_picture'])))); $this->add($this->form->textarea(array('label' => 'Ghi chú', 'name' => 'cus_cat_note', 'id' => 'cus_cat_note', 'value' => $this->f['cus_cat_note']))); }
function _loadFormEditCategory() { parent::_loadFormEditCategory(); // TODO: Change the autogenerated stub $array_cat = category_type($this->cat_type, 0); $list_cat_parent = array('' => ' -- Là danh mục cha --'); foreach ($array_cat as $cat_i) { $list_cat_parent[$cat_i['cat_id']] = $cat_i['cat_name']; } $this->add($this->form->text(array('label' => 'Nhập tên', 'name' => 'cat_name', 'id' => 'cat_name', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập danh mục thực đơn', 'value' => $this->f['cat_name']))); $this->add($this->form->select(array('label' => 'Danh mục cha', 'name' => 'cat_parent_id', 'id' => 'cat_parent_id', 'option' => $list_cat_parent, 'select' => $this->f['cat_parent_id']))); $this->add($this->form->ajaxUploadFile(array('label' => 'Ảnh đại diện', 'name' => 'cat_picture', 'id' => 'cat_picture', 'browse_id' => 'browse_img', 'viewer_id' => 'viewer_img', 'value' => get_picture_path($this->f['cat_picture'])))); $this->add($this->form->textarea(array('label' => 'Ghi chú', 'name' => 'cat_note', 'id' => 'cat_note', 'extra' => 'style="height:120px;"', 'value' => $this->f['cat_note']))); }
function _loadFormEditCategory() { parent::_loadFormEditCategory(); // TODO: Change the autogenerated stub //kiểm tra quyền edit checkPermission('edit'); global $cat_table; //lấy ra cat_id cần chỉnh sửa $cat_id = getValue('cat_id', 'int', 'POST', 0); //lấy ra data cat id $db_data = new db_query('SELECT * FROM ' . $cat_table . ' WHERE age_id = ' . $cat_id . ' LIMIT 1'); if ($row = mysqli_fetch_assoc($db_data->result)) { extract($row); } else { exit; } $this->add($this->form->text(array('label' => 'Nhập tên', 'name' => 'age_name', 'id' => 'age_name', 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên nhóm khách hàng', 'value' => $this->f['age_name']))); $this->add($this->form->text(array('label' => 'Địa chỉ', 'name' => 'age_address', 'id' => 'age_address', 'value' => $this->f['age_address']))); $this->add($this->form->text(array('label' => 'Điện thoại', 'name' => 'age_phone', 'id' => 'age_phone', 'value' => $this->f['age_phone']))); $this->add($this->form->ajaxUploadFile(array('label' => 'Ảnh đại diện', 'name' => 'age_image', 'id' => 'age_image', 'browse_id' => 'browse_img', 'viewer_id' => 'viewer_img', 'value' => get_picture_path($this->f['age_image'])))); $this->add($this->form->textarea(array('label' => 'Ghi chú', 'name' => 'age_note', 'id' => 'age_note', 'value' => $this->f['age_note']))); }
function _loadFormEditCategory() { parent::_loadFormEditCategory(); // TODO: Change the autogenerated stub }