feat(i18n & ux): auditoria, traduccion completa, correcciones ux y gestion de idioma en perfil
This commit is contained in:
+22
-21
@@ -1,44 +1,45 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, IntegerField, TextAreaField, BooleanField, SubmitField, SelectField
|
||||
from wtforms.validators import DataRequired, Length, NumberRange, Optional
|
||||
from flask_babel import lazy_gettext as _l
|
||||
|
||||
class ClassroomForm(FlaskForm):
|
||||
# campus_id = SelectField('Campus', coerce=int, validators=[DataRequired()])
|
||||
building = StringField('Building', validators=[
|
||||
# campus_id = SelectField(_l('Campus'), coerce=int, validators=[DataRequired()])
|
||||
building = StringField(_l('Building'), validators=[
|
||||
DataRequired(),
|
||||
Length(min=2, max=100)
|
||||
])
|
||||
room_number = StringField('Room Number', validators=[
|
||||
room_number = StringField(_l('Room Number'), validators=[
|
||||
DataRequired(),
|
||||
Length(min=1, max=50)
|
||||
])
|
||||
floor = IntegerField('Floor', validators=[
|
||||
floor = IntegerField(_l('Floor'), validators=[
|
||||
DataRequired(),
|
||||
NumberRange(min=1, max=50)
|
||||
])
|
||||
capacity = IntegerField('Capacity', validators=[
|
||||
capacity = IntegerField(_l('Capacity'), validators=[
|
||||
DataRequired(),
|
||||
NumberRange(min=1, max=500)
|
||||
])
|
||||
description = TextAreaField('Description', validators=[
|
||||
description = TextAreaField(_l('Description'), validators=[
|
||||
Optional(),
|
||||
Length(max=500)
|
||||
])
|
||||
is_active = BooleanField('Active', default=True)
|
||||
submit = SubmitField('Save Classroom')
|
||||
is_active = BooleanField(_l('Active'), default=True)
|
||||
submit = SubmitField(_l('Save Classroom'))
|
||||
|
||||
class ClassroomResourceForm(FlaskForm):
|
||||
resource_type = SelectField('Resource Type', choices=[
|
||||
('PROJECTOR', 'Projector'),
|
||||
('WHITEBOARD', 'Whiteboard'),
|
||||
('COMPUTER', 'Computer'),
|
||||
('SOUND_SYSTEM', 'Sound System'),
|
||||
('MICROPHONE', 'Microphone'),
|
||||
('AIR_CONDITIONER', 'Air Conditioner'),
|
||||
('OTHER', 'Other')
|
||||
resource_type = SelectField(_l('Resource Type'), choices=[
|
||||
('PROJECTOR', _l('Projector')),
|
||||
('WHITEBOARD', _l('Whiteboard')),
|
||||
('COMPUTER', _l('Computer')),
|
||||
('SOUND_SYSTEM', _l('Sound System')),
|
||||
('MICROPHONE', _l('Microphone')),
|
||||
('AIR_CONDITIONER', _l('Air Conditioner')),
|
||||
('OTHER', _l('Other'))
|
||||
], validators=[DataRequired()])
|
||||
brand = StringField('Brand', validators=[Optional(), Length(max=100)])
|
||||
model = StringField('Model', validators=[Optional(), Length(max=100)])
|
||||
specifications = TextAreaField('Specifications', validators=[Optional()])
|
||||
functional = BooleanField('Functional', default=True)
|
||||
submit = SubmitField('Save Resource')
|
||||
brand = StringField(_l('Brand'), validators=[Optional(), Length(max=100)])
|
||||
model = StringField(_l('Model'), validators=[Optional(), Length(max=100)])
|
||||
specifications = TextAreaField(_l('Specifications'), validators=[Optional()])
|
||||
functional = BooleanField(_l('Functional'), default=True)
|
||||
submit = SubmitField(_l('Save Resource'))
|
||||
Reference in New Issue
Block a user