]> wagnertech.de Git - timetracker.git/blobdiff - cf_dropdown_option_delete.php
Siwtched to using isPost() function
[timetracker.git] / cf_dropdown_option_delete.php
index c53f16eb15e69de986bf21d268fbf78e04fe081b..270d56f5a031d6cea8afe6a15d48f3df8c54d43a 100644 (file)
@@ -39,7 +39,7 @@ if (!ttAccessCheck(right_manage_team)) {
 $cl_id = $request->getParameter('id');
 $form = new Form('optionDeleteForm');
 
-if ($request->getMethod() == 'POST') {
+if ($request->isPost()) {
 
   // Determine field id for redirect.
   $field_id = CustomFields::getFieldIdForOption($cl_id);
@@ -62,7 +62,7 @@ if ($request->getMethod() == 'POST') {
   if (false === $option)
     $errors->add($i18n->getKey('error.db'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
     $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete')));
     $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));