File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 7
7
class Password
8
8
{
9
9
10
+ private static function getPhpProcessing ()
11
+ {
12
+ $ content =<<< END
13
+ \$field_name = \$vars["field_info"]["field_name"];
14
+ \$password = \$vars["data"][ \$field_name];
15
+ \$encryptedPassword = \$General.encode( \$password);
16
+ return \$encryptedPassword;
17
+ END ;
18
+ return $ content ;
19
+ }
10
20
public static function get ()
11
21
{
12
22
$ password_edit_field =<<< END
13
- <input type="password" name="{ \$NAME}" value="{ \$VALUE|escape}" class="cf_password" />
23
+ <input type="password" name="{ \$NAME}" value="{ \$VALUE|escape}" class="cf_password" placeholder="password" />
14
24
{if \$comments}
15
25
<div class="cf_field_comments">{ \$comments}</div>
16
26
{/if}
@@ -33,7 +43,7 @@ public static function get()
33
43
"view_field_php_function " => "" ,
34
44
"view_field_smarty_markup " => "" ,
35
45
"edit_field_smarty_markup " => $ password_edit_field ,
36
- "php_processing " => "" ,
46
+ "php_processing " => getPhpProcessing () ,
37
47
"resources_css " => "input.cf_password { \r\n width: 120px; \r\n} " ,
38
48
"resources_js " => ""
39
49
),
You can’t perform that action at this time.
0 commit comments