diff --git a/ds_files/ds_types.anubis b/ds_files/ds_types.anubis index 9c605f5..9d22dc2 100644 --- a/ds_files/ds_types.anubis +++ b/ds_files/ds_types.anubis @@ -107,7 +107,9 @@ public define List(DS_Type_File) hayamiki_lib_types_description = [ component(extern_type("HK_Text_Field_Attr", model_types+"hk_text_field_attr.anubis"), "hk_text_field_attr"), ]), - enum("color_field", comment("String which representing RGBA color like HTML")) + enum("color_field", comment("String which representing RGBA color like HTML")), + enum("phone_field", comment("phone field")), + enum("email_field", comment("email field")), ]), // diff --git a/model/fields.anubis b/model/fields.anubis index cb6a8eb..b8a1fbe 100644 --- a/model/fields.anubis +++ b/model/fields.anubis @@ -245,10 +245,18 @@ public define JsonValue text_field(attr) then // text of variable size [ json_member("type", json_string("text_field")), json_member("text_attribute", json_string(to_String(attr))) - ] + ], color_field then [ json_member("type", json_string("color_field")) + ], + + phone_field then + [ json_member("type", json_string("phone_field")) + ], + + email_field then + [ json_member("type", json_string("email_field")) ] }, diff --git a/model/types/hk_model_field.anubis b/model/types/hk_model_field.anubis index fd24108..ee278db 100644 --- a/model/types/hk_model_field.anubis +++ b/model/types/hk_model_field.anubis @@ -1,8 +1,8 @@ /* * Created by 伝作 (Densaku). * Types & Messages generator written by フランスのトトロ aka (David RENÉ) - * Date: 2017-04-12 - * Time: 23:52:21 + * Date: 2017-05-02 + * Time: 10:06:16 * */ @@ -52,7 +52,9 @@ public type HK_Model_Field: text_field( HK_Text_Field_Attr hk_text_field_attr ), - color_field //String which representing RGBA color like HTML + color_field, //String which representing RGBA color like HTML + phone_field, //phone field + email_field //email field . HK_Model_Field message format @@ -138,6 +140,14 @@ public define Message color_field then forget(add_string(_hk_model_field_message, "__TYPE_ALT__", "color_field")), + //Alternative phone_field (NO TYPE) + phone_field then + forget(add_string(_hk_model_field_message, "__TYPE_ALT__", "phone_field")), + + //Alternative email_field (NO TYPE) + email_field then + forget(add_string(_hk_model_field_message, "__TYPE_ALT__", "email_field")), + }; _hk_model_field_message . @@ -233,6 +243,12 @@ public define Maybe(HK_Model_Field) else //Alternative color_field (NO TYPE) if __type_alt__ = "color_field" then success(color_field) + else //Alternative phone_field (NO TYPE) + if __type_alt__ = "phone_field" then + success(phone_field) + else //Alternative email_field (NO TYPE) + if __type_alt__ = "email_field" then + success(email_field) else failure //No valid Alternative found ! else -- libgit2 0.21.4