mirror of
https://github.com/itflow-org/itflow
synced 2026-09-02 21:05:13 +00:00
Add Quick Send Quote / Invoice to replicate the old single click to Send Email
This commit is contained in:
@@ -224,9 +224,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</a>
|
||||
<?php if (!empty($config_smtp_provider)) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<button type="submit" class="dropdown-item" form="quickSendQuote"
|
||||
name="quote_id" value="<?= $quote_id ?>">
|
||||
<i class="fas fa-fw fa-bolt me-2"></i>Quick Send
|
||||
</button>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/quote/quote_email.php?quote_id=<?= $quote_id ?>">
|
||||
<i class="fas fa-fw fa-paper-plane me-2"></i>Email
|
||||
<i class="fas fa-fw fa-paper-plane me-2"></i>Email<span class="text-muted">...</span>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php if (lookupUserPermission("module_sales") >= 3) { ?>
|
||||
@@ -254,5 +258,23 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if (lookupUserPermission("module_sales") >= 2 && !empty($config_smtp_provider)) { ?>
|
||||
<?php
|
||||
/*
|
||||
* One hidden form for the whole page, targeted by the Quick Send buttons via
|
||||
* their form="" attribute. It cannot be a form per button: agent/invoices.php
|
||||
* wraps its table in a bulkActions form, and a nested form is invalid
|
||||
* HTML - the browser drops the inner one and the click silently submits the
|
||||
* bulk action instead. The button carries the id as its own name/value, which
|
||||
* a submit button contributes to the submission.
|
||||
*/
|
||||
?>
|
||||
<form id="quickSendQuote" action="post.php" method="post" class="d-none">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
<input type="hidden" name="email_quote" value="1">
|
||||
<input type="hidden" name="quick_send" value="1">
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
require_once "../includes/footer.php";
|
||||
|
||||
Reference in New Issue
Block a user