mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-13 18:45:43 +05:00
Merge pull request #1829 from cryptpad/plugin-decrees
Accessibility fixes to Admin UI
This commit is contained in:
commit
806666d1b6
@ -146,6 +146,8 @@ define(req, function(AppConfig, Default, Language) {
|
||||
Messages.admin_addAdminsHint = "Add administrators from their public key or from your contacts list";
|
||||
Messages.admin_addAdminsAdd = "Promote a contact to admin";
|
||||
Messages.admin_addKeyLabel = "Add an admin using their public key";
|
||||
Messages.admin_errorAddKeyLabel = "Add a valid public key";
|
||||
Messages.admin_errorAddAdmins = "Pick a contact to promote to admin";
|
||||
|
||||
Messages.admin_listName = "Admin name";
|
||||
Messages.admin_listKey = "Admin key";
|
||||
|
||||
@ -346,7 +346,9 @@ define([
|
||||
Util.onClickEnter($keyBtn, () => {
|
||||
let val = $keyInput.val().trim();
|
||||
let key = Keys.canonicalize(val);
|
||||
if (!key) { return; }
|
||||
if (!key) {
|
||||
return UI.warn(Messages.admin_errorAddKeyLabel);
|
||||
}
|
||||
// We have a valid key
|
||||
let name = Messages.admin_admin;
|
||||
try {
|
||||
@ -388,6 +390,9 @@ define([
|
||||
let addBtn = blocks.button('primary', 'fa-plus', Messages.tag_add);
|
||||
Util.onClickEnter($(addBtn), () => {
|
||||
var $sel = $(contactsGrid.div).find('.cp-usergrid-user.cp-selected');
|
||||
if (!$sel.length) {
|
||||
return UI.warn(Messages.admin_errorAddAdmins);
|
||||
}
|
||||
nThen((waitFor) => {
|
||||
$sel.each((i, el) => {
|
||||
const $el = $(el);
|
||||
|
||||
@ -64,7 +64,7 @@ define([
|
||||
let prefix = icon.slice(0, icon.indexOf('-'));
|
||||
cls = `.${prefix}.${icon}`;
|
||||
}
|
||||
return h(`i${cls}`);
|
||||
return h(`i${cls}`, { 'aria-hidden': 'true' });
|
||||
};
|
||||
blocks.button = (type, icon, text) => {
|
||||
type = type || 'primary';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user