/**
  * @see Form::save()
  */
 public function save()
 {
     ACPForm::save();
     // save
     $this->warning->update($this->title, $this->points, $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7);
     $this->saved();
     // show success message
     WCF::getTPL()->assign('success', true);
 }
 /**
  * @see Action::execute()
  */
 public function execute()
 {
     parent::execute();
     // check permission
     WCF::getUser()->checkPermission('admin.user.infraction.canDeleteWarning');
     // delete warning
     $this->warning->delete();
     $this->executed();
     // forward to list page
     HeaderUtil::redirect('index.php?page=WarningList&deletedWarningID=' . $this->warningID . '&packageID=' . PACKAGE_ID . SID_ARG_2ND_NOT_ENCODED);
     exit;
 }
 /**
  * @see Form::save()
  */
 public function save()
 {
     parent::save();
     // save
     WarningEditor::create($this->title, $this->points, $this->expiresHour * 3600 + $this->expiresDay * 86400 + $this->expiresWeek * 86400 * 7);
     $this->saved();
     // reset values
     $this->title = '';
     $this->points = $this->expiresWeek = $this->expiresDay = $this->expiresHour = 0;
     // show success message
     WCF::getTPL()->assign('success', true);
 }