Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guest Link Sharing #1047

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,7 @@
]
];

$mail = addToMailQueue($mysqli, $data);

if ($mail !== true) {
mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Mail', notification = 'Failed to send email to $item_email'");
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Mail', log_action = 'Error', log_description = 'Failed to send email to $item_email regarding $subject. $item_mail', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
}
addToMailQueue($mysqli, $data);

}

Expand Down
8 changes: 8 additions & 0 deletions js/share_modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ function populateShareModal(client_id, item_type, item_ref_id) {
// Show form and generate button
document.getElementById("div_share_link_form").hidden = false;
document.getElementById("div_share_link_generate").hidden = false;

$(document).ready(function() {
$('#share_email').select2({
tags: true,
placeholder: 'Select or type a value',
allowClear: true
});
});
}

function generateShareLink() {
Expand Down
3 changes: 2 additions & 1 deletion share_modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<option value="">-Select a contact-</option>
<?php

$sql_client_contacts_select = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_client_id = $client_id AND contact_email <> '' ORDER BY contact_name ASC");
$sql_client_contacts_select = mysqli_query($mysqli, "SELECT * FROM contacts WHERE contact_client_id = $client_id AND contact_email <> '' AND contact_archived_at IS NULL ORDER BY contact_name ASC");
while ($row = mysqli_fetch_array($sql_client_contacts_select)) {
$contact_id_select = intval($row['contact_id']);
$contact_name_select = nullable_htmlentities($row['contact_name']);
Expand Down Expand Up @@ -91,3 +91,4 @@
</div>
</div>
</div>

Loading