feat: Begins vendor views
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Elementary
|
||||
import ElementaryHTMX
|
||||
|
||||
// Form used to login or create a new user.
|
||||
struct UserForm: HTML, Sendable {
|
||||
let context: Context
|
||||
|
||||
@@ -27,25 +28,31 @@ struct UserForm: HTML, Sendable {
|
||||
value: "if(event.detail.successful) this.reset(); toggleContent('float');"
|
||||
)
|
||||
) {
|
||||
input(.type(.text), .id("username"), .name("username"), .placeholder("Username"), .autofocus, .required)
|
||||
br()
|
||||
div(.class("row")) {
|
||||
input(.type(.text), .id("username"), .name("username"), .placeholder("Username"), .autofocus, .required)
|
||||
}
|
||||
if context.showEmailInput {
|
||||
input(.type(.email), .id("email"), .name("email"), .placeholder("Email"), .required)
|
||||
br()
|
||||
div(.class("row")) {
|
||||
input(.type(.email), .id("email"), .name("email"), .placeholder("Email"), .required)
|
||||
}
|
||||
}
|
||||
div(.class("row")) {
|
||||
input(.type(.password), .id("password"), .name("password"), .placeholder("Password"), .required)
|
||||
}
|
||||
input(.type(.password), .id("password"), .name("password"), .placeholder("Password"), .required)
|
||||
br()
|
||||
if context.showConfirmPassword {
|
||||
input(
|
||||
.type(.password),
|
||||
.id("confirmPassword"),
|
||||
.name("confirmPassword"),
|
||||
.placeholder("Confirm Password"),
|
||||
.required
|
||||
)
|
||||
br()
|
||||
div(.class("row")) {
|
||||
input(
|
||||
.type(.password),
|
||||
.id("confirmPassword"),
|
||||
.name("confirmPassword"),
|
||||
.placeholder("Confirm Password"),
|
||||
.required
|
||||
)
|
||||
}
|
||||
}
|
||||
div(.class("row")) {
|
||||
button(.type(.submit), .class("btn-primary")) { context.buttonLabel }
|
||||
}
|
||||
input(.type(.submit), .value(context.buttonLabel))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user