Skip to content

Commit

Permalink
Functionality for share access button on modal.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Jul 22, 2024
1 parent 758a935 commit 96f1a44
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions scripts/appsec/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,29 @@ $("#remove-btn").click(()=> {
);
});

$("#share-btn").click(()=> {
$.post(
"side/apps.php?share_app",
{
api_key: App.appKey,
api_id: App.appId,
uname: $("#share-username").val(),
pword: CryptoJS.MD5($("#share-password").val()).toString(),
email: App.email
},
(r)=> {
hideError("share");
if(r.result == "1") {
$("#share-access-modal").modal("hide");
$("#access-shared-modal").modal("show");
return;
}

showError("share", r.message);
}
);
});

$("#show-delete-modal").click(()=> {
$("#deletion-username").val("");
$("#deletion-password").val("");
Expand Down

0 comments on commit 96f1a44

Please sign in to comment.