simplex/views/user_new.moon
Paul Liverman III 63990d006a Squashed 'applications/users/' content from commit 1269ef3
git-subtree-dir: applications/users
git-subtree-split: 1269ef321098783e8699978b9c4dea9592d8f3e3
2018-04-23 05:52:25 -07:00

27 lines
854 B
Plaintext

import Widget from require "lapis.html"
import autoload from require "locator"
import settings from autoload "utility"
class extends Widget
content: =>
form {
action: @url_for "user_new", nil, redirect: @params.redirect
method: "POST"
enctype: "multipart/form-data"
}, ->
p "Username: "
input type: "text", name: "name", autocomplete: "username"
p "Email: "
input type: "email", name: "email"
p "Password: "
input type: "password", name: "password"
br!
if settings["users.require-recaptcha"]
div class: "g-recaptcha", "data-sitekey": settings["users.recaptcha-sitekey"]
input type: "hidden", name: "csrf_token", value: @csrf_token
input type: "submit"
if settings["users.require-recaptcha"]
script src: "https://www.google.com/recaptcha/api.js"