Ignore:
Timestamp:
20 Jan 2012, 10:10:06 (13 years ago)
Author:
Henrik Bettermann
Message:

Adjust size of phone widget. The default country code is still not being set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/widgets/phonewidget.py

    r7439 r7494  
    129129        """
    130130        value = self.context.query(self.context.context)
    131         # we have to modify the adapter according to our own
     131        # We have to modify the adapter according to our own
    132132        # 'required' state. Some ugly workaround
    133133        adapter = copy.deepcopy(IPhoneData)
     
    138138            form.FormFields(IPhoneData),
    139139            self.name, value, self.request, adapters=adapters)
    140         self.widgets['country'].displayWidth = 3
    141         self.widgets['area'].displayWidth = 5
    142         self.widgets['extension'].displayWidth = 10
     140        # The displayWidth cant'be set
     141        # because it is overridden by Bootstrap css classes
     142        #self.widgets['country'].displayWidth = 3
     143        #self.widgets['area'].displayWidth = 5
     144        #self.widgets['extension'].displayWidth = 10
     145        # We have to set the cssClass attributes
     146        self.widgets['country'].cssClass = 'span2'
     147        self.widgets['area'].cssClass = 'span2'
     148        self.widgets['extension'].cssClass = 'span3'
     149
    143150        return
    144151
Note: See TracChangeset for help on using the changeset viewer.