mirror of
https://github.com/itflow-org/itflow
synced 2026-03-06 22:04:51 +00:00
Per-invoice notifications
Hide per-invoice notif setting if invoice notifications are globally disabled
This commit is contained in:
@@ -1414,14 +1414,12 @@ if (isset($_GET['recurring_invoice_email_notify'])) {
|
|||||||
mysqli_query($mysqli,"UPDATE recurring SET recurring_invoice_email_notify = $recurring_invoice_email_notify WHERE recurring_id = $recurring_id");
|
mysqli_query($mysqli,"UPDATE recurring SET recurring_invoice_email_notify = $recurring_invoice_email_notify WHERE recurring_id = $recurring_id");
|
||||||
|
|
||||||
if ($recurring_invoice_email_notify) {
|
if ($recurring_invoice_email_notify) {
|
||||||
$_SESSION['alert_message'] = "EMail Notifications On";
|
$_SESSION['alert_message'] = "Email Notifications On";
|
||||||
} else {
|
} else {
|
||||||
$_SESSION['alert_type'] = "error";
|
$_SESSION['alert_type'] = "error";
|
||||||
$_SESSION['alert_message'] = "EMail Notifications Off";
|
$_SESSION['alert_message'] = "Email Notifications Off";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
header("Location: " . $_SERVER["HTTP_REFERER"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,13 +98,17 @@ if (isset($_GET['recurring_id'])) {
|
|||||||
<div class="card-header d-print-none">
|
<div class="card-header d-print-none">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<?php if($recurring_invoice_email_notify) { ?>
|
<?php if ($config_recurring_auto_send_invoice) { ?>
|
||||||
<a href="post.php?recurring_invoice_email_notify=0&recurring_id=<?php echo $recurring_id; ?>" class="btn btn-primary"><i class="fas fa-fw fa-bell mr-2"></i>Email Notify</a>
|
<?php if ($recurring_invoice_email_notify) { ?>
|
||||||
<?php } else { ?>
|
<a href="post.php?recurring_invoice_email_notify=0&recurring_id=<?php echo $recurring_id; ?>" class="btn btn-primary"><i class="fas fa-fw fa-bell mr-2"></i>Email Notify</a>
|
||||||
<a href="post.php?recurring_invoice_email_notify=1&recurring_id=<?php echo $recurring_id; ?>" class="btn btn-outline-danger"><i class="fas fa-fw fa-bell-slash mr-2"></i>Email Notify</a>
|
<?php } else { ?>
|
||||||
|
<a href="post.php?recurring_invoice_email_notify=1&recurring_id=<?php echo $recurring_id; ?>" class="btn btn-outline-danger"><i class="fas fa-fw fa-bell-slash mr-2"></i>Email Notify</a>
|
||||||
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="dropdown dropleft text-center float-right">
|
<div class="dropdown dropleft text-center float-right">
|
||||||
<button class="btn btn-secondary" type="button" data-toggle="dropdown">
|
<button class="btn btn-secondary" type="button" data-toggle="dropdown">
|
||||||
|
|||||||
Reference in New Issue
Block a user