class SelectView(FlaskForm): options = RadioField( choices=['Show all items', 'Detailed view of single item'], validators=[DataRequired()]) item_name = SelectField('Item to view') time_to_show = RadioField('Show actions for last:', choices=['week', 'month', 'year', 'all'], default='week') submit = SubmitField('Show selection')
class ProjectSettingsForm(Form): min_version = IntegerField('Minimum library version:', [validators.Optional()]) min_client_version = IntegerField('Minimum pipeline version:', [validators.Optional()]) alphabet = StringField('Alphabet:', [validators.InputRequired()]) url_template = StringField('URL template:', [ validators.InputRequired(), validators.Regexp( '^https?://.+{shortcode}', message='Template does not look like a URL template.'), ]) request_delay = FloatField('Time between requests (seconds)', [validators.InputRequired()]) method = RadioField('HTTP method (get/head):', [validators.InputRequired()], choices=[('head', 'head'), ('get', 'get')]) redirect_codes = NumListField('Redirect status codes:', [validators.InputRequired()]) no_redirect_codes = NumListField('No redirect status codes:', [validators.InputRequired()]) unavailable_codes = NumListField('Unavailable status codes:', ) banned_codes = NumListField('Banned status codes:', ) body_regex = StringField('Content body regular expression:') location_anti_regex = StringField( 'Location header reject regular expression:')
class NewBookingFormBase(IndicoForm): start_dt = DateTimeField('Start date', validators=[InputRequired()], parse_kwargs={'dayfirst': True}, display_format='%d/%m/%Y %H:%M') end_dt = DateTimeField('End date', validators=[InputRequired()], parse_kwargs={'dayfirst': True}, display_format='%d/%m/%Y %H:%M') repeat_frequency = RadioField('Repeat frequency', coerce=int, default=0, validators=[InputRequired()], choices=[(0, _('Once')), (1, _('Daily')), (2, _('Weekly')), (3, _('Monthly'))]) repeat_interval = IntegerField('Repeat interval', validators=[NumberRange(0, 3)], default=0) def validate_repeat_interval(self, field): if (self.repeat_frequency.data, self.repeat_interval.data) not in RepeatMapping.mapping: raise ValidationError('Invalid repeat step') def validate_start_dt(self, field): if field.data != field.object_data and field.data.date() < date.today() and not session.user.is_admin: raise ValidationError(_('The start time cannot be in the past.')) def validate_end_dt(self, field): start_dt = self.start_dt.data end_dt = self.end_dt.data if start_dt.time() >= end_dt.time(): raise ValidationError('Invalid times') if self.repeat_frequency.data == RepeatFrequency.NEVER: field.data = datetime.combine(start_dt.date(), field.data.time()) elif start_dt.date() >= end_dt.date(): raise ValidationError('Invalid period')
class NewBookingConfirmForm(NewBookingPeriodForm): room_usage = RadioField( [DataRequired()], choices=[('current_user', _("I'll be using the room myself")), ('other_user', _("I'm booking the room for someone else"))]) booked_for_user = PrincipalField( _('User'), [HiddenUnless('room_usage', 'other_user'), DataRequired()], allow_external=True) booking_reason = TextAreaField(_('Reason'), [DataRequired()]) uses_vc = BooleanField(_('I will use videoconference equipment')) used_equipment = IndicoQuerySelectMultipleCheckboxField( _('VC equipment'), get_label=lambda x: x.name) needs_vc_assistance = BooleanField( _('Request assistance for the startup of the videoconference session. ' 'This support is usually performed remotely.')) needs_assistance = BooleanField( _('Request personal assistance for meeting startup')) submit_book = SubmitField(_('Create booking')) submit_prebook = SubmitField(_('Create pre-booking')) def validate_used_equipment(self, field): if field.data and not self.uses_vc.data: raise ValidationError(_('Videoconference equipment is not used.')) elif not field.data and self.uses_vc.data: raise ValidationError( _('Please select the type of videoconference that you will use.' )) def validate_needs_vc_assistance(self, field): if field.data and not self.uses_vc.data: raise ValidationError(_('Videoconference equipment is not used.'))
class ShowForm(FlaskForm): artist_id = SelectField( 'Artist', validators=[InputRequired()], coerce=int, choices=[] ) venue_id = SelectField( 'Venue', validators=[InputRequired()], coerce=int, choices=[] ) start_time = DateTimeField( 'Start time', validators=[InputRequired(), ValidateDateTime(min_dt=ValidateDateTime.FIELD_DEFAULT, dt_format=APP_DATETIME_FMT)], format=APP_DATETIME_FMT, default=current_datetime() ) duration = RadioField( 'Duration', validators=[], coerce=int, choices=DURATION_CHOICES ) other_duration = AppTimeField( 'Other Duration', validators=[Optional()], format=APP_TIME_FMT ) def validate_duration(self, field): if field.data == OTHER_DURATION: self.other_duration.validators = [InputRequired()] else: self.other_duration.validators = [Optional()]
class BuyerSignupForm(DmForm): employment_status = RadioField( label= 'I am a public service employee or have authorisation, as described above.', choices=[ ('employee', 'I am an employee under the Commonwealth Public Service Act (1999) or under equivalent state or territory legislation and need access to the Digital Marketplace to perform my role.' ), # noqa ('contractor', 'I am a contractor working in local, state or federal government.' ), ], default='', validators=[ DataRequired(message='You must specify your employment status') ]) name = StripWhitespaceStringField( 'Your full name', id='name', validators=[ DataRequired(message='You must provide your full name'), ]) email_address = StripWhitespaceStringField( 'Email', id="input_email_address", validators=[ DataRequired(message='You must provide an email address'), government_email_validator, ])
def quiz_factory(quiz): class QuizForm(FlaskForm): pass for question in quiz.questions: if question.is_multicorrect: setattr( QuizForm, f"question_{question.id}", SelectMultipleField(question.question, choices=[(option.id, option.option) for option in question.options], coerce=int, validators=[DataRequired('Data required') ])) else: setattr( QuizForm, f"question_{question.id}", RadioField(question.question, choices=[(option.id, option.option) for option in question.options], coerce=int, validators=[DataRequired('Data required')])) setattr(QuizForm, 'Submit', SubmitField('Submit')) print(vars(QuizForm)) return QuizForm, ['Submit']
class SortShopList(FlaskForm): options = RadioField(choices=[ ('name', 'Sort by Item Name'), ('percent', 'Sort by percent of Minimum Stock'), ('days', 'Sort by predicted days to minimum stock') ], validators=[DataRequired()]) submit = SubmitField('Choose Sorting Method')
class SelectEdit(FlaskForm): options = RadioField(choices=[('new', 'Add New Item to Stock List'), ('remove', 'Remove Item From Stock List'), ('edit', 'Edit Name or Minimum Stock of Item')], default='new', validators=[DataRequired()]) submit = SubmitField('Select Change')
class StartForm(Form): #IGNORE:R0924 """ Start the signup process. Involves choosing 'preflop' or 'situation' path. """ path = RadioField(choices=[ ('situations', 'Situations - post-flop situation training'), ('preflop', 'Preflop - complete hand training') ], default='situations', validators=[Required()])
class NewBookingSimpleForm(NewBookingConfirmForm): submit_check = SubmitField(_('Check conflicts')) booking_reason = TextAreaField(_('Reason'), [UsedIf(lambda form, field: not form.submit_check.data), DataRequired()]) room_usage = RadioField(validators=[UsedIf(lambda form, field: not form.submit_check.data), DataRequired()], choices=[('current_user', _("I'll be using the room myself")), ('other_user', _("I'm booking the room for someone else"))]) booked_for_user = PrincipalField(_('User'), [UsedIf(lambda form, field: not form.submit_check.data), HiddenUnless('room_usage', 'other_user'), DataRequired()], allow_external=True)
class NewBookingCriteriaForm(NewBookingFormBase): room_ids = SelectMultipleField('Rooms', [DataRequired()], coerce=int) flexible_dates_range = RadioField('Flexible days', coerce=int, default=0, choices=[(0, _('Exact')), (1, '±{}'.format(_('1 day'))), (2, '±{}'.format(_('2 days'))), (3, '±{}'.format(_('3 days')))]) def validate_flexible_dates_range(self, field): if self.repeat_frequency.data == RepeatFrequency.DAY: field.data = 0
class DataAnalysis(Form): NONE_LABEL = 'None' YEAR_LABEL = 'Year' MONTH_LABEL = 'Month' WEEK_LABEL = 'Week' patient = BooleanField('Patient', default=False) test_type = BooleanField('Test type', default=False) test_date = RadioField('Test Date', default=NONE_LABEL, choices=[(NONE_LABEL, NONE_LABEL), (YEAR_LABEL, YEAR_LABEL), (MONTH_LABEL, MONTH_LABEL), (WEEK_LABEL, WEEK_LABEL)])
class PredictDataForm(FieldsRequiredForm): passenger_class = RadioField('Passenger class', choices=[(1, 'First'), (2, 'Second'), (3, 'Third')], coerce=int) sex = RadioField('Sex', choices=[(0, 'Male'), (1, 'Female')], coerce=int) age = IntegerField('Age', validators=[InputRequired()]) siblings_or_spouse = IntegerField('Number of siblings or spouses aboard', validators=[InputRequired()]) parch = IntegerField('Number of parents or children aboard', validators=[InputRequired()]) fare = IntegerField('Fare', validators=[InputRequired()]) embarked = StringField('Embarked', validators=[ InputRequired(), AnyOf( ['cherbourg', 'queenstown', 'southampton']) ]) embarked = RadioField('Embarked', choices=[('cherbourg', 'Cherbourg'), ('queenstown', 'Queenstown'), ('southampton', 'Southampton')]) submit = SubmitField('Submit')
class StockUpdate(FlaskForm): """"form for update stock view""" item_name = SelectField('Stock Item', validators=[DataRequired()]) item_quantity = IntegerField( 'Quantity', validators=[DataRequired(), NumberRange(min=1)]) actions = RadioField(choices=[ 'New stock to kitchen', 'New stock to garage', 'Move from kitchen to garage', 'Move from garage to kitchen', 'Use kitchen stock', 'Use garage stock' ], validators=[DataRequired()]) submit = SubmitField('Enter', validators=[DataRequired()])
class RequestCabForm(FlaskForm): cab_code = IntegerField(u'barcode', validators=[DataRequired()], render_kw={ 'class': HTMLclass_form_control, 'placeholder': u"entrez le code barre de l'ouvrage ", "onfocus": u"this.placeholder = ''" }) categ = RadioField(u'catΓ©gorie', choices=[(key_parc_envies, u'envie de lire'), (key_parc_lus, u'ouvrage lu')], render_kw={'class': HTMLclass_radio_line}, default=key_parc_envies)
class Data(FlaskForm): name = StringField('Name', validators=[DataRequired()]) url = StringField('Geo-Link', validators=[DataRequired(), URL()]) food_rating = SelectField( 'Food π', choices=['π', 'ππ', 'πππ', 'ππππ', 'πππππ'], validators=[DataRequired(message="Please Choose rating")]) spot_rating = SelectField( 'Spot ποΈ', choices=['ποΈ', 'ποΈποΈ', 'ποΈποΈποΈ', 'ποΈποΈποΈποΈ', 'ποΈποΈποΈποΈποΈ'], validators=[DataRequired(message="Please Choose rating")]) price_rating = RadioField( 'Price π°', choices=['π°', 'π°π°', 'π°π°π°', 'π°π°π°π°', 'π°π°π°π°π°'], validators=[DataRequired(message="Please Choose rating")], validate_choice=True) submit = SubmitField("submit")
class SearchRoomsForm(IndicoForm): location = QuerySelectField(_(u'Location'), get_label=lambda x: x.name, query_factory=Location.find, allow_blank=True) details = StringField() available = RadioField(_(u'Availability'), coerce=int, default=-1, widget=ConcatWidget(prefix_label=False), choices=[(1, _(u'Available')), (0, _(u'Booked')), (-1, _(u"Don't care"))]) capacity = IntegerField(_(u'Capacity'), validators=[Optional(), NumberRange(min=0)]) available_equipment = IndicoQuerySelectMultipleCheckboxField( _(u'Equipment'), get_label=_get_equipment_label, modify_object_list=_group_equipment, query_factory=lambda: EquipmentType.find().order_by(EquipmentType.name )) is_only_public = BooleanField(_(u'Only public rooms'), default=True) is_auto_confirm = BooleanField(_(u'Only rooms not requiring confirmation'), default=True) is_only_active = BooleanField(_(u'Only active rooms'), default=True) is_only_my_rooms = BooleanField(_(u'Only my rooms')) # Period details when searching for (un-)availability start_dt = DateTimeField(_(u'Start date'), validators=[Optional()], parse_kwargs={'dayfirst': True}, display_format='%d/%m/%Y %H:%M', widget=HiddenInput()) end_dt = DateTimeField(_(u'End date'), validators=[Optional()], parse_kwargs={'dayfirst': True}, display_format='%d/%m/%Y %H:%M', widget=HiddenInput()) repeatability = StringField( ) # TODO: use repeat_frequency/interval with new UI include_pending_blockings = BooleanField( _(u'Check conflicts against pending blockings'), default=True) include_pre_bookings = BooleanField( _(u'Check conflicts against pre-bookings'), default=True)
class UserCreateForm(FlaskForm): username = StringField( 'μ¬μ©μ μ΄λ¦', validators=[DataRequired("μ΄λ¦μ μ λ ₯ν΄μ£ΌμΈμ."), Length(min=3, max=25)]) nickname = StringField( 'λλ€μ', validators=[DataRequired("λλ€μμ μ λ ₯ν΄μ£ΌμΈμ."), Length(min=2, max=12)]) password1 = PasswordField('λΉλ°λ²νΈ', validators=[ DataRequired('λΉλ°λ²νΈλ₯Ό μ λ ₯ν΄μ£ΌμΈμ.'), EqualTo('password2', 'λΉλ°λ²νΈκ° μΌμΉνμ§ μμ΅λλ€.') ]) password2 = PasswordField('λΉλ°λ²νΈ νμΈ', validators=[DataRequired('λΉλ°λ²νΈλ₯Ό μ λ ₯ν΄μ£ΌμΈμ.')]) email = EmailField('μ΄λ©μΌ', [DataRequired('μ΄λ©μΌμ μ λ ₯ν΄μ£ΌμΈμ.'), Email()]) phone = StringField( 'ν΄λμ ν λ²νΈ', validators=[DataRequired('μ νλ²νΈλ₯Ό μ λ ₯ν΄μ£ΌμΈμ.'), Length(min=10, max=15)]) gender = RadioField('μ±λ³', validators=[DataRequired('μ±λ³μ μ ννμΈμ')], choices=[("λ¨μ", 'λ¨μ'), ("μ¬μ", 'μ¬μ')])
class TargetWeightForm(FlaskForm): sex = RadioField(label='Gender',choices=[('m',"β Male"),('f',"β Female")],default='m') age = IntegerField("Age (years)",widget=TelInput()) bw = FloatField("Body Weight (lb)",widget=TelInput()) movement = SelectField( "Barbell Movement", choices=[ ('01','Front Squat'), ('02','Back Squat'), ('03','Overhead Squat'), ('04','Clean (Squat Clean)'), ('05','Power Clean'), ('06','Clean & Jerk'), ('07','Deadlift'), ('08','Snatch (Squat Snatch)'), ('09','Power Snatch'), ('10','Strict Press'), ('11','Push Press'), ('12','Push Jerk'), ('13','Thruster'), ('14','Bench Press'), ] ) submit = SubmitField("Calculate")
class data (Form): breathing_problem = RadioField("Apakah anda mengalami gangguan pernapasan?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) fever = RadioField("Apakah anda mengalami demam (suhu >38 derajat)?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) dry_cough = RadioField("Apakah anda mengalami batuk kering?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) sore_throat = RadioField("Apakah anda mengalami sakit tenggorokan?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) running_nose = RadioField("Apakah anda mengalami hidung berair", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) asthma = RadioField("Apakah anda memiliki riwayat penyakit asma?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) cronicc_lung_disease = RadioField( "Apakah anda memiliki riwayat penyakit paru-paru kronis?", choices=[('Y', 'Ya'), ('T', 'Tidak')]) headache = RadioField("Apakah anda mengalami sakit kepala?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) heart_disease = RadioField("Apakah anda memiliki penyakit jantung?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) diabetes = RadioField("Apakah anda memiliki riwayat penyakit diabetes?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) hypertension = RadioField("Apakah anda memiliki hipertensi (darah tinggi)", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) fatigue = RadioField("Apakah anda merasa kelelahan?", choices=[('Y', 'Ya'), ('T', 'Tidak')]) gastro = RadioField("Apakah anda memiliki masalah pencernaan atau lambung?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) abroad_travel = RadioField("Apakah anda dalam waktu 14 hari ini melakukan perjalanan keluar negeri?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) contact = RadioField("Apakah anda pernah melakukan kontak dengan seorang pengidap COVID dalam waktu 14 hari ini?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) attend_large_gath = RadioField("Apakah dalam waktu 14 hari ini anda menghadiri pertemuan yang dihari oleh banyak orang? ", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) visited_public = RadioField("Apakah dalam waktu 14 hari ini anda mengunjungi tempat publik?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) fams_working_in_pub = RadioField( "Apakah ada keluarga anda yang bekerja di tempat umum?", choices=[('Y', 'Ya'), ('T', 'Tidak')]) wearing_mask = RadioField("Apakah anda tetap menggunakan masker?", choices=[ ('Y', 'Ya'), ('T', 'Tidak')]) sanitation_from_market = RadioField( "Apakah anda membersikan/sanitize barang-barang yang dibeli dari supermarket?", choices=[('Y', 'Ya'), ('T', 'Tidak')]) kirim = SubmitField("Kirim")
class QuestionForm(FlaskForm): """Question Form.""" answers = RadioField('Select from:', choices=[])
class PreflopForm(Form): # IGNORE:R0924 """ User chooses a preflop situation. """ situationid = RadioField(default='1', validators=[Required()])
class VenueForm(Form): name = StringField('name', validators=[DataRequired()]) city = StringField('city', validators=[DataRequired()]) state = SelectField('state', validators=[DataRequired()], choices=[ ('AL', 'AL'), ('AK', 'AK'), ('AZ', 'AZ'), ('AR', 'AR'), ('CA', 'CA'), ('CO', 'CO'), ('CT', 'CT'), ('DE', 'DE'), ('DC', 'DC'), ('FL', 'FL'), ('GA', 'GA'), ('HI', 'HI'), ('ID', 'ID'), ('IL', 'IL'), ('IN', 'IN'), ('IA', 'IA'), ('KS', 'KS'), ('KY', 'KY'), ('LA', 'LA'), ('ME', 'ME'), ('MT', 'MT'), ('NE', 'NE'), ('NV', 'NV'), ('NH', 'NH'), ('NJ', 'NJ'), ('NM', 'NM'), ('NY', 'NY'), ('NC', 'NC'), ('ND', 'ND'), ('OH', 'OH'), ('OK', 'OK'), ('OR', 'OR'), ('MD', 'MD'), ('MA', 'MA'), ('MI', 'MI'), ('MN', 'MN'), ('MS', 'MS'), ('MO', 'MO'), ('PA', 'PA'), ('RI', 'RI'), ('SC', 'SC'), ('SD', 'SD'), ('TN', 'TN'), ('TX', 'TX'), ('UT', 'UT'), ('VT', 'VT'), ('VA', 'VA'), ('WA', 'WA'), ('WV', 'WV'), ('WI', 'WI'), ('WY', 'WY'), ]) address = StringField('address', validators=[DataRequired()]) phone = StringField('phone') image_link = StringField('image_link') genres = SelectMultipleField( # TODO implement enum restriction 'genres', validators=[DataRequired()], choices=[ ('Alternative', 'Alternative'), ('Blues', 'Blues'), ('Classical', 'Classical'), ('Country', 'Country'), ('Electronic', 'Electronic'), ('Folk', 'Folk'), ('Funk', 'Funk'), ('Hip-Hop', 'Hip-Hop'), ('Heavy Metal', 'Heavy Metal'), ('Instrumental', 'Instrumental'), ('Jazz', 'Jazz'), ('Musical Theatre', 'Musical Theatre'), ('Pop', 'Pop'), ('Punk', 'Punk'), ('R&B', 'R&B'), ('Reggae', 'Reggae'), ('Rock n Roll', 'Rock n Roll'), ('Soul', 'Soul'), ('Other', 'Other'), ]) facebook_link = StringField('facebook_link', validators=[URL()]) website = StringField('website', validators=[URL()]) seeking_talent = RadioField('seeking_talent', validators=[URL()], choices=[('true', 'Yes'), ('false', 'No')]) seeking_description = StringField('seeking_description', validators=[URL()])
class LifterProfileForm(FlaskForm): sex = RadioField(label="Gender",choices=[('m',"β Male"),('f',"β Female")]) name = StringField("Name") age = IntegerField("Age (years)",widget=TelInput()) bw = FloatField("Body Weight (lb)",widget=TelInput()) submit = SubmitField("Save Profile")
class ArtistForm(Form): name = StringField("name", validators=[DataRequired()]) city = StringField("city", validators=[DataRequired()]) state = SelectField( "state", validators=[DataRequired()], choices=[ ("AL", "AL"), ("AK", "AK"), ("AZ", "AZ"), ("AR", "AR"), ("CA", "CA"), ("CO", "CO"), ("CT", "CT"), ("DE", "DE"), ("DC", "DC"), ("FL", "FL"), ("GA", "GA"), ("HI", "HI"), ("ID", "ID"), ("IL", "IL"), ("IN", "IN"), ("IA", "IA"), ("KS", "KS"), ("KY", "KY"), ("LA", "LA"), ("ME", "ME"), ("MT", "MT"), ("NE", "NE"), ("NV", "NV"), ("NH", "NH"), ("NJ", "NJ"), ("NM", "NM"), ("NY", "NY"), ("NC", "NC"), ("ND", "ND"), ("OH", "OH"), ("OK", "OK"), ("OR", "OR"), ("MD", "MD"), ("MA", "MA"), ("MI", "MI"), ("MN", "MN"), ("MS", "MS"), ("MO", "MO"), ("PA", "PA"), ("RI", "RI"), ("SC", "SC"), ("SD", "SD"), ("TN", "TN"), ("TX", "TX"), ("UT", "UT"), ("VT", "VT"), ("VA", "VA"), ("WA", "WA"), ("WV", "WV"), ("WI", "WI"), ("WY", "WY"), ], ) phone = StringField( # TODO implement validation logic for state # I dont know how to do? # Could you please help? "phone" ) image_link = StringField("image_link") genres = SelectMultipleField( # DONE implement enum restriction "genres", validators=[DataRequired()], choices=[(genre, genre.name) for genre in MusicGenre], ) facebook_link = StringField( # TODO implement enum restriction # I dont know how to do? # Could you please help? "facebook_link", validators=[URL()], ) seeking_venue = RadioField( "seeking_venue", validators=[DataRequired()], choices=[(True, "Yes"), (False, "No")], ) seeking_description = StringField( "seeking_description", )
class OpenGamesForm(Form): # IGNORE:R0924 """ User chooses an open game to join. """ gameid = RadioField(validators=[Required()])
class UpdateProfile(FlaskForm): bio = TextAreaField('Tell us about you.', validators=[Required()]) DOB = DateField('DOB', format='%Y-%m-%d') MF = RadioField('Gender', choices=[('M', 'Male'), ('F', 'Female')]) submit = SubmitField('Submit')
class TextureForm(Form): #IGNORE:R0924 """ User chooses a postflop situation texture. """ texture = RadioField(default='random', validators=[Required()])
return cls.QRFormat.format(crypt=dict['crypt'], ssid=dict['ssid'], passwd=dict['passwd'], hidden=hidden) ssid = StringField(label='SSID', validators=[InputRequired()], render_kw={'placeholder': 'My Wi-Fi network'}) ssid_hidden = BooleanField(label='Hidden network', default=False) crypt = RadioField( label='Network cryptography', choices=[ ('WEP', 'WEP'), ('WPA', 'WPA (default)'), # ('WPA2-EAP', 'WPA2-EAP'), ('nopass', 'None') ], default='WPA', ) passwd = PasswordField( label='Password', render_kw={'placeholder': 'MyPass123 (optional)'}, ) class EventQRCodeForm(CustomFlaskForm): name = 'Event QR' QRFormat = \ """