File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace ipl \Html \FormElement ;
4+
5+ class PasswordElement extends InputElement
6+ {
7+ protected const OBSCURE_PASSWORD = '_ipl_form_5847ed1b5b8ca ' ;
8+
9+ protected $ password ;
10+
11+ protected $ type = 'password ' ;
12+
13+ public function getValue ()
14+ {
15+ return $ this ->password ;
16+ }
17+
18+ public function setValue ($ value )
19+ {
20+ parent ::setValue ($ value );
21+ // Consider any changes to the password made by the parent setValue() call.
22+ $ value = parent ::getValue ();
23+
24+ if ($ value !== static ::OBSCURE_PASSWORD ) {
25+ $ this ->password = $ value ;
26+ }
27+
28+ return $ this ;
29+ }
30+
31+ public function getValueAttribute ()
32+ {
33+ return $ this ->hasValue () ? static ::OBSCURE_PASSWORD : null ;
34+ }
35+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ class ObscurePassword extends PasswordElement
88{
99 public static function get (): string
1010 {
11- return static ::DUMMYPASSWORD ;
11+ return static ::OBSCURE_PASSWORD ;
1212 }
1313}
You can’t perform that action at this time.
0 commit comments