Skip to content

Instantly share code, notes, and snippets.

@olamedia
Created April 26, 2011 11:54
Show Gist options
  • Save olamedia/942139 to your computer and use it in GitHub Desktop.
Save olamedia/942139 to your computer and use it in GitHub Desktop.
jobResumeController
<?php
class jobResumeController extends controller{
public function initDelete(){
$this->_options['jobResume']->delete();
$this->redirect($this->rel('../..'));
}
public function initEdit(){
$this->_form = new jobResumeForm();
$this->_form->setItem($this->_options['jobResume']);
if ($this->_form->process()){
$this->back();
}
}
public function showEdit(){
echo '<h2 class="action">Редактирование резюме';
echo ' <a title="Удалить" href="'.$this->rel('../delete').'" onClick="return confirm(\'Удалить?\');"><img alt="Удалить" src="'.app()->rel('css/images/cross-button.png').'" /></a>';
echo '</h2>';
echo $this->_form->getFormHtml(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment