[7191] | 1 | ## $Id: interfaces.py 7951 2012-03-22 07:21:20Z henrik $ |
---|
[6621] | 2 | ## |
---|
[7191] | 3 | ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
[6996] | 18 | from datetime import datetime |
---|
[7620] | 19 | from zope.component import getUtility |
---|
[7256] | 20 | from zope.interface import Attribute, Interface |
---|
[6621] | 21 | from zope import schema |
---|
[7620] | 22 | from zc.sourcefactory.contextual import BasicContextualSourceFactory |
---|
[7811] | 23 | from waeup.kofa.interfaces import ( |
---|
[7819] | 24 | IKofaObject, academic_sessions_vocab, validate_email, IKofaUtils) |
---|
[7811] | 25 | from waeup.kofa.interfaces import MessageFactory as _ |
---|
| 26 | from waeup.kofa.schema import TextLineChoice |
---|
| 27 | from waeup.kofa.students.vocabularies import ( |
---|
[7915] | 28 | StudyLevelSource, contextual_reg_num_source, contextual_mat_num_source, |
---|
| 29 | GenderSource, nats_vocab, |
---|
| 30 | ) |
---|
[7811] | 31 | from waeup.kofa.payments.interfaces import IPaymentsContainer, IOnlinePayment |
---|
[7915] | 32 | from waeup.kofa.university.vocabularies import ( |
---|
| 33 | CourseSource, StudyModeSource, CertificateSource) |
---|
[6621] | 34 | |
---|
[7620] | 35 | # VerdictSource can't be placed into the vocabularies module because it |
---|
| 36 | # requires importing IStudentsUtils which then leads to circular imports. |
---|
| 37 | class VerdictSource(BasicContextualSourceFactory): |
---|
| 38 | """A verdicts source delivers all verdicts provided |
---|
| 39 | in the portal. |
---|
| 40 | """ |
---|
| 41 | def getValues(self, context): |
---|
[7841] | 42 | verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT |
---|
[7688] | 43 | return verdicts_dict.keys() |
---|
[7620] | 44 | |
---|
| 45 | def getToken(self, context, value): |
---|
| 46 | return value |
---|
| 47 | |
---|
| 48 | def getTitle(self, context, value): |
---|
[7841] | 49 | verdicts_dict = getUtility(IStudentsUtils).VERDICTS_DICT |
---|
[7688] | 50 | return verdicts_dict[value] |
---|
[7620] | 51 | |
---|
[7681] | 52 | |
---|
[7150] | 53 | class IStudentsUtils(Interface): |
---|
| 54 | """A collection of methods which are subject to customization. |
---|
| 55 | |
---|
| 56 | """ |
---|
[7841] | 57 | def setReturningData(student): |
---|
| 58 | """ This method defines what happens after school fee payment |
---|
| 59 | depending on the student's senate verdict. |
---|
| 60 | |
---|
| 61 | In the base configuration current level is always increased |
---|
| 62 | by 100 no matter which verdict has been assigned. |
---|
| 63 | """ |
---|
| 64 | |
---|
[7186] | 65 | def getPaymentDetails(category, student): |
---|
[7150] | 66 | """Get the payment dates of a student for the payment category |
---|
| 67 | specified. |
---|
| 68 | |
---|
| 69 | """ |
---|
| 70 | |
---|
[7186] | 71 | def getAccommodation_details(student): |
---|
[7150] | 72 | """Determine the accommodation dates of a student. |
---|
| 73 | |
---|
| 74 | """ |
---|
| 75 | |
---|
[7186] | 76 | def selectBed(available_beds): |
---|
[7150] | 77 | """Select a bed from a list of available beds. |
---|
| 78 | |
---|
| 79 | In the standard configuration we select the first bed found, |
---|
| 80 | but can also randomize the selection if we like. |
---|
| 81 | """ |
---|
| 82 | |
---|
[7186] | 83 | def renderPDF(view, subject='', filename='slip.pdf',): |
---|
[7150] | 84 | """Render pdf slips for various pages. |
---|
| 85 | |
---|
| 86 | """ |
---|
| 87 | |
---|
[7819] | 88 | class IStudentsContainer(IKofaObject): |
---|
[7096] | 89 | """A students container contains university students. |
---|
[6692] | 90 | |
---|
| 91 | """ |
---|
| 92 | def addStudent(student): |
---|
| 93 | """Add an IStudent object and subcontainers. |
---|
| 94 | |
---|
| 95 | """ |
---|
| 96 | |
---|
| 97 | def archive(id=None): |
---|
| 98 | """Create on-dist archive of students. |
---|
| 99 | |
---|
| 100 | If id is `None`, all students are archived. |
---|
| 101 | |
---|
| 102 | If id contains a single id string, only the respective |
---|
| 103 | students are archived. |
---|
| 104 | |
---|
| 105 | If id contains a list of id strings all of the respective |
---|
| 106 | students types are saved to disk. |
---|
| 107 | """ |
---|
| 108 | |
---|
| 109 | def clear(id=None, archive=True): |
---|
| 110 | """Remove students of type given by 'id'. |
---|
| 111 | |
---|
| 112 | Optionally archive the students. |
---|
| 113 | |
---|
| 114 | If id is `None`, all students are archived. |
---|
| 115 | |
---|
| 116 | If id contains a single id string, only the respective |
---|
| 117 | students are archived. |
---|
| 118 | |
---|
| 119 | If id contains a list of id strings all of the respective |
---|
| 120 | student types are saved to disk. |
---|
| 121 | |
---|
| 122 | If `archive` is ``False`` none of the archive-handling is done |
---|
| 123 | and respective students are simply removed from the |
---|
| 124 | database. |
---|
| 125 | """ |
---|
| 126 | |
---|
[7819] | 127 | class IStudentNavigation(IKofaObject): |
---|
[6642] | 128 | """Interface needed for student navigation. |
---|
[7150] | 129 | |
---|
[6642] | 130 | """ |
---|
| 131 | def getStudent(): |
---|
| 132 | """Return student object. |
---|
[7150] | 133 | |
---|
[6642] | 134 | """ |
---|
| 135 | |
---|
[7819] | 136 | class IStudentBase(IKofaObject): |
---|
[6631] | 137 | """Representation of student base data. |
---|
[7150] | 138 | |
---|
[6621] | 139 | """ |
---|
[7062] | 140 | history = Attribute('Object history, a list of messages') |
---|
[6637] | 141 | state = Attribute('Returns the registration state of a student') |
---|
[6699] | 142 | password = Attribute('Encrypted password of a student') |
---|
[7203] | 143 | certcode = Attribute('The certificate code of any chosen study course') |
---|
| 144 | depcode = Attribute('The department code of any chosen study course') |
---|
| 145 | faccode = Attribute('The faculty code of any chosen study course') |
---|
[7062] | 146 | current_session = Attribute('The current session of the student') |
---|
[7641] | 147 | current_mode = Attribute('The current mode of the student') |
---|
[7364] | 148 | fullname = Attribute('All name parts separated by hyphens') |
---|
| 149 | display_fullname = Attribute('The fullname of an applicant') |
---|
[6637] | 150 | |
---|
| 151 | def loggerInfo(ob_class, comment): |
---|
[7150] | 152 | """Adds an INFO message to the log file. |
---|
| 153 | |
---|
[6637] | 154 | """ |
---|
| 155 | |
---|
[6665] | 156 | student_id = schema.TextLine( |
---|
[7723] | 157 | title = _(u'Student Id'), |
---|
[6849] | 158 | required = False, |
---|
[6665] | 159 | ) |
---|
| 160 | |
---|
[7357] | 161 | firstname = schema.TextLine( |
---|
[7723] | 162 | title = _(u'First Name'), |
---|
[6621] | 163 | required = True, |
---|
| 164 | ) |
---|
| 165 | |
---|
[7357] | 166 | middlename = schema.TextLine( |
---|
[7723] | 167 | title = _(u'Middle Name'), |
---|
[7357] | 168 | required = False, |
---|
| 169 | ) |
---|
| 170 | |
---|
| 171 | lastname = schema.TextLine( |
---|
[7723] | 172 | title = _(u'Last Name (Surname)'), |
---|
[7357] | 173 | required = True, |
---|
| 174 | ) |
---|
| 175 | |
---|
[6996] | 176 | sex = schema.Choice( |
---|
[7723] | 177 | title = _(u'Sex'), |
---|
[6996] | 178 | source = GenderSource(), |
---|
| 179 | default = u'm', |
---|
| 180 | required = True, |
---|
| 181 | ) |
---|
| 182 | |
---|
[6788] | 183 | reg_number = TextLineChoice( |
---|
[7723] | 184 | title = _(u'Registration Number'), |
---|
[6696] | 185 | required = True, |
---|
| 186 | readonly = False, |
---|
[6788] | 187 | source = contextual_reg_num_source, |
---|
[6696] | 188 | ) |
---|
| 189 | |
---|
[6788] | 190 | matric_number = TextLineChoice( |
---|
[7723] | 191 | title = _(u'Matriculation Number'), |
---|
[6788] | 192 | #default = u'', |
---|
[6750] | 193 | required = False, |
---|
| 194 | readonly = False, |
---|
[6788] | 195 | source = contextual_mat_num_source, |
---|
[6750] | 196 | ) |
---|
| 197 | |
---|
[6769] | 198 | adm_code = schema.TextLine( |
---|
[7723] | 199 | title = _(u'PWD Activation Code'), |
---|
[6769] | 200 | default = u'', |
---|
| 201 | required = False, |
---|
| 202 | readonly = True, |
---|
| 203 | ) |
---|
| 204 | |
---|
[7133] | 205 | email = schema.ASCIILine( |
---|
[7723] | 206 | title = _(u'Email'), |
---|
[7133] | 207 | required = False, |
---|
| 208 | constraint=validate_email, |
---|
| 209 | ) |
---|
[7325] | 210 | phone = schema.TextLine( |
---|
[7723] | 211 | title = _(u'Phone'), |
---|
[7331] | 212 | description = u'', |
---|
[7133] | 213 | required = False, |
---|
| 214 | ) |
---|
| 215 | |
---|
[7819] | 216 | class IStudentClearance(IKofaObject): |
---|
[6631] | 217 | """Representation of student clearance data. |
---|
[7150] | 218 | |
---|
[6631] | 219 | """ |
---|
| 220 | date_of_birth = schema.Date( |
---|
[7723] | 221 | title = _(u'Date of Birth'), |
---|
[6631] | 222 | required = True, |
---|
| 223 | ) |
---|
| 224 | |
---|
[6695] | 225 | clearance_locked = schema.Bool( |
---|
[7723] | 226 | title = _(u'Clearance form locked'), |
---|
[6695] | 227 | default = False, |
---|
| 228 | ) |
---|
| 229 | |
---|
[6769] | 230 | clr_code = schema.TextLine( |
---|
[7723] | 231 | title = _(u'CLR Activation Code'), |
---|
[6769] | 232 | default = u'', |
---|
| 233 | required = False, |
---|
| 234 | readonly = True, |
---|
| 235 | ) |
---|
| 236 | |
---|
[7523] | 237 | nationality = schema.Choice( |
---|
| 238 | source = nats_vocab, |
---|
[7723] | 239 | title = _(u'Nationality'), |
---|
[7523] | 240 | default = 'nigeria', |
---|
| 241 | required = True, |
---|
| 242 | ) |
---|
| 243 | |
---|
[7819] | 244 | class IStudentPersonal(IKofaObject): |
---|
[6631] | 245 | """Representation of student personal data. |
---|
[7150] | 246 | |
---|
[6631] | 247 | """ |
---|
[6651] | 248 | perm_address = schema.Text( |
---|
[7723] | 249 | title = _(u'Permanent Address'), |
---|
[6631] | 250 | required = False, |
---|
| 251 | ) |
---|
| 252 | |
---|
| 253 | class IStudent(IStudentBase,IStudentClearance,IStudentPersonal): |
---|
| 254 | """Representation of a student. |
---|
[7150] | 255 | |
---|
[6631] | 256 | """ |
---|
| 257 | |
---|
[6849] | 258 | class IStudentUpdateByRegNo(IStudent): |
---|
| 259 | """Representation of a student. Skip regular reg_number validation. |
---|
[7150] | 260 | |
---|
[6849] | 261 | """ |
---|
| 262 | reg_number = schema.TextLine( |
---|
[7723] | 263 | title = _(u'Registration Number'), |
---|
[6849] | 264 | default = None, |
---|
| 265 | required = False, |
---|
| 266 | ) |
---|
| 267 | |
---|
| 268 | class IStudentUpdateByMatricNo(IStudent): |
---|
| 269 | """Representation of a student. Skip regular matric_number validation. |
---|
[7150] | 270 | |
---|
[6849] | 271 | """ |
---|
| 272 | matric_number = schema.TextLine( |
---|
[7723] | 273 | title = _(u'Matriculation Number'), |
---|
[6849] | 274 | default = None, |
---|
| 275 | required = False, |
---|
| 276 | ) |
---|
| 277 | |
---|
[7819] | 278 | class IStudentStudyCourse(IKofaObject): |
---|
[6633] | 279 | """A container for student study levels. |
---|
| 280 | |
---|
| 281 | """ |
---|
[6648] | 282 | certificate = schema.Choice( |
---|
[7723] | 283 | title = _(u'Certificate'), |
---|
[6648] | 284 | source = CertificateSource(), |
---|
| 285 | default = None, |
---|
[7209] | 286 | required = False, |
---|
[6633] | 287 | ) |
---|
[6635] | 288 | |
---|
[6996] | 289 | entry_mode = schema.Choice( |
---|
[7723] | 290 | title = _(u'Entry Mode'), |
---|
[7681] | 291 | source = StudyModeSource(), |
---|
[6996] | 292 | default = u'ug_ft', |
---|
| 293 | required = True, |
---|
| 294 | readonly = False, |
---|
| 295 | ) |
---|
| 296 | |
---|
| 297 | entry_session = schema.Choice( |
---|
[7723] | 298 | title = _(u'Entry Session'), |
---|
[6996] | 299 | source = academic_sessions_vocab, |
---|
[7425] | 300 | #default = datetime.now().year, |
---|
| 301 | default = None, |
---|
[6996] | 302 | required = True, |
---|
| 303 | readonly = False, |
---|
| 304 | ) |
---|
| 305 | |
---|
[6724] | 306 | current_session = schema.Choice( |
---|
[7723] | 307 | title = _(u'Current Session'), |
---|
[6744] | 308 | source = academic_sessions_vocab, |
---|
[6724] | 309 | default = None, |
---|
| 310 | required = True, |
---|
[6996] | 311 | readonly = False, |
---|
[6724] | 312 | ) |
---|
| 313 | |
---|
| 314 | current_level = schema.Choice( |
---|
[7723] | 315 | title = _(u'Current Level'), |
---|
[6725] | 316 | source = StudyLevelSource(), |
---|
[6724] | 317 | default = None, |
---|
[6725] | 318 | required = False, |
---|
[6996] | 319 | readonly = False, |
---|
[6724] | 320 | ) |
---|
| 321 | |
---|
| 322 | current_verdict = schema.Choice( |
---|
[7723] | 323 | title = _(u'Current Verdict'), |
---|
[7619] | 324 | source = VerdictSource(), |
---|
[6804] | 325 | default = '0', |
---|
[6725] | 326 | required = False, |
---|
[6724] | 327 | ) |
---|
| 328 | |
---|
| 329 | previous_verdict = schema.Choice( |
---|
[7723] | 330 | title = _(u'Previous Verdict'), |
---|
[7619] | 331 | source = VerdictSource(), |
---|
[6805] | 332 | default = '0', |
---|
[6725] | 333 | required = False, |
---|
[6724] | 334 | ) |
---|
| 335 | |
---|
[7951] | 336 | class IStudentVerdictUpdate(IKofaObject): |
---|
| 337 | """A interface for verdict imports. |
---|
| 338 | |
---|
| 339 | """ |
---|
| 340 | |
---|
| 341 | current_verdict = schema.Choice( |
---|
| 342 | title = _(u'Current Verdict'), |
---|
| 343 | source = VerdictSource(), |
---|
| 344 | required = True, |
---|
| 345 | ) |
---|
| 346 | |
---|
| 347 | current_session = schema.Choice( |
---|
| 348 | title = _(u'Current Session'), |
---|
| 349 | source = academic_sessions_vocab, |
---|
| 350 | default = None, |
---|
| 351 | required = True, |
---|
| 352 | ) |
---|
| 353 | |
---|
| 354 | current_level = schema.Choice( |
---|
| 355 | title = _(u'Current Level'), |
---|
| 356 | source = StudyLevelSource(), |
---|
| 357 | default = None, |
---|
| 358 | required = True, |
---|
| 359 | ) |
---|
| 360 | |
---|
[7819] | 361 | class IStudentStudyLevel(IKofaObject): |
---|
[6774] | 362 | """A container for course tickets. |
---|
| 363 | |
---|
| 364 | """ |
---|
| 365 | level = Attribute('The level code') |
---|
[6793] | 366 | validation_date = Attribute('The date of validation') |
---|
| 367 | validated_by = Attribute('User Id of course adviser') |
---|
[6774] | 368 | |
---|
[6793] | 369 | level_session = schema.Choice( |
---|
[7723] | 370 | title = _(u'Session'), |
---|
[6793] | 371 | source = academic_sessions_vocab, |
---|
| 372 | default = None, |
---|
| 373 | required = True, |
---|
| 374 | ) |
---|
[6781] | 375 | |
---|
[6793] | 376 | level_verdict = schema.Choice( |
---|
[7723] | 377 | title = _(u'Verdict'), |
---|
[7619] | 378 | source = VerdictSource(), |
---|
[6805] | 379 | default = '0', |
---|
[6793] | 380 | required = False, |
---|
| 381 | ) |
---|
| 382 | |
---|
[7819] | 383 | class ICourseTicket(IKofaObject): |
---|
[6781] | 384 | """A course ticket. |
---|
| 385 | |
---|
| 386 | """ |
---|
[6783] | 387 | code = Attribute('code of the original course') |
---|
| 388 | title = Attribute('title of the original course') |
---|
| 389 | credits = Attribute('credits of the original course') |
---|
| 390 | passmark = Attribute('passmark of the original course') |
---|
| 391 | semester = Attribute('semester of the original course') |
---|
[7304] | 392 | fcode = Attribute('faculty code of the original course') |
---|
| 393 | dcode = Attribute('department code of the original course') |
---|
[6781] | 394 | |
---|
[7665] | 395 | mandatory = schema.Bool( |
---|
[7723] | 396 | title = _(u'Mandatory'), |
---|
[6795] | 397 | default = False, |
---|
| 398 | required = False, |
---|
| 399 | readonly = False, |
---|
| 400 | ) |
---|
| 401 | |
---|
[6781] | 402 | score = schema.Int( |
---|
[7723] | 403 | title = _(u'Score'), |
---|
[6781] | 404 | default = 0, |
---|
| 405 | required = False, |
---|
| 406 | readonly = False, |
---|
| 407 | ) |
---|
| 408 | |
---|
[6806] | 409 | automatic = schema.Bool( |
---|
[7723] | 410 | title = _(u'Automatical Creation'), |
---|
[6806] | 411 | default = False, |
---|
| 412 | required = False, |
---|
| 413 | readonly = True, |
---|
| 414 | ) |
---|
| 415 | |
---|
[7661] | 416 | carry_over = schema.Bool( |
---|
[7723] | 417 | title = _(u'Carry-over Course'), |
---|
[7661] | 418 | default = False, |
---|
| 419 | required = False, |
---|
| 420 | readonly = False, |
---|
| 421 | ) |
---|
| 422 | |
---|
[7633] | 423 | def getLevel(): |
---|
| 424 | """Returns the id of the level the ticket has been added to. |
---|
| 425 | """ |
---|
| 426 | |
---|
| 427 | def getLevelSession(): |
---|
| 428 | """Returns the session of the level the ticket has been added to. |
---|
| 429 | """ |
---|
| 430 | |
---|
[6795] | 431 | class ICourseTicketAdd(ICourseTicket): |
---|
[7150] | 432 | """An interface for adding course tickets. |
---|
[6795] | 433 | |
---|
| 434 | """ |
---|
| 435 | course = schema.Choice( |
---|
[7723] | 436 | title = _(u'Course'), |
---|
[6795] | 437 | source = CourseSource(), |
---|
| 438 | readonly = False, |
---|
| 439 | ) |
---|
| 440 | |
---|
[7819] | 441 | class IStudentAccommodation(IKofaObject): |
---|
[6635] | 442 | """A container for student accommodation objects. |
---|
| 443 | |
---|
| 444 | """ |
---|
| 445 | |
---|
[7819] | 446 | class IBedTicket(IKofaObject): |
---|
[6989] | 447 | """A ticket for accommodation booking. |
---|
| 448 | |
---|
| 449 | """ |
---|
[6996] | 450 | bed = Attribute('The bed object.') |
---|
| 451 | |
---|
| 452 | bed_coordinates = schema.TextLine( |
---|
[7723] | 453 | title = _(u'Bed Coordinates'), |
---|
[6992] | 454 | default = None, |
---|
| 455 | required = False, |
---|
[7014] | 456 | readonly = False, |
---|
[6992] | 457 | ) |
---|
| 458 | |
---|
[6996] | 459 | bed_type = schema.TextLine( |
---|
[7723] | 460 | title = _(u'Bed Type'), |
---|
[6996] | 461 | default = None, |
---|
| 462 | required = False, |
---|
[7014] | 463 | readonly = False, |
---|
[6996] | 464 | ) |
---|
| 465 | |
---|
[6992] | 466 | booking_session = schema.Choice( |
---|
[7723] | 467 | title = _(u'Session'), |
---|
[6992] | 468 | source = academic_sessions_vocab, |
---|
| 469 | default = None, |
---|
| 470 | required = True, |
---|
[7014] | 471 | readonly = True, |
---|
[6992] | 472 | ) |
---|
| 473 | |
---|
| 474 | booking_date = schema.Datetime( |
---|
[7723] | 475 | title = _(u'Booking Date'), |
---|
[6992] | 476 | required = False, |
---|
[7014] | 477 | readonly = True, |
---|
[6992] | 478 | ) |
---|
| 479 | |
---|
| 480 | booking_code = schema.TextLine( |
---|
[7723] | 481 | title = _(u'Booking Activation Code'), |
---|
[6992] | 482 | default = u'', |
---|
| 483 | required = False, |
---|
[7014] | 484 | readonly = True, |
---|
[6992] | 485 | ) |
---|
| 486 | |
---|
[6994] | 487 | def getSessionString(): |
---|
[7633] | 488 | """Returns the title of academic_sessions_vocab term. |
---|
[7150] | 489 | |
---|
[6994] | 490 | """ |
---|
[6992] | 491 | |
---|
[6860] | 492 | class IStudentPaymentsContainer(IPaymentsContainer): |
---|
[6635] | 493 | """A container for student payment objects. |
---|
| 494 | |
---|
| 495 | """ |
---|
| 496 | |
---|
[6877] | 497 | class IStudentOnlinePayment(IOnlinePayment): |
---|
| 498 | """A student payment via payment gateways. |
---|
| 499 | |
---|
| 500 | """ |
---|
| 501 | p_session = schema.Choice( |
---|
[7723] | 502 | title = _(u'Payment Session'), |
---|
[6877] | 503 | source = academic_sessions_vocab, |
---|
| 504 | required = False, |
---|
| 505 | ) |
---|
| 506 | |
---|
| 507 | IStudentOnlinePayment['p_session'].order = IStudentOnlinePayment[ |
---|
| 508 | 'p_item'].order |
---|
| 509 | |
---|
[7819] | 510 | class IStudentChangePassword(IKofaObject): |
---|
[7369] | 511 | """Interface needed for change pasword page. |
---|
| 512 | |
---|
| 513 | """ |
---|
| 514 | |
---|
| 515 | reg_number = schema.TextLine( |
---|
[7723] | 516 | title = _(u'Registration Number'), |
---|
[7369] | 517 | default = None, |
---|
| 518 | required = True, |
---|
| 519 | readonly = False, |
---|
| 520 | ) |
---|
| 521 | |
---|
| 522 | email = schema.ASCIILine( |
---|
[7723] | 523 | title = _(u'Email Address'), |
---|
[7369] | 524 | required = True, |
---|
| 525 | constraint=validate_email, |
---|
| 526 | ) |
---|