Changeset 268

Show
Ignore:
Timestamp:
12/17/06 23:51:29 (2 years ago)
Author:
matt
Message:

Remove the last use of ctx.key.

While it is possible that the id of the form will clash with something else in the
document (the reason ctx.key use has lasted this long) but this has to happen
and is worth the risk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/formal/form.py

    r250 r268  
    646646 
    647647    loader = loaders.stan( 
    648             T.form(**{'id': T.slot('formId'), 'action': T.slot('formAction'), 
     648            T.form(**{'id': T.slot('formName'), 'action': T.slot('formAction'), 
    649649                'class': 'nevow-form', 'method': 'post', 'enctype': 
    650650                'multipart/form-data', 'accept-charset': 'utf-8'})[ 
     
    668668        tag = T.invisible[self.loader.load()] 
    669669        tag.fillSlots('formName', self.original.name) 
    670         tag.fillSlots('formId', util.keytocssid(ctx.key)) 
    671670        tag.fillSlots('formAction', url.here) 
    672671        tag.fillSlots('formErrors', self._renderErrors) 
     
    709708 
    710709    def _renderAction(self, ctx, data): 
    711         return T.input(type='submit', id='%s-action-%s'%(util.keytocssid(ctx.key), data.name), name=data.name, value=data.label) 
     710        return T.input(type='submit', id='%s-action-%s'%(self.original.name, data.name), name=data.name, value=data.label) 
    712711 
    713712 
  • trunk/formal/util.py

    r231 r268  
    4343 
    4444 
    45 def keytocssid(key): 
    46     return '-'.join(key.split('.')) 
    47  
    4845 
    4946def validIdentifier(name):