Commit 40b75e154ac92aa4525f5916125d9391b295d8b4
1 parent
e8618692
add get_password in web_arg
Showing
1 changed file
with
24 additions
and
1 deletions
Show diff stats
web/CXM_web_arg_utils.anubis
| @@ -105,7 +105,30 @@ public define String | @@ -105,7 +105,30 @@ public define String | ||
| 105 | failure then default_value | 105 | failure then default_value |
| 106 | success(value) then value | 106 | success(value) then value |
| 107 | }. | 107 | }. |
| 108 | - | 108 | + |
| 109 | +public define Maybe(String) | ||
| 110 | + get_Password | ||
| 111 | + ( | ||
| 112 | + List(Web_arg) lwa, | ||
| 113 | + String pwd_1_name, | ||
| 114 | + String pwd_2_name | ||
| 115 | + )= | ||
| 116 | + if get_String(lwa, pwd_1_name) is | ||
| 117 | + { | ||
| 118 | + failure then failure, | ||
| 119 | + success(password1) then | ||
| 120 | + if get_String(lwa, pwd_2_name) is | ||
| 121 | + { | ||
| 122 | + failure then failure | ||
| 123 | + success(password2) then | ||
| 124 | + if password1 = password2 then | ||
| 125 | + success(password1) | ||
| 126 | + else | ||
| 127 | + failure | ||
| 128 | + } | ||
| 129 | + } | ||
| 130 | +. | ||
| 131 | + | ||
| 109 | public define Bool | 132 | public define Bool |
| 110 | get_Bool | 133 | get_Bool |
| 111 | ( | 134 | ( |