Archived
1
0

add scoped mods to mod ui

This commit is contained in:
Jeff Becker 2017-11-02 08:37:31 -04:00
parent 5367b53570
commit 6d0ff936ce
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
3 changed files with 23 additions and 5 deletions

View File

@ -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() {
@ -71,7 +85,7 @@ function get_nntp_username() {
function get_nntp_passwd() {
var e = document.getElementById("nntpchan_nntp_passwd");
return e.value;
return e.value;
}
function nntpchan_admin_nntp(method) {

View File

@ -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>

View File

@ -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>