diff --git a/files/assets/js/submit_hats.js b/files/assets/js/submit_hats.js index 50eeb3eb6..fa561cf10 100644 --- a/files/assets/js/submit_hats.js +++ b/files/assets/js/submit_hats.js @@ -1,6 +1,5 @@ -function approve_hat(t, name) { - console.log(name) - console.log(`${name}-description`) +function approve_hat(t) { + const name = t.dataset.name postToast(t, `/admin/approve/hat/${name}`, { "description": document.getElementById(`${name}-description`).value, @@ -13,7 +12,8 @@ function approve_hat(t, name) { ); } -function remove_hat(t, name) { +function remove_hat(t) { + const name = t.dataset.name postToast(t, `/remove/hat/${name}`, { }, diff --git a/files/templates/submit_hats.html b/files/templates/submit_hats.html index 9b3282119..29a749600 100644 --- a/files/templates/submit_hats.html +++ b/files/templates/submit_hats.html @@ -82,9 +82,9 @@ {% if v.admin_level >= PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'] or v.id == hat.submitter_id %}