From 3a68740ff7aa183c256087b125b4c6331fde475b Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 20 Sep 2016 15:21:26 -0400 Subject: [PATCH] Better handling of namespace validation to fix a number of issues - Fixes a bug which allows for underscores at the beginning of namespaces: Fixes #1849 - Allows dots and dashes for newer Docker clients: Fixes #1188 - Has the UI display better messaging associated with namespace entry --- static/css/core-ui.css | 6 ++++ static/css/directives/ui/user-setup.css | 12 +++++++ static/directives/namespace-input.html | 5 +++ static/directives/signup-form.html | 13 +++++++- static/js/app.js | 2 +- static/js/directives/ui/namespace-input.js | 32 ++++++++++++++++++ static/js/pages/new-organization.js | 7 ++-- static/partials/new-organization.html | 17 ++++++---- test/test_api_usage.py | 2 +- test/test_util.py | 38 +++++++++++++++++++++- util/validation.py | 13 +++++--- 11 files changed, 126 insertions(+), 21 deletions(-) create mode 100644 static/directives/namespace-input.html create mode 100644 static/js/directives/ui/namespace-input.js diff --git a/static/css/core-ui.css b/static/css/core-ui.css index bd482b37e..e61db79a7 100644 --- a/static/css/core-ui.css +++ b/static/css/core-ui.css @@ -1479,6 +1479,12 @@ a:focus { font-size: 18px; } +.co-alert.thin:after { + top: 9px; + font-size: 13px; + left: 19px; +} + .co-alert-popin-warning { margin-left: 10px; } diff --git a/static/css/directives/ui/user-setup.css b/static/css/directives/ui/user-setup.css index 02a5bbf49..8d98035cd 100644 --- a/static/css/directives/ui/user-setup.css +++ b/static/css/directives/ui/user-setup.css @@ -94,4 +94,16 @@ .user-setup-element .user-footer-links a:last-child:after { content: ""; +} + +.user-setup-element .expandable { + height: 0px; + transition: height ease-in-out 250ms; + margin-top: 16px; + margin-bottom: 10px; + overflow: hidden; +} + +.user-setup-element .expandable.expanded { + height: 60px; } \ No newline at end of file diff --git a/static/directives/namespace-input.html b/static/directives/namespace-input.html new file mode 100644 index 000000000..def68b57f --- /dev/null +++ b/static/directives/namespace-input.html @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/static/directives/signup-form.html b/static/directives/signup-form.html index 584dfd1af..698661d50 100644 --- a/static/directives/signup-form.html +++ b/static/directives/signup-form.html @@ -9,7 +9,16 @@
- + + + @@ -20,6 +29,8 @@ + +