Restructured validators, fixed form element rendering
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
note
|
||||
description: "Summary description for {WSF_PHONE_NUMBER_VALIDATOR}."
|
||||
author: ""
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
class
|
||||
WSF_PHONE_NUMBER_VALIDATOR
|
||||
inherit
|
||||
WSF_VALIDATOR[STRING]
|
||||
create
|
||||
make
|
||||
|
||||
feature -- Implementation
|
||||
|
||||
validate(input:STRING):BOOLEAN
|
||||
do
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -20,6 +20,7 @@ feature {NONE}
|
||||
do
|
||||
make (n, "div")
|
||||
add_class ("form-group")
|
||||
c.add_class ("form-control")
|
||||
value_control := c
|
||||
validators := v
|
||||
label := ""
|
||||
@@ -56,11 +57,11 @@ feature --Implementation
|
||||
|
||||
render: STRING
|
||||
local
|
||||
body:STRING
|
||||
body: STRING
|
||||
do
|
||||
body := ""
|
||||
if not label.is_empty then
|
||||
body := "<label class=%"col-lg-10 control-label%" for=%"" + value_control.control_name + "%">" + label + "</label>"
|
||||
body := "<label class=%"col-lg-2 control-label%" for=%"" + value_control.control_name + "%">" + label + "</label>"
|
||||
end
|
||||
body := body + "<div class=%"col-lg-10%">"
|
||||
body := body + value_control.render
|
||||
|
||||
@@ -7,6 +7,13 @@ note
|
||||
deferred class
|
||||
WSF_VALIDATOR [G]
|
||||
|
||||
feature {NONE}
|
||||
|
||||
make (e: STRING)
|
||||
do
|
||||
error := e
|
||||
end
|
||||
|
||||
feature
|
||||
|
||||
validate (input: G): BOOLEAN
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
</option>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="encoder" location="..\..\text\encoder\encoder-safe.ecf"/>
|
||||
<library name="gobo_kernel" location="$ISE_LIBRARY\library\gobo\gobo_kernel-safe.ecf"/>
|
||||
<library name="gobo_lexical" location="$ISE_LIBRARY\library\gobo\gobo_lexical-safe.ecf"/>
|
||||
<library name="gobo_parse" location="$ISE_LIBRARY\library\gobo\gobo_parse-safe.ecf"/>
|
||||
<library name="http" location="..\..\network\protocol\http\http-safe.ecf"/>
|
||||
<library name="json" location="..\..\..\contrib\library\text\parser\json\library\json-safe.ecf"/>
|
||||
<library name="uri_template" location="..\..\text\parser\uri_template\uri_template-safe.ecf"/>
|
||||
@@ -18,7 +21,9 @@
|
||||
<cluster name="api" location=".\api\" recursive="true"/>
|
||||
<cluster name="css" location=".\css\" recursive="true"/>
|
||||
<cluster name="form" location=".\form\" recursive="true"/>
|
||||
<cluster name="webcontrol" location=".\webcontrol\"/>
|
||||
<cluster name="webcontrol" location=".\webcontrol\">
|
||||
<cluster name="validators" location=".\webcontrol\validators\"/>
|
||||
</cluster>
|
||||
<cluster name="widget" location=".\widget\" recursive="true"/>
|
||||
</target>
|
||||
</system>
|
||||
|
||||
Reference in New Issue
Block a user