From faa695e86dbbb6ffcbcfe47e64a7e64e99f57a70 Mon Sep 17 00:00:00 2001 From: Eeshan Garg Date: Thu, 24 Jun 2021 15:35:06 -0230 Subject: [PATCH] registration: Collect organization type on sign-up. --- static/styles/portico/portico_signin.css | 13 ++- templates/zerver/register.html | 14 ++++ zerver/forms.py | 1 + zerver/lib/test_classes.py | 2 + .../migrations/0333_alter_realm_org_type.py | 45 ++++++++++ zerver/models.py | 84 ++++++++++++++++++- zerver/tests/test_realm.py | 6 +- zerver/tests/test_signup.py | 2 +- zerver/views/development/registration.py | 4 +- zerver/views/registration.py | 6 +- zilencer/management/commands/populate_db.py | 6 +- 11 files changed, 168 insertions(+), 15 deletions(-) create mode 100644 zerver/migrations/0333_alter_realm_org_type.py diff --git a/static/styles/portico/portico_signin.css b/static/styles/portico/portico_signin.css index 197c6cdc4a..1e46a075c1 100644 --- a/static/styles/portico/portico_signin.css +++ b/static/styles/portico/portico_signin.css @@ -400,7 +400,8 @@ html { input[type="text"], input[type="email"], - input[type="password"] { + input[type="password"], + select { padding: 10px 32px 10px 12px; margin: 25px 0 5px; @@ -458,9 +459,11 @@ html { input[type="text"]:focus + label, input[type="email"]:focus + label, input[type="password"]:focus + label, + select:focus + label, input[type="text"]:valid + label, input[type="email"]:valid + label, - input[type="password"]:valid + label { + input[type="password"]:valid + label, + select:valid + label { left: 0; transform: translateY(0) translateX(0); pointer-events: auto; @@ -470,6 +473,12 @@ html { color: hsl(0, 0%, 27%); } + /* The width of the "Organization name" text box + right above this one is also 326px. */ + select { + width: 326px; + } + p.text-error { display: block; padding: 0; diff --git a/templates/zerver/register.html b/templates/zerver/register.html index bcb3b6ad04..9fb25796a0 100644 --- a/templates/zerver/register.html +++ b/templates/zerver/register.html @@ -47,6 +47,20 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser +
+
+ +
+ + +
+