
from flask_wtf import FlaskForm
from wtforms import StringField,TextAreaField, TextField, SubmitField,HiddenField, validators
from wtforms.validators import DataRequired, Length

# from flask_babel import lazy_gettext as _


class CreateWsForm(FlaskForm):
    ws_name=TextField(("ws_name"), [validators.Length(min=2, max=70)])
    # owner_id=random.randint(1, 5),

class ShareWs(FlaskForm):
    usr_name=TextField(("usr_name"), [validators.Length(min=1, max=70)])
    nd_ws_id=HiddenField(("nd_ws_id"), [validators.Length(min=1, max=70)])
    # owner_id=random.randint(1, 5),

class CreateWsNodeForm(FlaskForm):
    nd_title=TextField(("nd_title"), [validators.Length(min=2, max=70)])
    nd_desc=TextField(("nd_desc"), [validators.Length(min=2, max=70)])
    nd_amount=TextField(("nd_amount"), [validators.Length(min=2, max=70)])
    nd_ws_id=HiddenField(("nd_ws_id"), [validators.Length(min=1, max=70)])
    # nd_ws_id=HiddenField(("nd_ws_id"), [validators.Length(min=2, max=70)])

class BidForm(FlaskForm):
    bid_amount = StringField('Amount', validators=[DataRequired()])
    bid_note = TextAreaField('Note', validators=[DataRequired()])
    bid_post_id=HiddenField(("bid_post_id"), [validators.Length(min=1, max=70)])
    submit = SubmitField('Post')

class BidCommentForm(FlaskForm):
    note = TextAreaField('Note', validators=[DataRequired()])
    bid_post_id=HiddenField(("nd_ws_id"), [validators.Length(min=1, max=70)])
    submit = SubmitField('Post')