Ignore:
Timestamp:
16 Apr 2012, 09:16:34 (13 years ago)
Author:
uli
Message:

Use PhoneNumber?.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r8173 r8176  
    5555    FriendlyDateDisplayWidget, FriendlyDateDisplayWidget,
    5656    FriendlyDatetimeDisplayWidget)
    57 from waeup.kofa.widgets.phonewidget import PhoneWidget
    5857from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
    5958
     
    353352        'firstname', 'middlename', 'lastname',
    354353        'email', 'phone')
    355     form_fields['phone'].custom_widget = PhoneWidget
    356354    label = _('Add applicant')
    357355    pnav = 3
     
    616614    form_fields['student_id'].for_display = True
    617615    form_fields['applicant_id'].for_display = True
    618     form_fields['phone'].custom_widget = PhoneWidget
    619616    grok.template('applicanteditpage')
    620617    manage_applications = True
     
    749746        'screening_score',
    750747        )
    751     form_fields['phone'].custom_widget = PhoneWidget
    752748    form_fields['applicant_id'].for_display = True
    753749    form_fields['reg_number'].for_display = True
     
    872868            form_fields = grok.AutoFields(IApplicantEdit).select(
    873869                'firstname', 'middlename', 'lastname', 'email', 'phone')
    874             form_fields['phone'].custom_widget = PhoneWidget
    875 
    876870        return form_fields
    877871
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r8160 r8176  
    3333from waeup.kofa.interfaces import MessageFactory as _
    3434from waeup.kofa.payments.interfaces import IOnlinePayment
    35 #from waeup.kofa.schoolgrades import ResultEntryField
     35from waeup.kofa.schema import PhoneNumber
    3636from waeup.kofa.students.vocabularies import GenderSource
    3737from waeup.kofa.university.vocabularies import (
     
    356356        constraint=validate_email,
    357357        )
    358     phone = schema.TextLine(
     358    phone = PhoneNumber(
    359359        title = _(u'Phone'),
    360360        description = u'',
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r8079 r8176  
    6161from waeup.kofa.authentication import LocalRoleSetEvent
    6262from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
    63 from waeup.kofa.widgets.phonewidget import PhoneWidget
    6463from waeup.kofa.authentication import get_principal_role_manager
    6564from waeup.kofa.utils.helpers import get_user_account
     
    430429    grok.template('usereditformpage')
    431430    form_fields = grok.AutoFields(IUserAccount)
    432     form_fields['phone'].custom_widget = PhoneWidget
    433431    label = _('Add user')
    434432
     
    471469    grok.require('waeup.manageUsers')
    472470    form_fields = grok.AutoFields(IUserAccount).omit('name')
    473     form_fields['phone'].custom_widget = PhoneWidget
    474471
    475472    def label(self):
     
    552549        'name', 'description', 'roles')
    553550    label = _(u"My Preferences")
    554     form_fields['phone'].custom_widget = PhoneWidget
    555551
    556552    def setUpWidgets(self, ignore_request=False):
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r8079 r8176  
    3333from zope.schema.interfaces import IObject
    3434from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
     35from waeup.kofa.schema import PhoneNumber
    3536
    3637_ = MessageFactory = zope.i18nmessageid.MessageFactory('waeup.kofa')
     
    394395        required=False,)
    395396
    396     phone = schema.TextLine(
     397    phone = PhoneNumber(
    397398        title = _(u'Phone'),
    398399        description = u'',
     
    422423        )
    423424
    424     phone = schema.TextLine(
     425    phone = PhoneNumber(
    425426        title = _(u'Phone'),
    426427        default = None,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py

    r8174 r8176  
    6363    @property
    6464    def available_fields(self):
     65        fields = getFields(self.iface)
    6566        return sorted(list(set(
    6667            ['student_id','reg_number','matric_number',
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r8173 r8176  
    4949    FriendlyDatetimeDisplayWidget)
    5050from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
    51 from waeup.kofa.widgets.phonewidget import PhoneWidget
    5251from waeup.kofa.students.interfaces import (
    5352    IStudentsContainer, IStudent,
     
    341340    grok.require('waeup.manageStudent')
    342341    form_fields = grok.AutoFields(IStudentBase).omit('student_id')
    343     form_fields['phone'].custom_widget = PhoneWidget
    344342    grok.template('basemanagepage')
    345343    label = _('Manage base data')
     
    15061504    form_fields = grok.AutoFields(IStudentBase).select(
    15071505        'email', 'phone')
    1508     form_fields['phone'].custom_widget = PhoneWidget
    15091506    label = _('Edit base data')
    15101507    pnav = 4
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r8174 r8176  
    2424    IKofaObject, academic_sessions_vocab, validate_email, IKofaUtils)
    2525from waeup.kofa.interfaces import MessageFactory as _
    26 from waeup.kofa.schema import TextLineChoice, FormattedDate
     26from waeup.kofa.schema import TextLineChoice, FormattedDate, PhoneNumber
    2727from waeup.kofa.students.vocabularies import (
    2828    StudyLevelSource, contextual_reg_num_source, contextual_mat_num_source,
     
    206206        constraint=validate_email,
    207207        )
    208     phone = schema.TextLine(
     208    phone = PhoneNumber(
    209209        title = _(u'Phone'),
    210210        description = u'',
Note: See TracChangeset for help on using the changeset viewer.