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