diff --git a/types/model/fields.anubis b/types/model/fields.anubis index 5d66395..04f980d 100644 --- a/types/model/fields.anubis +++ b/types/model/fields.anubis @@ -135,7 +135,7 @@ public type HK_Model_Field: foreign_key (HK_App_Name app_name, String table_name), // foreign key to 'id' in another (or same) table and column_name for choice selector. integer_field (HK_Int_Choices choices), // integer of arbitrary size char_field (HK_Text_Choices choices, Int size), // text of maximal size 'size' (number of characters) - //password_field(Int min_size), + password_field(Int min_size), // the password field doesn't show the password string or store it in hashed version into database text_field. // text of variable size //default initialization @@ -220,11 +220,15 @@ public define Message //TODO add choices if need forget(add_string(hk_model_field_message, "type", "integer_field")), - char_field (choices, size) then // text of maximal size 'size' (number of characters) + char_field (choices, size) then // text of maximal size 'size' (number of characters) //TODO add choices if need forget(add_string(hk_model_field_message, "type", "char_field")); - forget(add_int32(hk_model_field_message, "size", truncate_to_Word32(size))), - + forget(add_int32(hk_model_field_message, "size", truncate_to_Word32(size))), + + password_field(size) then + forget(add_string(hk_model_field_message, "type", "password_field")); + forget(add_int32(hk_model_field_message, "size", truncate_to_Word32(size))), + text_field then // text of variable size forget(add_string(hk_model_field_message, "type", "text_field")) @@ -251,8 +255,11 @@ define Maybe(HK_Model_Field) }}} else if type = "integer_field" then success(integer_field) else if type = "char_field" then - if find_int32(hk_model_field_message, "size") is {failure then failure, success(w32_size) then + if find_int32(hk_model_field_message, "size") is {failure then failure, success(w32_size) then success(char_field(to_Int(w32_size)))} + else if type = "password_field" then + if find_int32(hk_model_field_message, "size") is {failure then failure, success(w32_size) then + success(password_field(to_Int(w32_size)))} else if type = "text_field" then success(text_field) else failure . -- libgit2 0.21.4