We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Password field(s) of type "text" instead of "password"
In 1.5 [this line](https://github.com/Mailu/Mailu/blob/master/core/admin/mailu/ui/templates/fetch/create.html#L22) creates a field of type _text_ not _password_.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `core/admin/mailu/ui/forms.py`
Content:
```
1 from wtforms import validators, fields, widgets
2 from wtforms_components import fields as fields_
3 from flask_babel import lazy_gettext as _
4 
5 import flask_login
6 import flask_wtf
7 import re
8 
9 LOCALPART_REGEX = "^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$"
10 
11 class DestinationField(fields.SelectMultipleField):
12     """ Allow for multiple emails selection from current user choices and
13     additional email addresses.
14     """
15 
16     validator = re.compile(r'^.+@([^.@][^@]+)$', re.IGNORECASE)
17 
18     def iter_choices(self):
19         managed = [
20             str(email)
21             for email in flask_login.current_user.get_managed_emails()
22         ]
23         for email in managed:
24             selected = self.data is not None and self.coerce(email) in self.data
25             yield (email, email, selected)
26         for email in self.data or ():
27             if email not in managed:
28                 yield (email, email, True)
29 
30     def pre_validate(self, form):
31         for item in self.data:
32             if not self.validator.match(item):
33                 raise validators.ValidationError(_('Invalid email address.'))
34 
35 class MultipleEmailAddressesVerify(object):
36     def __init__(self,message=_('Invalid email address.')):
37         self.message = message
38 
39     def __call__(self, form, field):
40         pattern = re.compile(r'^([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,4})(,([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,4}))*$')
41         if not pattern.match(field.data.replace(" ", "")):
42             raise validators.ValidationError(self.message)
43 
44 class ConfirmationForm(flask_wtf.FlaskForm):
45     submit = fields.SubmitField(_('Confirm'))
46 
47 
48 class LoginForm(flask_wtf.FlaskForm):
49     email = fields.StringField(_('E-mail'), [validators.Email()])
50     pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
51     submit = fields.SubmitField(_('Sign in'))
52 
53 
54 class DomainForm(flask_wtf.FlaskForm):
55     name = fields.StringField(_('Domain name'), [validators.DataRequired()])
56     max_users = fields_.IntegerField(_('Maximum user count'), default=10)
57     max_aliases = fields_.IntegerField(_('Maximum alias count'), default=10)
58     max_quota_bytes = fields_.IntegerSliderField(_('Maximum user quota'), default=0)
59     signup_enabled = fields.BooleanField(_('Enable sign-up'), default=False)
60     comment = fields.StringField(_('Comment'))
61     submit = fields.SubmitField(_('Save'))
62 
63 
64 class DomainSignupForm(flask_wtf.FlaskForm):
65     name = fields.StringField(_('Domain name'), [validators.DataRequired()])
66     localpart = fields.StringField(_('Initial admin'), [validators.DataRequired()])
67     pw = fields.PasswordField(_('Admin password'), [validators.DataRequired()])
68     pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])
69     captcha = flask_wtf.RecaptchaField()
70     submit = fields.SubmitField(_('Create'))
71 
72 
73 class AlternativeForm(flask_wtf.FlaskForm):
74     name = fields.StringField(_('Alternative name'), [validators.DataRequired()])
75     submit = fields.SubmitField(_('Save'))
76 
77 
78 class RelayForm(flask_wtf.FlaskForm):
79     name = fields.StringField(_('Relayed domain name'), [validators.DataRequired()])
80     smtp = fields.StringField(_('Remote host'))
81     comment = fields.StringField(_('Comment'))
82     submit = fields.SubmitField(_('Save'))
83 
84 
85 class UserForm(flask_wtf.FlaskForm):
86     localpart = fields.StringField(_('E-mail'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])
87     pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
88     pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])
89     quota_bytes = fields_.IntegerSliderField(_('Quota'), default=1000000000)
90     enable_imap = fields.BooleanField(_('Allow IMAP access'), default=True)
91     enable_pop = fields.BooleanField(_('Allow POP3 access'), default=True)
92     displayed_name = fields.StringField(_('Displayed name'))
93     comment = fields.StringField(_('Comment'))
94     enabled = fields.BooleanField(_('Enabled'), default=True)
95     submit = fields.SubmitField(_('Save'))
96 
97 
98 class UserSignupForm(flask_wtf.FlaskForm):
99     localpart = fields.StringField(_('Email address'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])
100     pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
101     pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])
102     submit = fields.SubmitField(_('Sign up'))
103 
104 class UserSignupFormCaptcha(UserSignupForm):
105     captcha = flask_wtf.RecaptchaField()
106 
107 class UserSettingsForm(flask_wtf.FlaskForm):
108     displayed_name = fields.StringField(_('Displayed name'))
109     spam_enabled = fields.BooleanField(_('Enable spam filter'))
110     spam_threshold = fields_.IntegerSliderField(_('Spam filter tolerance'))
111     forward_enabled = fields.BooleanField(_('Enable forwarding'))
112     forward_keep = fields.BooleanField(_('Keep a copy of the emails'))
113     forward_destination = fields.StringField(_('Destination'), [validators.Optional(), MultipleEmailAddressesVerify()])
114     submit = fields.SubmitField(_('Save settings'))
115 
116 
117 class UserPasswordForm(flask_wtf.FlaskForm):
118     pw = fields.PasswordField(_('Password'), [validators.DataRequired()])
119     pw2 = fields.PasswordField(_('Password check'), [validators.DataRequired()])
120     submit = fields.SubmitField(_('Update password'))
121 
122 
123 class UserReplyForm(flask_wtf.FlaskForm):
124     reply_enabled = fields.BooleanField(_('Enable automatic reply'))
125     reply_subject = fields.StringField(_('Reply subject'))
126     reply_body = fields.StringField(_('Reply body'),
127         widget=widgets.TextArea())
128     reply_startdate = fields.html5.DateField(_('Start of vacation'))
129     reply_enddate = fields.html5.DateField(_('End of vacation'))
130     submit = fields.SubmitField(_('Update'))
131 
132 
133 class TokenForm(flask_wtf.FlaskForm):
134     displayed_password = fields.StringField(
135         _('Your token (write it down, as it will never be displayed again)')
136     )
137     raw_password = fields.HiddenField([validators.DataRequired()])
138     comment = fields.StringField(_('Comment'))
139     ip = fields.StringField(
140         _('Authorized IP'), [validators.Optional(), validators.IPAddress()]
141     )
142     submit = fields.SubmitField(_('Save'))
143 
144 
145 class AliasForm(flask_wtf.FlaskForm):
146     localpart = fields.StringField(_('Alias'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])
147     wildcard = fields.BooleanField(
148         _('Use SQL LIKE Syntax (e.g. for catch-all aliases)'))
149     destination = DestinationField(_('Destination'))
150     comment = fields.StringField(_('Comment'))
151     submit = fields.SubmitField(_('Save'))
152 
153 
154 class AdminForm(flask_wtf.FlaskForm):
155     admin = fields.SelectField(_('Admin email'), choices=[])
156     submit = fields.SubmitField(_('Submit'))
157 
158 
159 class ManagerForm(flask_wtf.FlaskForm):
160     manager = fields.SelectField(_('Manager email'))
161     submit = fields.SubmitField(_('Submit'))
162 
163 
164 class FetchForm(flask_wtf.FlaskForm):
165     protocol = fields.SelectField(_('Protocol'), choices=[
166         ('imap', 'IMAP'), ('pop3', 'POP3')
167     ])
168     host = fields.StringField(_('Hostname or IP'))
169     port = fields.IntegerField(_('TCP port'))
170     tls = fields.BooleanField(_('Enable TLS'))
171     username = fields.StringField(_('Username'))
172     password = fields.StringField(_('Password'))
173     keep = fields.BooleanField(_('Keep emails on the server'))
174     submit = fields.SubmitField(_('Submit'))
175 
176 
177 class AnnouncementForm(flask_wtf.FlaskForm):
178     announcement_subject = fields.StringField(_('Announcement subject'),
179         [validators.DataRequired()])
180     announcement_body = fields.StringField(_('Announcement body'),
181         [validators.DataRequired()], widget=widgets.TextArea())
182     submit = fields.SubmitField(_('Send'))
183
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py
--- a/core/admin/mailu/ui/forms.py
+++ b/core/admin/mailu/ui/forms.py
@@ -165,11 +165,11 @@
     protocol = fields.SelectField(_('Protocol'), choices=[
         ('imap', 'IMAP'), ('pop3', 'POP3')
     ])
-    host = fields.StringField(_('Hostname or IP'))
-    port = fields.IntegerField(_('TCP port'))
+    host = fields.StringField(_('Hostname or IP'), [validators.DataRequired()])
+    port = fields.IntegerField(_('TCP port'), [validators.DataRequired(), validators.NumberRange(min=0, max=65535)])
     tls = fields.BooleanField(_('Enable TLS'))
-    username = fields.StringField(_('Username'))
-    password = fields.StringField(_('Password'))
+    username = fields.StringField(_('Username'), [validators.DataRequired()])
+    password = fields.PasswordField(_('Password'), [validators.DataRequired()])
     keep = fields.BooleanField(_('Keep emails on the server'))
     submit = fields.SubmitField(_('Submit'))

{"golden_diff": "diff --git a/core/admin/mailu/ui/forms.py b/core/admin/mailu/ui/forms.py\n--- a/core/admin/mailu/ui/forms.py\n+++ b/core/admin/mailu/ui/forms.py\n@@ -165,11 +165,11 @@\n     protocol = fields.SelectField(_('Protocol'), choices=[\n         ('imap', 'IMAP'), ('pop3', 'POP3')\n     ])\n-    host = fields.StringField(_('Hostname or IP'))\n-    port = fields.IntegerField(_('TCP port'))\n+    host = fields.StringField(_('Hostname or IP'), [validators.DataRequired()])\n+    port = fields.IntegerField(_('TCP port'), [validators.DataRequired(), validators.NumberRange(min=0, max=65535)])\n     tls = fields.BooleanField(_('Enable TLS'))\n-    username = fields.StringField(_('Username'))\n-    password = fields.StringField(_('Password'))\n+    username = fields.StringField(_('Username'), [validators.DataRequired()])\n+    password = fields.PasswordField(_('Password'), [validators.DataRequired()])\n     keep = fields.BooleanField(_('Keep emails on the server'))\n     submit = fields.SubmitField(_('Submit'))\n", "issue": "Password field(s) of type \"text\" instead of \"password\"\nIn 1.5 [this line](https://github.com/Mailu/Mailu/blob/master/core/admin/mailu/ui/templates/fetch/create.html#L22) creates a field of type _text_ not _password_.\n", "before_files": [{"content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass DestinationField(fields.SelectMultipleField):\n    \"\"\" Allow for multiple emails selection from current user choices and\n    additional email addresses.\n    \"\"\"\n\n    validator = re.compile(r'^.+@([^.@][^@]+)$', re.IGNORECASE)\n\n    def iter_choices(self):\n        managed = [\n            str(email)\n            for email in flask_login.current_user.get_managed_emails()\n        ]\n        for email in managed:\n            selected = self.data is not None and self.coerce(email) in self.data\n            yield (email, email, selected)\n        for email in self.data or ():\n            if email not in managed:\n                yield (email, email, True)\n\n    def pre_validate(self, form):\n        for item in self.data:\n            if not self.validator.match(item):\n                raise validators.ValidationError(_('Invalid email address.'))\n\nclass MultipleEmailAddressesVerify(object):\n    def __init__(self,message=_('Invalid email address.')):\n        self.message = message\n\n    def __call__(self, form, field):\n        pattern = re.compile(r'^([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,4})(,([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,4}))*$')\n        if not pattern.match(field.data.replace(\" \", \"\")):\n            raise validators.ValidationError(self.message)\n\nclass ConfirmationForm(flask_wtf.FlaskForm):\n    submit = fields.SubmitField(_('Confirm'))\n\n\nclass LoginForm(flask_wtf.FlaskForm):\n    email = fields.StringField(_('E-mail'), [validators.Email()])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Sign in'))\n\n\nclass DomainForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    max_users = fields_.IntegerField(_('Maximum user count'), default=10)\n    max_aliases = fields_.IntegerField(_('Maximum alias count'), default=10)\n    max_quota_bytes = fields_.IntegerSliderField(_('Maximum user quota'), default=0)\n    signup_enabled = fields.BooleanField(_('Enable sign-up'), default=False)\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass DomainSignupForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    localpart = fields.StringField(_('Initial admin'), [validators.DataRequired()])\n    pw = fields.PasswordField(_('Admin password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    captcha = flask_wtf.RecaptchaField()\n    submit = fields.SubmitField(_('Create'))\n\n\nclass AlternativeForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Alternative name'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Save'))\n\n\nclass RelayForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Relayed domain name'), [validators.DataRequired()])\n    smtp = fields.StringField(_('Remote host'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('E-mail'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    quota_bytes = fields_.IntegerSliderField(_('Quota'), default=1000000000)\n    enable_imap = fields.BooleanField(_('Allow IMAP access'), default=True)\n    enable_pop = fields.BooleanField(_('Allow POP3 access'), default=True)\n    displayed_name = fields.StringField(_('Displayed name'))\n    comment = fields.StringField(_('Comment'))\n    enabled = fields.BooleanField(_('Enabled'), default=True)\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserSignupForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Email address'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    submit = fields.SubmitField(_('Sign up'))\n\nclass UserSignupFormCaptcha(UserSignupForm):\n    captcha = flask_wtf.RecaptchaField()\n\nclass UserSettingsForm(flask_wtf.FlaskForm):\n    displayed_name = fields.StringField(_('Displayed name'))\n    spam_enabled = fields.BooleanField(_('Enable spam filter'))\n    spam_threshold = fields_.IntegerSliderField(_('Spam filter tolerance'))\n    forward_enabled = fields.BooleanField(_('Enable forwarding'))\n    forward_keep = fields.BooleanField(_('Keep a copy of the emails'))\n    forward_destination = fields.StringField(_('Destination'), [validators.Optional(), MultipleEmailAddressesVerify()])\n    submit = fields.SubmitField(_('Save settings'))\n\n\nclass UserPasswordForm(flask_wtf.FlaskForm):\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Password check'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Update password'))\n\n\nclass UserReplyForm(flask_wtf.FlaskForm):\n    reply_enabled = fields.BooleanField(_('Enable automatic reply'))\n    reply_subject = fields.StringField(_('Reply subject'))\n    reply_body = fields.StringField(_('Reply body'),\n        widget=widgets.TextArea())\n    reply_startdate = fields.html5.DateField(_('Start of vacation'))\n    reply_enddate = fields.html5.DateField(_('End of vacation'))\n    submit = fields.SubmitField(_('Update'))\n\n\nclass TokenForm(flask_wtf.FlaskForm):\n    displayed_password = fields.StringField(\n        _('Your token (write it down, as it will never be displayed again)')\n    )\n    raw_password = fields.HiddenField([validators.DataRequired()])\n    comment = fields.StringField(_('Comment'))\n    ip = fields.StringField(\n        _('Authorized IP'), [validators.Optional(), validators.IPAddress()]\n    )\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AliasForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Alias'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    wildcard = fields.BooleanField(\n        _('Use SQL LIKE Syntax (e.g. for catch-all aliases)'))\n    destination = DestinationField(_('Destination'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AdminForm(flask_wtf.FlaskForm):\n    admin = fields.SelectField(_('Admin email'), choices=[])\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass ManagerForm(flask_wtf.FlaskForm):\n    manager = fields.SelectField(_('Manager email'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass FetchForm(flask_wtf.FlaskForm):\n    protocol = fields.SelectField(_('Protocol'), choices=[\n        ('imap', 'IMAP'), ('pop3', 'POP3')\n    ])\n    host = fields.StringField(_('Hostname or IP'))\n    port = fields.IntegerField(_('TCP port'))\n    tls = fields.BooleanField(_('Enable TLS'))\n    username = fields.StringField(_('Username'))\n    password = fields.StringField(_('Password'))\n    keep = fields.BooleanField(_('Keep emails on the server'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass AnnouncementForm(flask_wtf.FlaskForm):\n    announcement_subject = fields.StringField(_('Announcement subject'),\n        [validators.DataRequired()])\n    announcement_body = fields.StringField(_('Announcement body'),\n        [validators.DataRequired()], widget=widgets.TextArea())\n    submit = fields.SubmitField(_('Send'))\n", "path": "core/admin/mailu/ui/forms.py"}], "after_files": [{"content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass DestinationField(fields.SelectMultipleField):\n    \"\"\" Allow for multiple emails selection from current user choices and\n    additional email addresses.\n    \"\"\"\n\n    validator = re.compile(r'^.+@([^.@][^@]+)$', re.IGNORECASE)\n\n    def iter_choices(self):\n        managed = [\n            str(email)\n            for email in flask_login.current_user.get_managed_emails()\n        ]\n        for email in managed:\n            selected = self.data is not None and self.coerce(email) in self.data\n            yield (email, email, selected)\n        for email in self.data or ():\n            if email not in managed:\n                yield (email, email, True)\n\n    def pre_validate(self, form):\n        for item in self.data:\n            if not self.validator.match(item):\n                raise validators.ValidationError(_('Invalid email address.'))\n\nclass MultipleEmailAddressesVerify(object):\n    def __init__(self,message=_('Invalid email address.')):\n        self.message = message\n\n    def __call__(self, form, field):\n        pattern = re.compile(r'^([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,4})(,([_a-z0-9\\-]+)(\\.[_a-z0-9\\-]+)*@([a-z0-9\\-]{2,}\\.)*([a-z]{2,4}))*$')\n        if not pattern.match(field.data.replace(\" \", \"\")):\n            raise validators.ValidationError(self.message)\n\nclass ConfirmationForm(flask_wtf.FlaskForm):\n    submit = fields.SubmitField(_('Confirm'))\n\n\nclass LoginForm(flask_wtf.FlaskForm):\n    email = fields.StringField(_('E-mail'), [validators.Email()])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Sign in'))\n\n\nclass DomainForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    max_users = fields_.IntegerField(_('Maximum user count'), default=10)\n    max_aliases = fields_.IntegerField(_('Maximum alias count'), default=10)\n    max_quota_bytes = fields_.IntegerSliderField(_('Maximum user quota'), default=0)\n    signup_enabled = fields.BooleanField(_('Enable sign-up'), default=False)\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass DomainSignupForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Domain name'), [validators.DataRequired()])\n    localpart = fields.StringField(_('Initial admin'), [validators.DataRequired()])\n    pw = fields.PasswordField(_('Admin password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    captcha = flask_wtf.RecaptchaField()\n    submit = fields.SubmitField(_('Create'))\n\n\nclass AlternativeForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Alternative name'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Save'))\n\n\nclass RelayForm(flask_wtf.FlaskForm):\n    name = fields.StringField(_('Relayed domain name'), [validators.DataRequired()])\n    smtp = fields.StringField(_('Remote host'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('E-mail'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    quota_bytes = fields_.IntegerSliderField(_('Quota'), default=1000000000)\n    enable_imap = fields.BooleanField(_('Allow IMAP access'), default=True)\n    enable_pop = fields.BooleanField(_('Allow POP3 access'), default=True)\n    displayed_name = fields.StringField(_('Displayed name'))\n    comment = fields.StringField(_('Comment'))\n    enabled = fields.BooleanField(_('Enabled'), default=True)\n    submit = fields.SubmitField(_('Save'))\n\n\nclass UserSignupForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Email address'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Confirm password'), [validators.EqualTo('pw')])\n    submit = fields.SubmitField(_('Sign up'))\n\nclass UserSignupFormCaptcha(UserSignupForm):\n    captcha = flask_wtf.RecaptchaField()\n\nclass UserSettingsForm(flask_wtf.FlaskForm):\n    displayed_name = fields.StringField(_('Displayed name'))\n    spam_enabled = fields.BooleanField(_('Enable spam filter'))\n    spam_threshold = fields_.IntegerSliderField(_('Spam filter tolerance'))\n    forward_enabled = fields.BooleanField(_('Enable forwarding'))\n    forward_keep = fields.BooleanField(_('Keep a copy of the emails'))\n    forward_destination = fields.StringField(_('Destination'), [validators.Optional(), MultipleEmailAddressesVerify()])\n    submit = fields.SubmitField(_('Save settings'))\n\n\nclass UserPasswordForm(flask_wtf.FlaskForm):\n    pw = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    pw2 = fields.PasswordField(_('Password check'), [validators.DataRequired()])\n    submit = fields.SubmitField(_('Update password'))\n\n\nclass UserReplyForm(flask_wtf.FlaskForm):\n    reply_enabled = fields.BooleanField(_('Enable automatic reply'))\n    reply_subject = fields.StringField(_('Reply subject'))\n    reply_body = fields.StringField(_('Reply body'),\n        widget=widgets.TextArea())\n    reply_startdate = fields.html5.DateField(_('Start of vacation'))\n    reply_enddate = fields.html5.DateField(_('End of vacation'))\n    submit = fields.SubmitField(_('Update'))\n\n\nclass TokenForm(flask_wtf.FlaskForm):\n    displayed_password = fields.StringField(\n        _('Your token (write it down, as it will never be displayed again)')\n    )\n    raw_password = fields.HiddenField([validators.DataRequired()])\n    comment = fields.StringField(_('Comment'))\n    ip = fields.StringField(\n        _('Authorized IP'), [validators.Optional(), validators.IPAddress()]\n    )\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AliasForm(flask_wtf.FlaskForm):\n    localpart = fields.StringField(_('Alias'), [validators.DataRequired(), validators.Regexp(LOCALPART_REGEX)])\n    wildcard = fields.BooleanField(\n        _('Use SQL LIKE Syntax (e.g. for catch-all aliases)'))\n    destination = DestinationField(_('Destination'))\n    comment = fields.StringField(_('Comment'))\n    submit = fields.SubmitField(_('Save'))\n\n\nclass AdminForm(flask_wtf.FlaskForm):\n    admin = fields.SelectField(_('Admin email'), choices=[])\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass ManagerForm(flask_wtf.FlaskForm):\n    manager = fields.SelectField(_('Manager email'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass FetchForm(flask_wtf.FlaskForm):\n    protocol = fields.SelectField(_('Protocol'), choices=[\n        ('imap', 'IMAP'), ('pop3', 'POP3')\n    ])\n    host = fields.StringField(_('Hostname or IP'), [validators.DataRequired()])\n    port = fields.IntegerField(_('TCP port'), [validators.DataRequired(), validators.NumberRange(min=0, max=65535)])\n    tls = fields.BooleanField(_('Enable TLS'))\n    username = fields.StringField(_('Username'), [validators.DataRequired()])\n    password = fields.PasswordField(_('Password'), [validators.DataRequired()])\n    keep = fields.BooleanField(_('Keep emails on the server'))\n    submit = fields.SubmitField(_('Submit'))\n\n\nclass AnnouncementForm(flask_wtf.FlaskForm):\n    announcement_subject = fields.StringField(_('Announcement subject'),\n        [validators.DataRequired()])\n    announcement_body = fields.StringField(_('Announcement body'),\n        [validators.DataRequired()], widget=widgets.TextArea())\n    submit = fields.SubmitField(_('Send'))\n", "path": "core/admin/mailu/ui/forms.py"}]}