|
@@ -9,16 +9,12 @@
|
|
:license: BSD, see LICENSE for more details.
|
|
:license: BSD, see LICENSE for more details.
|
|
"""
|
|
"""
|
|
from flask_wtf import Form
|
|
from flask_wtf import Form
|
|
-from wtforms import (
|
|
+from wtforms import (BooleanField, HiddenField, IntegerField, PasswordField,
|
|
- BooleanField, HiddenField, IntegerField, PasswordField,
|
|
+ SelectField, StringField, SubmitField, TextAreaField)
|
|
- SelectField, StringField, SubmitField, TextAreaField,
|
|
+from wtforms.validators import (DataRequired, Optional, Email, regexp, Length,
|
|
-)
|
|
+ URL, ValidationError)
|
|
-from wtforms.validators import (
|
|
+from wtforms.ext.sqlalchemy.fields import (QuerySelectField,
|
|
- DataRequired, Optional, Email, regexp, Length, URL, ValidationError
|
|
+ QuerySelectMultipleField)
|
|
-)
|
|
|
|
-from wtforms.ext.sqlalchemy.fields import (
|
|
|
|
- QuerySelectField, QuerySelectMultipleField
|
|
|
|
-)
|
|
|
|
from sqlalchemy.orm.session import make_transient, make_transient_to_detached
|
|
from sqlalchemy.orm.session import make_transient, make_transient_to_detached
|
|
from flask_babelplus import lazy_gettext as _
|
|
from flask_babelplus import lazy_gettext as _
|
|
|
|
|
|
@@ -187,21 +183,23 @@ class GroupForm(Form):
|
|
)
|
|
)
|
|
deletepost = BooleanField(
|
|
deletepost = BooleanField(
|
|
_("Can delete posts"),
|
|
_("Can delete posts"),
|
|
- description=_("Check this is the users in this group can delete posts.")
|
|
+ description=_("Check this if the users in this group can delete "
|
|
|
|
+ "posts.")
|
|
)
|
|
)
|
|
deletetopic = BooleanField(
|
|
deletetopic = BooleanField(
|
|
_("Can delete topics"),
|
|
_("Can delete topics"),
|
|
- description=_("Check this is the users in this group can delete "
|
|
+ description=_("Check this if the users in this group can delete "
|
|
"topics.")
|
|
"topics.")
|
|
)
|
|
)
|
|
posttopic = BooleanField(
|
|
posttopic = BooleanField(
|
|
_("Can create topics"),
|
|
_("Can create topics"),
|
|
- description=_("Check this is the users in this group can create "
|
|
+ description=_("Check this if the users in this group can create "
|
|
"topics.")
|
|
"topics.")
|
|
)
|
|
)
|
|
postreply = BooleanField(
|
|
postreply = BooleanField(
|
|
_("Can post replies"),
|
|
_("Can post replies"),
|
|
- description=_("Check this is the users in this group can post replies.")
|
|
+ description=_("Check this if the users in this group can post "
|
|
|
|
+ "replies.")
|
|
)
|
|
)
|
|
|
|
|
|
mod_edituser = BooleanField(
|
|
mod_edituser = BooleanField(
|
|
@@ -311,8 +309,8 @@ class ForumForm(Form):
|
|
|
|
|
|
moderators = StringField(
|
|
moderators = StringField(
|
|
_("Moderators"),
|
|
_("Moderators"),
|
|
- description=_("Comma seperated usernames. Leave it blank if you do not "
|
|
+ description=_("Comma seperated usernames. Leave it blank if you do "
|
|
- "want to set any moderators.")
|
|
+ "not want to set any moderators.")
|
|
)
|
|
)
|
|
|
|
|
|
show_moderators = BooleanField(
|
|
show_moderators = BooleanField(
|