protected function submitEditPage()
    {
        if ($this->isPosted('delete')) {
            $this->deletePage();
        } else if ($this->isPosted('save') && $this->validateEditPage()) {
            $this->deleteImagesPage();
            if (isset($this->data_page['page_id'])) {
                $this->updatePage();
            } else {
                $this->addPage();
            }
        }
    }