Add Function Select2 Multiple Capabilities to add ticket watchers in create client ticket

This commit is contained in:
johnnyq 2023-11-08 14:37:03 -05:00
parent eb01e4b4d5
commit 7e2d3c4159
3 changed files with 18 additions and 4 deletions

View File

@ -305,7 +305,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
</div>
<select class="form-control select2" name="tags[]" data-tags="true" data-placeholder="Add some tags" multiple>
<select class="form-control select2" name="tags[]" data-placeholder="Add some tags" multiple>
<?php
$sql_tags_select = mysqli_query($mysqli, "SELECT * FROM tags WHERE tag_type = 1 ORDER BY tag_name ASC");

View File

@ -200,7 +200,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-tags"></i></span>
</div>
<select class="form-control select2" name="tags[]" data-tags="true" data-placeholder="Add some tags" multiple>
<select class="form-control select2" name="tags[]" data-placeholder="Add some tags" multiple>
<?php
$sql_tags_select = mysqli_query($mysqli, "SELECT * FROM tags WHERE tag_type = 1 ORDER BY tag_name ASC");

View File

@ -169,8 +169,22 @@
<div class="form-group">
<label>Watchers</label>
<div class="watchers"></div>
<button type="button" class="btn btn-primary" onclick="addWatcher(this)"><i class="fas fa-fw fa-plus"></i> Add Watcher</button>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-envelope"></i></span>
</div>
<select class="form-control select2" name="watchers[]" data-tags="true" data-placeholder="Enter or select email address" multiple>
<option value="">aa</option>
<?php
$sql = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_client_id = $client_id AND contact_archived_at IS NULL AND contact_email IS NOT NULL ORDER BY contact_email ASC");
while ($row = mysqli_fetch_array($sql)) {
$contact_email = nullable_htmlentities($row['contact_email']);
?>
<option><?php echo $contact_email; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>