Completed a previous commit, especially to web form library (WSF_FORM).

Updated EiffelStudio wizard.
This commit is contained in:
2020-10-02 15:29:20 +02:00
parent c0de4a5bf7
commit 37644e66bb
28 changed files with 391 additions and 147 deletions

View File

@@ -26,6 +26,31 @@ feature -- Access
input_type: STRING = "date"
feature -- Element change
set_date_value (dt: DATE)
-- Set value using date `dt`.
local
y,m,d: INTEGER
s: STRING
do
y := dt.year
m := dt.month
d := dt.day
create s.make (10)
s.append_integer (y)
s.append_character ('-')
if m <= 9 then
s.append_character ('0')
end
s.append_integer (m)
s.append_character ('-')
if d <= 9 then
s.append_character ('0')
end
s.append_integer (d)
set_text_value (s)
end
feature {NONE} -- Conversion

View File

@@ -15,7 +15,7 @@ inherit
redefine
set_value,
specific_input_attributes_string,
append_child_to_html
append_item_to_html
end
WSF_FORM_SELECTABLE_ITEM
@@ -97,14 +97,30 @@ feature -- Change
feature {NONE} -- Implementation
append_child_to_html (a_theme: WSF_THEME; a_html: STRING_8)
-- Specific child element if any.
--| To redefine if needed
append_item_to_html (a_theme: WSF_THEME; a_html: STRING_8)
do
Precursor (a_theme, a_html)
append_label_to_html (a_theme, a_html)
end
append_label_to_html (a_theme: WSF_THEME; a_html: STRING_8)
-- Specific label element if any.
local
s: READABLE_STRING_8
do
if attached raw_title as t then
a_html.append (t)
s := t
elseif attached title as t then
a_html.append (a_theme.html_encoded (t))
s := a_theme.html_encoded (t)
end
if s /= Void then
if attached css_id as l_id then
a_html.append ("<label for=%""+ l_id +"%">")
else
a_html.append ("<label>")
end
a_html.append (s)
a_html.append ("</label>")
end
end