Use update member form
This commit is contained in:
parent
75ea8025c1
commit
1b8233af89
@ -1,9 +1,6 @@
|
|||||||
from flask_wtf import Form
|
from flask_wtf import Form
|
||||||
from wtforms.fields import StringField
|
from wtforms.validators import Optional
|
||||||
from wtforms.fields.html5 import EmailField
|
|
||||||
from wtforms.validators import Required, Email, Length
|
|
||||||
|
|
||||||
from atst.forms.validators import IsNumber
|
|
||||||
from atst.forms.fields import SelectField
|
from atst.forms.fields import SelectField
|
||||||
|
|
||||||
from .data import WORKSPACE_ROLES
|
from .data import WORKSPACE_ROLES
|
||||||
@ -12,5 +9,5 @@ from .data import WORKSPACE_ROLES
|
|||||||
class UpdateMemberForm(Form):
|
class UpdateMemberForm(Form):
|
||||||
|
|
||||||
workspace_role = SelectField(
|
workspace_role = SelectField(
|
||||||
"Workspace Role", choices=WORKSPACE_ROLES, validators=[Required()], default=""
|
"Workspace Role", choices=WORKSPACE_ROLES, validators=[Optional()], default=""
|
||||||
)
|
)
|
||||||
|
@ -134,7 +134,7 @@ def view_member(workspace_id, member_id):
|
|||||||
"edit this workspace user",
|
"edit this workspace user",
|
||||||
)
|
)
|
||||||
member = WorkspaceUsers.get(workspace_id, member_id)
|
member = WorkspaceUsers.get(workspace_id, member_id)
|
||||||
form = NewMemberForm(http_request.form)
|
form = UpdateMemberForm(http_request.form)
|
||||||
return render_template(
|
return render_template(
|
||||||
"member_edit.html", form=form, workspace=workspace, member=member
|
"member_edit.html", form=form, workspace=workspace, member=member
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user