Add "Admin" tab to the registrar console

This tab will set the "allowedTlds", but might have other functionality in the
future.

It is based on (branches from) the security-settings tab, because I'm copying the functionality of the "whitelisted IPs" to the "allowed TLDs": they are both lists of "arbitrary" strings that you can remove from and add to.

There are a lot of moving parts in this CL, because of how all the different elements need to interact, and how intertwined they are (for example, we need to disable the admin-settings view for non admins both in the soy and in the JS code)

It's really time to refactor the console given all we've learned... :/

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220373443
This commit is contained in:
guyben 2018-11-06 16:23:46 -08:00 committed by jianglai
parent 9b10c116f3
commit 61a5cf307e
11 changed files with 274 additions and 4 deletions

View file

@ -24,6 +24,7 @@ closure_css_library(
closure_css_library(
name = "registrar_lib",
srcs = [
"admin-settings.css",
"contact-settings.css",
"contact-us.css",
"dashboard.css",

View file

@ -0,0 +1,58 @@
/** Admin Settings */
div#tlds div.tld {
width: 209px;
}
#newTld {
width: 187px;
margin-left: 0.5em;
}
div#tlds div.tld input,
div#tlds div.tld button[type=button] {
height: 27px;
line-height: 27px;
background: #ebebeb;
vertical-align: top;
border: none;
border-bottom: solid 3px white;
}
div#tlds div.tld input {
width: 169px;
margin: 0;
padding: 0;
color: #555;
padding-left: 5px ! important;
}
div#tlds.editing div.tld input[readonly] {
margin-left: 0.5em;
}
div#tlds.editing div.tld button[type=button] {
display: inline-block;
float: right;
margin-left: -2px;
width: 30px;
min-width: 30px;
height: 30px;
color: grey;
font-size: 1.1em;
}
div#tlds.editing div.tld button[type=button]:hover {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
div#tlds.editing div.tld button[type=button] i {
font-style: normal;
}
div#tlds.editing .kd-errormessage {
margin-left: 0.5em;
}