Commit e9b2d3fbe2c764f46485120217a7d7a3aba1d24a
1 parent
747ce77c
add sms icon option with cellphone
Showing
2 changed files
with
15 additions
and
4 deletions
Show diff stats
web/CXM_form.anubis
| @@ -87,11 +87,12 @@ public type CXM_Form_Field: | @@ -87,11 +87,12 @@ public type CXM_Form_Field: | ||
| 87 | InitialValue init_value, | 87 | InitialValue init_value, |
| 88 | Width width, | 88 | Width width, |
| 89 | Mandatory mandatory), | 89 | Mandatory mandatory), |
| 90 | - | 90 | + |
| 91 | //--- phone field ------------------------------------------------------------ | 91 | //--- phone field ------------------------------------------------------------ |
| 92 | phone_input( | 92 | phone_input( |
| 93 | - List(CoreAttrs) icon_options, | ||
| 94 | - List(CoreAttrs) options, | 93 | + Maybe(List(CoreAttrs)) sms_icon_options, //if there is sms available it's success with the options (generally the js call to edit sms) |
| 94 | + List(CoreAttrs) phone_icon_options, | ||
| 95 | + List(CoreAttrs) text_options, | ||
| 95 | HTML_Label label, | 96 | HTML_Label label, |
| 96 | HTML_Id id, | 97 | HTML_Id id, |
| 97 | WebArgName web_arg_name, | 98 | WebArgName web_arg_name, |
| @@ -539,8 +540,13 @@ public define HTML_In_Form | @@ -539,8 +540,13 @@ public define HTML_In_Form | ||
| 539 | password_input(options, _label, id, name, init, w, mand) then | 540 | password_input(options, _label, id, name, init, w, mand) then |
| 540 | password_input([class("in") . options], star(_label, mand), id, name, init, pixels(w)), | 541 | password_input([class("in") . options], star(_label, mand), id, name, init, pixels(w)), |
| 541 | 542 | ||
| 542 | - phone_input(icon_options, options, _label, id, wan, default, phone_type, w, mand) then | 543 | + phone_input(mb_sms_options, icon_options, options, _label, id, wan, default, phone_type, w, mand) then |
| 543 | sequence([ | 544 | sequence([ |
| 545 | + if mb_sms_options is | ||
| 546 | + { | ||
| 547 | + failure then empty, | ||
| 548 | + success(sms_options) then image([event(onmouseover, "/icons/16x16/send_sms.png")]+sms_options, "/icons/16x16/sms.png", "") | ||
| 549 | + }, | ||
| 544 | image(icon_options, "/icons/16x16/"+to_Icon(phone_type), ""), | 550 | image(icon_options, "/icons/16x16/"+to_Icon(phone_type), ""), |
| 545 | text_input([class("in") . options], star(_label, mand), id, wan, init(get_String(lwa, wan.name, default.value)), pixels(w)), | 551 | text_input([class("in") . options], star(_label, mand), id, wan, init(get_String(lwa, wan.name, default.value)), pixels(w)), |
| 546 | ]), | 552 | ]), |
web/widgets/specialized_elements.anubis
| @@ -41,6 +41,11 @@ public define HTML_Off_Form | @@ -41,6 +41,11 @@ public define HTML_Off_Form | ||
| 41 | else | 41 | else |
| 42 | with _attrs = if phone_type = fax then [] else [data("phone-number", phone_number), event(onclick, "hk_phone_call(this)"), class("clickable") . attrs], | 42 | with _attrs = if phone_type = fax then [] else [data("phone-number", phone_number), event(onclick, "hk_phone_call(this)"), class("clickable") . attrs], |
| 43 | sequence([ | 43 | sequence([ |
| 44 | + //add sms | ||
| 45 | + if phone_type = cellphone then | ||
| 46 | + img([event(onmouseover, "/icons/16x16/send_sms.png"), event(onclick, "hk_send_sms(this)"), class("clickable icon_in_text")], "/icons/16x16/sms.png","") | ||
| 47 | + else | ||
| 48 | + empty, | ||
| 44 | img(_attrs+[class("icon_in_text")], "/icons/16x16/"+to_Icon(phone_type)), | 49 | img(_attrs+[class("icon_in_text")], "/icons/16x16/"+to_Icon(phone_type)), |
| 45 | if show_text then | 50 | if show_text then |
| 46 | text(_attrs, phone_number) | 51 | text(_attrs, phone_number) |