Move join forms to server.lexicon

This commit is contained in:
Tim Van Baak 2020-04-27 17:16:02 -07:00
parent da236a83ba
commit 82129aba40
3 changed files with 11 additions and 8 deletions

View File

@ -1,7 +1,7 @@
from flask import current_app
from flask_wtf import FlaskForm
from wtforms import (
StringField, PasswordField, BooleanField, SubmitField, TextAreaField,
StringField, BooleanField, SubmitField, TextAreaField,
IntegerField, SelectField, RadioField)
from wtforms.validators import DataRequired, ValidationError, Optional
from wtforms.widgets.html5 import NumberInput
@ -193,12 +193,6 @@ class LexiconConfigForm(FlaskForm):
# return True
class LexiconJoinForm(FlaskForm):
"""/lexicon/<name>/join/"""
password = StringField('Password')
submit = SubmitField('Submit')
class LexiconCharacterForm(FlaskForm):
"""/lexicon/<name>/session/character/"""
characterName = StringField(

View File

@ -10,11 +10,12 @@ from flask_login import login_required, current_user
from amanuensis.lexicon import player_can_join_lexicon, add_player_to_lexicon
from amanuensis.parser import filesafe_title
from amanuensis.server.forms import LexiconJoinForm
from amanuensis.server.helpers import (
lexicon_param,
player_required_if_not_public)
from .forms import LexiconJoinForm
bp_lexicon = Blueprint('lexicon', __name__,
url_prefix='/lexicon/<name>',

View File

@ -0,0 +1,8 @@
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
class LexiconJoinForm(FlaskForm):
"""/lexicon/<name>/join/"""
password = StringField('Password')
submit = SubmitField('Submit')