Add navigation helpers to Account and Profile sections
This commit is contained in:
parent
166295e046
commit
a82a658922
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#backups-enable-all {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/account/settings">Settings</a> » <span class="top-links-title">Backup Enrollment</span></div>
|
||||
<div id="backups-enable-all">
|
||||
<h2>Backup Enrollment</h2>
|
||||
<p>This will enable the Linode Backup Service for <strong><span class="linode-count"></span></strong> Linodes, for a total additional cost of <strong>$<span id="cost"></span></strong>/month.</p>
|
||||
|
@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
#billing-history {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
#current {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">Billing History</span></div>
|
||||
<div id="billing-history">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#cancel {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
#cancel-note {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">Cancel Account</span></div>
|
||||
<div id="cancel">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#contact {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody tr td:first-of-type {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">Contact Info</span></div>
|
||||
<div id="contact">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#creditcard {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">Update Credit Card</span></div>
|
||||
<div id="creditcard">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/account/billing_history">Billing History</a> » <span class="top-links-title">Invoice</span></div>
|
||||
<div id="invoice">
|
||||
<table id="invoice-table" class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#invoice {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
#invoice-table td:nth-of-type(4) {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">Make a Payment</span></div>
|
||||
<div id="make-a-payment">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -34,7 +34,7 @@ input[type="number"] {
|
||||
}
|
||||
|
||||
#make-a-payment {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#app {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/account/oauth_apps">OAuth Apps</a> » <span class="top-links-title">Add/Edit OAuth App</span></div>
|
||||
<div id="app">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">OAuth Apps</span></div>
|
||||
<div id="oauth_apps">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
#oauth_apps {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
td:nth-of-type(6) {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/account/billing_history">Billing History</a> » <span class="top-links-title">Payment</span></div>
|
||||
<div id="paymentreceipt">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
#paymentreceipt {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
#paymentreceipt p {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/account/billing_history">Billing History</a> » <span class="top-links-title">Yearly Payments</span></div>
|
||||
<div id="paymentreceiptyear">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
#paymentreceiptyear {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
#paymentreceiptyear p {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">Settings</span></div>
|
||||
<div id="settings">
|
||||
<p id="saved">Settings saved!</p>
|
||||
<table class="lmc-table">
|
||||
|
@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
#settings {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#add {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
.lmc-table>tbody:not(.lmc-tbody-head)>tr>td:first-of-type {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <a href="/profile/api">API Keys</a> » <span class="top-links-title">Add</span></div>
|
||||
<div id="add">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#api {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
.app-img {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <span class="top-links-title">API Keys</span></div>
|
||||
<div id="api">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#auth {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <span class="top-links-title">Password & Authentication</span></div>
|
||||
<div id="auth">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <span class="top-links-title">Lish Settings</span></div>
|
||||
<div id="lish">
|
||||
<p id="settings-saved">Settings saved.</p>
|
||||
<table class="lmc-table">
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#lish {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
#keys {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <span class="top-links-title">Referrals</span></div>
|
||||
<div id="referrals">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
#referrals {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#add {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <a href="/profile/ssh">SSH Keys</a> » <span class="top-links-title">Add</span></div>
|
||||
<div id="add">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <span class="top-links-title">SSH Keys</span></div>
|
||||
<div id="ssh">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/profile_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/profile">My Profile</a> » <a href="/profile/ssh">SSH Keys</a> » <span class="top-links-title">Remove</span></div>
|
||||
<div id="remove">
|
||||
<p>Are you sure you want to delete the key <strong id="label"></strong>?</p>
|
||||
<button disabled id="remove-button" type="button">Yes, delete this sucker</button>
|
||||
|
@ -18,5 +18,5 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#remove {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
#ssh {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
td:nth-of-type(4) {
|
||||
|
@ -48,5 +48,5 @@
|
||||
}
|
||||
|
||||
#twofactor {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#add {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/user">Users</a> » <span class="top-links-title">Add</span></div>
|
||||
<div id="add">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#edit {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
tbody:not(.lmc-tbody-head) tr td:first-of-type {
|
||||
|
@ -25,6 +25,7 @@ import { settings, elements, apiGet, apiPut, md5, parseParams, setupHeader } fro
|
||||
elements.restrictedNo = "restricted-no";
|
||||
elements.restrictedYes = "restricted-yes";
|
||||
elements.saveButton = "save-button";
|
||||
elements.topUserLabel = "top-user-label";
|
||||
elements.user = "user";
|
||||
elements.userLabel = "user-label";
|
||||
|
||||
@ -38,6 +39,7 @@ import { settings, elements, apiGet, apiPut, md5, parseParams, setupHeader } fro
|
||||
ui.restrictedNo = {};
|
||||
ui.restrictedYes = {};
|
||||
ui.saveButton = {};
|
||||
ui.topUserLabel = {};
|
||||
ui.user = {};
|
||||
ui.userLabel = {};
|
||||
|
||||
@ -98,10 +100,12 @@ import { settings, elements, apiGet, apiPut, md5, parseParams, setupHeader } fro
|
||||
ui.restrictedNo = document.getElementById(elements.restrictedNo);
|
||||
ui.restrictedYes = document.getElementById(elements.restrictedYes);
|
||||
ui.saveButton = document.getElementById(elements.saveButton);
|
||||
ui.topUserLabel = document.getElementById(elements.topUserLabel);
|
||||
ui.user = document.getElementById(elements.user);
|
||||
ui.userLabel = document.getElementById(elements.userLabel);
|
||||
|
||||
// Populate username where we need it
|
||||
ui.topUserLabel.innerHTML = data.params.user;
|
||||
ui.userLabel.innerHTML = data.params.user;
|
||||
ui.pwReset.href += data.params.user;
|
||||
document.title += " - " + data.params.user;
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/user">Users</a> » <span id="top-user-label" class="top-links-title"></span></div>
|
||||
<div id="edit">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -18,7 +18,7 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#grants {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
|
@ -40,6 +40,7 @@ import { settings, elements, apiGet, apiPut, parseParams, setupHeader } from "/g
|
||||
elements.grantTables.stackscript = "ss-grants";
|
||||
elements.grantTables.volume = "volume-grants";
|
||||
elements.modifyLV = "modify-lv";
|
||||
elements.topUserLink = "top-user-link";
|
||||
elements.updateButton = "update-button";
|
||||
|
||||
// Data received from API calls
|
||||
@ -66,6 +67,7 @@ import { settings, elements, apiGet, apiPut, parseParams, setupHeader } from "/g
|
||||
ui.grantTables.stackscript = {};
|
||||
ui.grantTables.volume = {};
|
||||
ui.modifyLV = {};
|
||||
ui.topUserLink = {};
|
||||
ui.updateButton = {};
|
||||
|
||||
// Creates a row for a grant table
|
||||
@ -254,10 +256,13 @@ import { settings, elements, apiGet, apiPut, parseParams, setupHeader } from "/g
|
||||
for (var i in ui.grantTables)
|
||||
ui.grantTables[i] = document.getElementById(elements.grantTables[i]);
|
||||
ui.modifyLV = document.getElementById(elements.modifyLV);
|
||||
ui.topUserLink = document.getElementById(elements.topUserLink);
|
||||
ui.updateButton = document.getElementById(elements.updateButton);
|
||||
|
||||
// Populate username where we need it
|
||||
document.title += " - " + data.params.user;
|
||||
ui.topUserLink.href = "/user/edit?user=" + data.params.user;
|
||||
ui.topUserLink.innerHTML = data.params.user;
|
||||
|
||||
// Attach event handlers
|
||||
ui.updateButton.addEventListener("click", handleUpdate);
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/user">Users</a> » <a id="top-user-link"></a> » <span class="top-links-title">Grants</span></div>
|
||||
<div id="grants">
|
||||
<h2>Global Grants</h2>
|
||||
<input id="create-linode" type="checkbox" /> <label for="create-linode">Can add Linodes to this account ($)</label><br />
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <span class="top-links-title">Users</span></div>
|
||||
<div id="user">
|
||||
<table class="lmc-table">
|
||||
<thead>
|
||||
|
@ -27,6 +27,7 @@ along with Linode Manager Classic. If not, see <https://www.gnu.org/licenses/>.
|
||||
<!--#include virtual="/include/header.html"-->
|
||||
<!--#include virtual="/include/account_subnav.html"-->
|
||||
<div id="main-content" class="wrapper">
|
||||
<div id="top-links"><a href="/account">Account</a> » <a href="/user">Users</a> » <a id="top-user-link" href=""></a> » <span class="top-links-title">Remove</span></div>
|
||||
<div id="remove">
|
||||
<p>Are you sure you want to delete the user '<span id="user-label"></span>'?</p>
|
||||
<button id="delete-button" type="button">Yes, Delete!</button> <button id="cancel-button" type="button">Cancel</button>
|
||||
|
@ -18,5 +18,5 @@
|
||||
@import url('/global.css');
|
||||
|
||||
#remove {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import { settings, elements, apiDelete, parseParams, setupHeader } from "/global
|
||||
// Element names specific to this page
|
||||
elements.cancelButton = "cancel-button";
|
||||
elements.deleteButton = "delete-button";
|
||||
elements.topUserLink = "top-user-link";
|
||||
elements.userLabel = "user-label";
|
||||
|
||||
// Data received from API calls
|
||||
@ -31,6 +32,7 @@ import { settings, elements, apiDelete, parseParams, setupHeader } from "/global
|
||||
var ui = {};
|
||||
ui.cancelButton = {};
|
||||
ui.deleteButton = {};
|
||||
ui.topUserLink = {};
|
||||
ui.userLabel = {};
|
||||
|
||||
// Click handler for delete button
|
||||
@ -66,9 +68,12 @@ import { settings, elements, apiDelete, parseParams, setupHeader } from "/global
|
||||
// Get element references
|
||||
ui.cancelButton = document.getElementById(elements.cancelButton);
|
||||
ui.deleteButton = document.getElementById(elements.deleteButton);
|
||||
ui.topUserLink = document.getElementById(elements.topUserLink);
|
||||
ui.userLabel = document.getElementById(elements.userLabel);
|
||||
|
||||
// Populate username where we need it
|
||||
ui.topUserLink.href = "/user/edit?user=" + data.params.user;
|
||||
ui.topUserLink.innerHTML = data.params.user;
|
||||
ui.userLabel.innerHTML = data.params.user;
|
||||
|
||||
// Attach event handlers
|
||||
|
@ -28,5 +28,5 @@ td:nth-of-type(4) {
|
||||
}
|
||||
|
||||
#user {
|
||||
padding: 15px 15px 15px;
|
||||
padding: 0 15px 15px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user