Browse Source

User account create/signup removes from app when disabled in .env

develop
Rob Colbert 1 year ago
parent
commit
f05773c2f4
  1. 5
      app/views/components/navbar.pug
  2. 11
      app/views/welcome/home.pug
  3. 57
      app/views/welcome/signup.pug

5
app/views/components/navbar.pug

@ -14,8 +14,9 @@ nav(style="background: #000000;").uk-navbar-container.uk-light
.uk-navbar-right
if !user
ul.uk-navbar-nav
li
a(href="/welcome/signup") SIGN UP
if process.env.DTP_MEMBER_SIGNUP === 'enabled'
li
a(href="/welcome/signup") SIGN UP
li
a(href="/welcome/login") LOGIN
else

11
app/views/welcome/home.pug

@ -10,11 +10,12 @@ block view-content
.uk-margin-medium
div(uk-grid).uk-grid-divider
div(class="uk-width-1-1 uk-width-1-2@m")
.uk-margin-small
.uk-text-large New here?
div Start receiving and attending calls for free by creating a User Account.
a(href="/welcome/signup").uk-button.uk-button-primary.uk-border-rounded Sign Up
if process.env.DTP_MEMBER_SIGNUP === 'enabled'
div(class="uk-width-1-1 uk-width-1-2@m")
.uk-margin-small
.uk-text-large New here?
div Start receiving and attending calls for free by creating a User Account.
a(href="/welcome/signup").uk-button.uk-button-primary.uk-border-rounded Sign Up
div(class="uk-width-1-1 uk-width-1-2@m")
.uk-margin-small
.uk-text-large Returning member?

57
app/views/welcome/signup.pug

@ -3,31 +3,32 @@ block view-content
section.uk-section.uk-section-default.uk-section-small
.uk-container
h1= site.name
form(method="POST", action="/welcome/signup").uk-form
.uk-card.uk-card-secondary.uk-card-small
.uk-card-header
h1.uk-card-title Create Account
.uk-card-body
.uk-margin
label(for="email").uk-form-label Email address
input(id="email", name="email", type="email", required, placeholder="Enter email address").uk-input
.uk-margin
label(for="username").uk-form-label Username
input(id="username", name="username", type="text", maxlength="30", required, placeholder="Enter username").uk-input
div(uk-grid)
.uk-width-1-2
.uk-margin
label(for="password").uk-form-label Password
input(id="password", name="password", type="password", required, placeholder="Enter password").uk-input
.uk-width-1-2
.uk-margin
label(for="password-verify").uk-form-label Verify password
input(id="password-verify", name="passwordVerify", type="password", required, placeholder="Verify password").uk-input
.uk-card-footer
div(uk-grid).uk-flex-right
.uk-width-auto
a(href="/welcome").uk-button.uk-button-default Cancel
.uk-width-auto
button(type="submit").uk-button.uk-button-primary Create Account
if process.env.DTP_MEMBER_SIGNUP === 'enabled'
form(method="POST", action="/welcome/signup").uk-form
.uk-card.uk-card-secondary.uk-card-small
.uk-card-header
h1.uk-card-title Create Account
.uk-card-body
.uk-margin
label(for="email").uk-form-label Email address
input(id="email", name="email", type="email", required, placeholder="Enter email address").uk-input
.uk-margin
label(for="username").uk-form-label Username
input(id="username", name="username", type="text", maxlength="30", required, placeholder="Enter username").uk-input
div(uk-grid)
.uk-width-1-2
.uk-margin
label(for="password").uk-form-label Password
input(id="password", name="password", type="password", required, placeholder="Enter password").uk-input
.uk-width-1-2
.uk-margin
label(for="password-verify").uk-form-label Verify password
input(id="password-verify", name="passwordVerify", type="password", required, placeholder="Verify password").uk-input
.uk-card-footer
div(uk-grid).uk-flex-right
.uk-width-auto
a(href="/welcome").uk-button.uk-button-default Cancel
.uk-width-auto
button(type="submit").uk-button.uk-button-primary Create Account
else
.uk-text-large.uk-text-center New account signup is disabled.
Loading…
Cancel
Save