From 661f6c0e691001255cebb74d51c8b180aa26175f Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 24 Feb 2018 14:54:04 +0100 Subject: [PATCH] add sms_option phone field --- view/view_table_renderer.anubis | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/view/view_table_renderer.anubis b/view/view_table_renderer.anubis index 7645f10..1e0540c 100644 --- a/view/view_table_renderer.anubis +++ b/view/view_table_renderer.anubis @@ -745,9 +745,10 @@ public define List(CXM_Form_Field) color( s_name, c_name, value, help) then [input([class("jscolor"), style("background-color: #"+value+";")], label(_T(s_name), no_help), wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)], phone( s_name, c_name, value, phone_type, help) then + with sms_options = (Maybe(List(CoreAttrs)))if phone_type = cellphone then success([event(onclick, "hk_send_sms(this)"), class("clickable")]) else failure, with event = (List(CoreAttrs))if phone_type = fax then [] else [event(onclick, "hk_phone_call(this)"), class("clickable")], //with class = (List(CoreAttrs))if phone_type = fax then [] else [class("clickable")], - [phone_input(event, [], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), convert(phone_type), narrow, mandatory), help_line(help, _T)], + [phone_input(sms_options, event, [], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), convert(phone_type), narrow, mandatory), help_line(help, _T)], email( s_name, c_name, value, help) then [email_input([event(onclick, "hk_send_email(this)")], [class("clickable")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)], @@ -961,9 +962,9 @@ public define List(CXM_Form_Field) color( s_name, c_name, value, help) then [input([class("jscolor"), style("background-color: #"+value+";")], no_label, wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)], phone( s_name, c_name, value, phone_type, help) then - with event = (List(CoreAttrs))if phone_type = fax then [] else [event(onclick, "hk_phone_call(this)")], - with class = (List(CoreAttrs))if phone_type = fax then [] else [class("clickable")], - [phone_input(event, class, label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), convert(phone_type), narrow, mandatory), help_line(help, _T)], + with sms_options = (Maybe(List(CoreAttrs)))if phone_type = cellphone then success([event(onclick, "hk_send_sms(this)"), class("clickable")]) else failure, + with event = (List(CoreAttrs))if phone_type = fax then [] else [event(onclick, "hk_phone_call(this)"), class("clickable")], + [phone_input(sms_options, event, [], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), convert(phone_type), narrow, mandatory), help_line(help, _T)], email( s_name, c_name, value, help) then [email_input([event(onclick, "hk_send_email(this)"), class("clickable")], [class("hk_input_email")], label(_T(s_name), no_help), html_Id(c_name), wan(c_name), init(not_null_String(value)), narrow, mandatory), help_line(help, _T)], url( s_name, c_name, value, help) then -- libgit2 0.21.4