message for when a payment method is deleted (#201)

This commit is contained in:
Davi Alexandre 2024-03-08 19:27:19 -03:00 committed by GitHub
parent b543fa3763
commit 23e3a189d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 4 deletions

View File

@ -8,10 +8,10 @@ if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
$deleteQuery = "DELETE FROM payment_methods WHERE id = :paymentMethodId";
$deleteStmt = $db->prepare($deleteQuery);
$deleteStmt->bindParam(':paymentMethodId', $paymentMethodId, SQLITE3_INTEGER);
if ($deleteStmt->execute()) {
$success['success'] = true;
$success['message'] = translate('payment_method_added_successfuly', $i18n);
$success['message'] = translate('payment_method_removed', $i18n);
$json = json_encode($success);
header('Content-Type: application/json');
echo $json;
@ -26,4 +26,4 @@ if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
}
$db->close();
?>
?>

View File

@ -141,6 +141,7 @@ $i18n = [
"add_custom_payment" => "Add Custom Payment Method",
"payment_method_name" => "Payment Method Name",
"payment_method_added_successfuly" => "Payment method added successfully",
"payment_method_removed" => "Payment method removed",
"disable" => "Disable",
"enable" => "Enable",
"rename_payment_method" => "Rename Payment Method",

View File

@ -139,6 +139,7 @@ $i18n = [
"add_custom_payment" => "Adicionar um método de pagamento personalizado",
"payment_method_name" => "Nome do método de pagamento",
"payment_method_added_successfuly" => "Método de pagamento adicionado com sucesso",
"payment_method_removed" => "Método de pagamento excluído",
"disable" => "Desativar",
"enable" => "Ativar",
"rename_payment_method" => "Renomear método de pagamento",
@ -166,7 +167,7 @@ $i18n = [
"category_in_use" => "Essa categoria está em uso em uma assinatura e não pode ser removida",
"failed_remove_category" => "Erro ao remover categoria",
"category_saved" => "Categoria salva",
"category_removed" => "Category excluída",
"category_removed" => "Categoria excluída",
"sort_order_saved" => "Direção de ordenação salva",
// Currency
"currency_saved" => "foi salva.",