X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/251996aed11c648ecaa30f77383e0384bfadf7a5..b5d95bbf6e8ce2b60c6640cdee5571025524e1a6:/cf_dropdown_option_delete.php diff --git a/cf_dropdown_option_delete.php b/cf_dropdown_option_delete.php index 8ae94567..404896fa 100644 --- a/cf_dropdown_option_delete.php +++ b/cf_dropdown_option_delete.php @@ -44,19 +44,18 @@ if ($request->getMethod() == 'POST') { // Determine field id for redirect. $field_id = CustomFields::getFieldIdForOption($cl_id); if ($request->getParameter('btn_delete')) { - // Delete button pressed. - $res = CustomFields::deleteOption($cl_id); + // Delete button pressed. + $res = CustomFields::deleteOption($cl_id); if ($res) { header("Location: cf_dropdown_options.php?field_id=$field_id"); exit(); - } else { + } else $errors->add($i18n->getKey('error.db')); - } } if ($request->getParameter('btn_cancel')) { - // Cancel button pressed. - header("Location: cf_dropdown_options.php?field_id=$field_id"); - exit(); + // Cancel button pressed. + header("Location: cf_dropdown_options.php?field_id=$field_id"); + exit(); } } else { $option = CustomFields::getOptionName($cl_id); @@ -76,4 +75,3 @@ $smarty->assign('onload', 'onLoad="document.optionDeleteForm.btn_cancel.focus()" $smarty->assign('title', $i18n->getKey('title.cf_delete_dropdown_option')); $smarty->assign('content_page_name', 'cf_dropdown_option_delete.tpl'); $smarty->display('index.tpl'); -?> \ No newline at end of file