Update Text component to use declared params
This commit is contained in:
parent
0c617627fc
commit
ea52283dfb
@ -1,14 +1,15 @@
|
||||
// ReflectedForm instance
|
||||
//param $form
|
||||
declare
|
||||
// ReflectedForm instance
|
||||
param $form
|
||||
|
||||
// The name of the form field
|
||||
//param $name
|
||||
// The name of the form field
|
||||
param $name
|
||||
|
||||
// Optional. Override the type of the textbox.
|
||||
// Example values: 'password'
|
||||
// For email, prefer instead to have an Email validator on the field
|
||||
// and this will be set automatically.
|
||||
//TODO param $type = "text"
|
||||
// Optional. Override the type of the textbox.
|
||||
// Example values: 'password'
|
||||
// For email, prefer instead to have an Email validator on the field
|
||||
// and this will be set automatically.
|
||||
param $type = "text"
|
||||
|
||||
|
||||
set $minlength = None
|
||||
@ -16,7 +17,6 @@ set $maxlength = None
|
||||
set $required = None
|
||||
set $email = None
|
||||
set $pattern = None
|
||||
set $type = "text"
|
||||
|
||||
for $validator in $form.info.field_validators($name)
|
||||
match $validator
|
||||
|
@ -1,10 +1,9 @@
|
||||
BarePage
|
||||
form {method = "POST"}
|
||||
Text {$form, name = "username"}
|
||||
"UN"
|
||||
input {type = "text", name = "username"}
|
||||
Text {$form, name = "username"}
|
||||
" PW"
|
||||
input {type = "password", name = "password"}
|
||||
Text {$form, name = "password", type = "password"}
|
||||
" "
|
||||
input {type = "hidden", name = "xsrf", value = $xsrf_token}
|
||||
button {type = "submit"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user