protected function submitEditCategory()
    {
        if ($this->isPosted('delete')) {
            $this->deleteCategory();
        } else if ($this->isPosted('save') && $this->validateEditCategory()) {
            $this->deleteImagesCategory();
            if (isset($this->data_category['category_id'])) {
                $this->updateCategory();
            } else {
                $this->addCategory();
            }
        }
    }