Form
Flask form definitions for user management and video processing.
This module provides WTForms form classes for handling various user interactions including authentication, video submission, and analysis configuration.
BurstForm
Bases: FlaskForm
Form for burst video processing configuration.
Attributes:
Name | Type | Description |
---|---|---|
url |
TextField
|
Video URL input field |
type |
RadioField
|
Processing type selection (semi-automatic or automatic) |
Source code in apps/annotator/code/forms/form.py
34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
ConfirmCodeForm
Bases: FlaskForm
Email confirmation code form.
Attributes:
Name | Type | Description |
---|---|---|
code |
StringField
|
Confirmation code input field |
submit |
SubmitField
|
Form submission button |
Source code in apps/annotator/code/forms/form.py
82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
ForgotForm
Bases: FlaskForm
Password recovery request form.
Attributes:
Name | Type | Description |
---|---|---|
email |
StringField
|
User email input field |
submit |
SubmitField
|
Form submission button |
Source code in apps/annotator/code/forms/form.py
49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
GoldStandardForm
Bases: FlaskForm
Gold standard creation form.
Attributes:
Name | Type | Description |
---|---|---|
video |
RadioField
|
Video selection field |
annotators |
MultiCheckboxField
|
Multiple annotator selection |
agreements |
NonValidatingSelectField
|
Combination criteria selection |
name |
StringField
|
Gold standard name field |
submit |
SubmitField
|
Form submission button |
Source code in apps/annotator/code/forms/form.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
|
LoginForm
Bases: FlaskForm
User login form.
Attributes:
Name | Type | Description |
---|---|---|
email |
StringField
|
Email input field |
password |
PasswordField
|
Password input field |
remember_me |
BooleanField
|
Remember login option |
submit |
SubmitField
|
Form submission button |
Methods:
Name | Description |
---|---|
validate |
Validate login credentials |
Source code in apps/annotator/code/forms/form.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|
validate()
Validate login credentials against database.
Returns:
Type | Description |
---|---|
bool
|
True if credentials are valid, False otherwise |
Source code in apps/annotator/code/forms/form.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|
MultiCheckboxField
Bases: SelectMultipleField
Custom multiple checkbox field.
Attributes:
Name | Type | Description |
---|---|---|
widget |
ListWidget
|
List widget for checkboxes |
option_widget |
CheckboxInput
|
Individual checkbox widget |
Source code in apps/annotator/code/forms/form.py
225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
NonValidatingSelectField
Bases: SelectField
Select field without validation.
Methods:
Name | Description |
---|---|
pre_validate |
Skip field validation |
Source code in apps/annotator/code/forms/form.py
240 241 242 243 244 245 246 247 248 249 250 |
|
PasswordResetForm
Bases: FlaskForm
Password reset form.
Attributes:
Name | Type | Description |
---|---|---|
password |
PasswordField
|
New password input field |
password2 |
PasswordField
|
Password confirmation field |
submit |
SubmitField
|
Form submission button |
Source code in apps/annotator/code/forms/form.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
RegisterForm
Bases: FlaskForm
User registration form.
Attributes:
Name | Type | Description |
---|---|---|
name |
StringField
|
First name input field |
surname |
StringField
|
Last name input field |
email |
StringField
|
Email input field |
password |
PasswordField
|
Password input field |
password2 |
PasswordField
|
Password confirmation field |
submit |
SubmitField
|
Form submission button |
Methods:
Name | Description |
---|---|
validate_email |
Validate email uniqueness in database |
Source code in apps/annotator/code/forms/form.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
validate_email(email)
Check if email is already registered.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
email
|
StringField
|
Email field to validate |
required |
Raises:
Type | Description |
---|---|
ValidationError
|
If email exists in verified or unverified users |
Source code in apps/annotator/code/forms/form.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
addVideoForm
Bases: FlaskForm
Form for adding new video for annotation.
Attributes:
Name | Type | Description |
---|---|---|
url |
TextField
|
Video URL input field |
annotator |
StringField
|
Annotator name input field with a required validator. |
submit |
SubmitField
|
Form submission button |
Source code in apps/annotator/code/forms/form.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
analysisForm
Bases: FlaskForm
Analysis configuration form.
Attributes:
Name | Type | Description |
---|---|---|
video |
RadioField
|
Video selection field |
annotator |
RadioField
|
Annotator selection field |
Source code in apps/annotator/code/forms/form.py
210 211 212 213 214 215 216 217 218 219 220 221 222 |
|