add scoped mods to mod ui
This commit is contained in:
parent
5367b53570
commit
6d0ff936ce
@ -47,21 +47,35 @@ function get_board_target() {
|
||||
return e.value;
|
||||
}
|
||||
|
||||
function get_mod_board_target() {
|
||||
var e = document.getElementById("nntpchan_mod_board_target");
|
||||
return e.value || null;
|
||||
}
|
||||
|
||||
function get_key_target() {
|
||||
var e = document.getElementById("nntpchan_key_target");
|
||||
return e.value;
|
||||
}
|
||||
|
||||
function nntpchan_key_del() {
|
||||
nntpchan_admin("pubkey.del", {
|
||||
var args = {
|
||||
pubkey: get_key_target()
|
||||
});
|
||||
};
|
||||
if(board) {
|
||||
args.newsgroup = board;
|
||||
}
|
||||
nntpchan_admin("pubkey.del", args);
|
||||
}
|
||||
|
||||
function nntpchan_key_add() {
|
||||
nntpchan_admin("pubkey.add", {
|
||||
var args = {
|
||||
pubkey: get_key_target()
|
||||
});
|
||||
};
|
||||
var board = get_mod_board_target();
|
||||
if(board) {
|
||||
args.newsgroup = board;
|
||||
}
|
||||
nntpchan_admin("pubkey.add", args);
|
||||
}
|
||||
|
||||
function get_nntp_username() {
|
||||
|
@ -34,6 +34,8 @@
|
||||
<div>
|
||||
<label for="nntpchan_board_target">{{#i18n.Translations}}{{pubkey_label}}{{/i18n.Translations}}:</label>
|
||||
<input type="text" id="nntpchan_key_target" />
|
||||
<label for="nntpchan_mod_group_target">{{#i18n.Translations}}{{board_name_title}}{{/i18n.Translations}}</label>
|
||||
<input id="nntpchan_mod_group_target" type="text" />
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_key_add()">{{#i18n.Translations}}{{add_key_prompt}}{{/i18n.Translations}}</button>
|
||||
|
@ -35,6 +35,8 @@
|
||||
<div>
|
||||
<label for="nntpchan_board_target">{{#i18n.Translations}}{{pubkey_label}}{{/i18n.Translations}}:</label>
|
||||
<input type="text" id="nntpchan_key_target" />
|
||||
<label for="nntpchan_mod_group_target">{{#i18n.Translations}}{{board_name_title}}{{/i18n.Translations}}</label>
|
||||
<input id="nntpchan_mod_group_target" type="text" />
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="nntpchan_key_add()">{{#i18n.Translations}}{{add_key_prompt}}{{/i18n.Translations}}</button>
|
||||
|
Reference in New Issue
Block a user