Coverage for gws-app/gws/plugin/model_widget/password/__init__.py: 0%

14 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-17 01:37 +0200

1"""Password widget.""" 

2 

3import gws 

4import gws.base.model.widget 

5 

6gws.ext.new.modelWidget('password') 

7 

8 

9class Config(gws.base.model.widget.Config): 

10 """Password widget. (added in 8.1)""" 

11 

12 placeholder: str = '' 

13 """Password input placeholder.""" 

14 withShow: bool = False 

15 """Create a "show password" button.""" 

16 

17 

18class Props(gws.base.model.widget.Props): 

19 placeholder: str 

20 withShow: bool 

21 

22 

23class Object(gws.base.model.widget.Object): 

24 def props(self, user): 

25 return gws.u.merge( 

26 super().props(user), 

27 placeholder=self.cfg('placeholder'), 

28 withShow=self.cfg('withShow'), 

29 )