Updated Share Model to have an Expire selection instead of selecting a date and time, also share link will now email a chosen contact that has a valid email with the secure link, along with notifications when link is clicked. The Link now adds the https:// in the beginning for easy copy paste

This commit is contained in:
johnnyq
2023-05-25 17:35:09 -04:00
parent 29dd0f6dee
commit d3281ecd18
3 changed files with 57 additions and 8 deletions

View File

@@ -21,13 +21,14 @@ function generateShareLink() {
let item_note = document.getElementById("share_note").value;
let item_views = document.getElementById("share_views").value;
let item_expires = document.getElementById("share_expires").value;
let contact_email = document.getElementById("share_email").value;
// Check values are provided
if (item_views && item_expires && item_note) {
// Send a GET request to ajax.php as ajax.php?share_generate_link=true....
jQuery.get(
"ajax.php",
{share_generate_link: 'true', client_id: client_id, type: item_type, id: item_ref_id, note: item_note ,views: item_views, expires: item_expires},
{share_generate_link: 'true', client_id: client_id, type: item_type, id: item_ref_id, note: item_note ,views: item_views, expires: item_expires, contact_email},
function(data) {
// If we get a response from ajax.php, parse it as JSON