Migrated the last of the bulk modals to the new ajax-modal
This commit is contained in:
@@ -220,28 +220,41 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<?php if ($client_url) { ?>
|
<?php if ($client_url) { ?>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignLocationModal">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_bulk_assign_location.php?<?= $client_url ?>"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Assign Location
|
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Assign Location
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditPhoneModal">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_bulk_edit_phone.php"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-phone-alt mr-2"></i>Set Phone Number
|
<i class="fas fa-fw fa-phone-alt mr-2"></i>Set Phone Number
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditDepartmentModal">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_bulk_edit_department.php"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-users mr-2"></i>Set Department
|
<i class="fas fa-fw fa-users mr-2"></i>Set Department
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkEditRoleModal">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_bulk_edit_role.php"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-user-shield mr-2"></i>Set Roles
|
<i class="fas fa-fw fa-user-shield mr-2"></i>Set Roles
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkAssignTagsModal">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_bulk_assign_tags.php"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-tags mr-2"></i>Assign Tags
|
<i class="fas fa-fw fa-tags mr-2"></i>Assign Tags
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#bulkSendEmailModal">
|
<a class="dropdown-item ajax-modal" href="#"
|
||||||
|
data-modal-url="modals/contact/contact_bulk_email.php"
|
||||||
|
data-modal-size="lg"
|
||||||
|
data-bulk="true">
|
||||||
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send Email
|
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send Email
|
||||||
</a>
|
</a>
|
||||||
<?php if ($archived) { ?>
|
<?php if ($archived) { ?>
|
||||||
@@ -545,15 +558,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($client_url) { require_once "modals/contact/contact_bulk_assign_location.php"; } ?>
|
|
||||||
<?php require_once "modals/contact/contact_bulk_edit_phone.php"; ?>
|
|
||||||
<?php require_once "modals/contact/contact_bulk_edit_department.php"; ?>
|
|
||||||
<?php require_once "modals/contact/contact_bulk_edit_role.php"; ?>
|
|
||||||
<?php require_once "modals/contact/contact_bulk_assign_tags.php"; ?>
|
|
||||||
<?php require_once "modals/contact/contact_bulk_email.php"; ?>
|
|
||||||
</form>
|
</form>
|
||||||
<?php require_once "../includes/filter_footer.php";
|
<?php require_once "../includes/filter_footer.php"; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -563,7 +569,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
require_once "modals/contact/contact_export.php";
|
require_once "modals/contact/contact_export.php";
|
||||||
if ($client_url) {
|
if ($client_url) {
|
||||||
require_once "modals/contact/contact_invite.php";
|
//require_once "modals/contact/contact_invite.php";
|
||||||
require_once "modals/contact/contact_import.php";
|
require_once "modals/contact/contact_import.php";
|
||||||
}
|
}
|
||||||
require_once "../includes/footer.php";
|
require_once "../includes/footer.php";
|
||||||
|
|||||||
@@ -1,43 +1,56 @@
|
|||||||
<div class="modal" id="bulkAssignLocationModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Bulk Assign Location</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
<div class="form-group">
|
$client_id = intval($_GET['client_id']);
|
||||||
<label>Location</label>
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
|
||||||
</div>
|
|
||||||
<select class="form-control select2" name="bulk_location_id">
|
|
||||||
<option value="">- Select Location -</option>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
$count = count($selected_ids);
|
||||||
while ($row = mysqli_fetch_array($sql)) {
|
|
||||||
$location_id = intval($row['location_id']);
|
|
||||||
$location_name = nullable_htmlentities($row['location_name']);
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $location_id; ?>"><?php echo $location_name; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
ob_start();
|
||||||
</div>
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-map-marker-alt mr-2"></i>Assign Location to <strong><?= $count ?></strong> Contacts</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Location</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-map-marker-alt"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
<select class="form-control select2" name="bulk_location_id">
|
||||||
|
<option value="">- Select Location -</option>
|
||||||
|
<?php
|
||||||
|
|
||||||
</div>
|
$sql = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_archived_at IS NULL AND location_client_id = $client_id ORDER BY location_name ASC");
|
||||||
|
while ($row = mysqli_fetch_array($sql)) {
|
||||||
|
$location_id = intval($row['location_id']);
|
||||||
|
$location_name = nullable_htmlentities($row['location_name']);
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $location_id; ?>"><?php echo $location_name; ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<div class="modal-footer">
|
</select>
|
||||||
<button type="submit" name="bulk_assign_contact_location" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="bulk_assign_contact_location" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign Location</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,48 +1,61 @@
|
|||||||
<div class="modal" id="bulkAssignTagsModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-tags mr-2"></i>Bulk Assign Tags</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
require_once '../../../includes/modal_header.php';
|
||||||
<input type="hidden" name="bulk_remove_tags" value="0">
|
|
||||||
|
|
||||||
<div class="form-group form-check">
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
<input type="checkbox" class="form-check-input" name="bulk_remove_tags" value="1">
|
|
||||||
<label class="form-check-label text-danger">Remove Existing Tags</label>
|
$count = count($selected_ids);
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-tags mr-2"></i>Assign Tags for <strong><?= $count ?></strong> Contacts</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<input type="hidden" name="bulk_remove_tags" value="0">
|
||||||
|
|
||||||
|
<div class="form-group form-check">
|
||||||
|
<input type="checkbox" class="form-check-input" name="bulk_remove_tags" value="1">
|
||||||
|
<label class="form-check-label text-danger">Remove Existing Tags</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Tags</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
<select class="form-control select2" name="bulk_tags[]" data-placeholder="Add some tags" multiple>
|
||||||
|
<?php
|
||||||
|
|
||||||
<div class="form-group">
|
$sql_tags_select = mysqli_query($mysqli, "SELECT * FROM tags WHERE tag_type = 3 ORDER BY tag_name ASC");
|
||||||
<label>Tags</label>
|
while ($row = mysqli_fetch_array($sql_tags_select)) {
|
||||||
<div class="input-group">
|
$tag_id_select = intval($row['tag_id']);
|
||||||
<div class="input-group-prepend">
|
$tag_name_select = nullable_htmlentities($row['tag_name']);
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
|
?>
|
||||||
</div>
|
<option value="<?php echo $tag_id_select; ?>"><?php echo $tag_name_select; ?></option>
|
||||||
<select class="form-control select2" name="bulk_tags[]" data-placeholder="Add some tags" multiple>
|
<?php } ?>
|
||||||
<?php
|
|
||||||
|
|
||||||
$sql_tags_select = mysqli_query($mysqli, "SELECT * FROM tags WHERE tag_type = 3 ORDER BY tag_name ASC");
|
</select>
|
||||||
while ($row = mysqli_fetch_array($sql_tags_select)) {
|
|
||||||
$tag_id_select = intval($row['tag_id']);
|
|
||||||
$tag_name_select = nullable_htmlentities($row['tag_name']);
|
|
||||||
?>
|
|
||||||
<option value="<?php echo $tag_id_select; ?>"><?php echo $tag_name_select; ?></option>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="bulk_assign_contact_tags" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="bulk_assign_contact_tags" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Assign Tags</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,31 +1,43 @@
|
|||||||
<div class="modal" id="bulkEditDepartmentModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Bulk Set Department / Group</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
<label>Department / Group</label>
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
$count = count($selected_ids);
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
|
ob_start();
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="bulk_department" placeholder="Department or group" maxlength="200">
|
?>
|
||||||
</div>
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-users mr-2"></i>Set Department / Group for <strong><?= $count ?></strong> Contacts</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<label>Department / Group</label>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-users"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="text" class="form-control" name="bulk_department" placeholder="Department or group" maxlength="200">
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="bulk_edit_contact_department" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="bulk_edit_contact_department" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set Department</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,31 +1,43 @@
|
|||||||
<div class="modal" id="bulkEditPhoneModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-phone-alt mr-2"></i>Bulk Set Phone Number</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
<label>Phone</label>
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
$count = count($selected_ids);
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
|
ob_start();
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control" name="bulk_phone" placeholder="Phone Number" maxlength="200">
|
?>
|
||||||
</div>
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-phone-alt mr-2"></i>Set Phone Number for <strong><?= $count ?></strong> Contacts</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<label>Phone</label>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-phone"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="text" class="form-control" name="bulk_phone" placeholder="Phone Number" maxlength="200">
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="bulk_edit_contact_phone" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="bulk_edit_contact_phone" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set Phone Number</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,49 +1,59 @@
|
|||||||
<div class="modal" id="bulkEditRoleModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-user-shield mr-2"></i>Bulk Set Roles</h5>
|
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
require_once '../../../includes/modal_header.php';
|
||||||
|
|
||||||
<input type="hidden" name="bulk_contact_important" value="0">
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
<input type="hidden" name="bulk_contact_billing" value="0">
|
|
||||||
<input type="hidden" name="bulk_contact_technical" value="0">
|
|
||||||
|
|
||||||
<div class="form-group">
|
$count = count($selected_ids);
|
||||||
<div class="custom-control custom-checkbox">
|
|
||||||
<input type="checkbox" class="custom-control-input" id="bulkContactImportantCheckbox" name="bulk_contact_important" value="1">
|
|
||||||
<label class="custom-control-label" for="bulkContactImportantCheckbox">Important</label>
|
|
||||||
<small class="form-text text-muted">Important Person and pins them to the top of the contact list</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
ob_start();
|
||||||
<div class="custom-control custom-checkbox">
|
|
||||||
<input type="checkbox" class="custom-control-input" id="bulkContactBillingCheckbox" name="bulk_contact_billing" value="1">
|
|
||||||
<label class="custom-control-label" for="bulkContactBillingCheckbox">Billing</label>
|
|
||||||
<small class="form-text text-muted">Receives Invoices and Receipts and has access to billing via the portal</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
?>
|
||||||
<div class="custom-control custom-checkbox">
|
|
||||||
<input type="checkbox" class="custom-control-input" id="bulkContactTechnicalCheckbox" name="bulk_contact_technical" value="1">
|
|
||||||
<label class="custom-control-label" for="bulkContactTechnicalCheckbox">Technical</label>
|
|
||||||
<small class="form-text text-muted">Person to contact for technical related things and has access to all tickets and documents via the portal</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-user-shield mr-2"></i>Set Roles for <strong><?= $count ?></strong> Contacts</h5>
|
||||||
<div class="modal-footer">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<button type="submit" name="bulk_edit_contact_role" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set</button>
|
<span>×</span>
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
<input type="hidden" name="bulk_contact_important" value="0">
|
||||||
|
<input type="hidden" name="bulk_contact_billing" value="0">
|
||||||
|
<input type="hidden" name="bulk_contact_technical" value="0">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" class="custom-control-input" id="bulkContactImportantCheckbox" name="bulk_contact_important" value="1">
|
||||||
|
<label class="custom-control-label" for="bulkContactImportantCheckbox">Important</label>
|
||||||
|
<small class="form-text text-muted">Important Person and pins them to the top of the contact list</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" class="custom-control-input" id="bulkContactBillingCheckbox" name="bulk_contact_billing" value="1">
|
||||||
|
<label class="custom-control-label" for="bulkContactBillingCheckbox">Billing</label>
|
||||||
|
<small class="form-text text-muted">Receives Invoices and Receipts and has access to billing via the portal</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input type="checkbox" class="custom-control-input" id="bulkContactTechnicalCheckbox" name="bulk_contact_technical" value="1">
|
||||||
|
<label class="custom-control-label" for="bulkContactTechnicalCheckbox">Technical</label>
|
||||||
|
<small class="form-text text-muted">Person to contact for technical related things and has access to all tickets and documents via the portal</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="bulk_edit_contact_role" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Set Roles</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
@@ -1,61 +1,73 @@
|
|||||||
<div class="modal" id="bulkSendEmailModal" tabindex="-1">
|
<?php
|
||||||
<div class="modal-dialog modal-lg">
|
|
||||||
<div class="modal-content">
|
require_once '../../../includes/modal_header.php';
|
||||||
<div class="modal-header bg-dark">
|
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-envelope-open mr-2"></i>Bulk Send Email</h5>
|
$selected_ids = array_map('intval', $_GET['selected_ids'] ?? []);
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
|
||||||
<span>×</span>
|
$count = count($selected_ids);
|
||||||
</button>
|
|
||||||
|
ob_start();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-header bg-dark">
|
||||||
|
<h5 class="modal-title"><i class="fa fa-fw fa-envelope-open mr-2"></i>Send Email to <strong><?= $count ?></strong> Contacts</h5>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
|
<span>×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||||
|
<?php foreach ($selected_ids as $id) { ?><input type="hidden" name="contact_ids[]" value="<?= $id ?>"><?php } ?>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<label>From Email / Display Name</label>
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<select type="text" class="form-control select2" name="mail_from">
|
||||||
|
<option value="<?php echo nullable_htmlentities($config_mail_from_email); ?>">
|
||||||
|
<?php echo nullable_htmlentities("$config_mail_from_name - $config_mail_from_email"); ?></option>
|
||||||
|
<option value="<?php echo nullable_htmlentities($config_invoice_from_email); ?>">
|
||||||
|
<?php echo nullable_htmlentities("$config_invoice_from_name - $config_invoice_from_email"); ?></option>
|
||||||
|
<option value="<?php echo nullable_htmlentities($config_quote_from_email); ?>">
|
||||||
|
<?php echo nullable_htmlentities("$config_quote_from_name - $config_quote_from_email"); ?></option>
|
||||||
|
<option value="<?php echo nullable_htmlentities($config_ticket_from_email); ?>">
|
||||||
|
<?php echo nullable_htmlentities("$config_ticket_from_name - $config_ticket_from_email"); ?></option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="form-group col-sm-6">
|
||||||
|
<input type="text" class="form-control" name="mail_from_name" placeholder="From Name" maxlength="255"
|
||||||
<label>From Email / Display Name</label>
|
value="<?php echo nullable_htmlentities($config_mail_from_name); ?>">
|
||||||
<div class="form-row">
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<select type="text" class="form-control select2" name="mail_from">
|
|
||||||
<option value="<?php echo nullable_htmlentities($config_mail_from_email); ?>">
|
|
||||||
<?php echo nullable_htmlentities("$config_mail_from_name - $config_mail_from_email"); ?></option>
|
|
||||||
<option value="<?php echo nullable_htmlentities($config_invoice_from_email); ?>">
|
|
||||||
<?php echo nullable_htmlentities("$config_invoice_from_name - $config_invoice_from_email"); ?></option>
|
|
||||||
<option value="<?php echo nullable_htmlentities($config_quote_from_email); ?>">
|
|
||||||
<?php echo nullable_htmlentities("$config_quote_from_name - $config_quote_from_email"); ?></option>
|
|
||||||
<option value="<?php echo nullable_htmlentities($config_ticket_from_email); ?>">
|
|
||||||
<?php echo nullable_htmlentities("$config_ticket_from_name - $config_ticket_from_email"); ?></option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
|
||||||
<input type="text" class="form-control" name="mail_from_name" placeholder="From Name" maxlength="255"
|
|
||||||
value="<?php echo nullable_htmlentities($config_mail_from_name); ?>">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="text" class="form-control" name="subject" placeholder="Subject" maxlength="255">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<textarea class="form-control tinymce" name="body"
|
|
||||||
placeholder="Type an email in here"></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
<input type="datetime-local" class="form-control" name="queued_at">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" name="send_bulk_mail_now" class="btn btn-primary text-bold"><i class="fas fa-paper-plane mr-2"></i>Send</button>
|
|
||||||
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="text" class="form-control" name="subject" placeholder="Subject" maxlength="255">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<textarea class="form-control tinymce" name="body"
|
||||||
|
placeholder="Type an email in here"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="datetime-local" class="form-control" name="queued_at">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" name="send_bulk_mail_now" class="btn btn-primary text-bold"><i class="fas fa-paper-plane mr-2"></i>Send Emails</button>
|
||||||
|
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../../../includes/modal_footer.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user