Ñò
†°Ic @ s] d Z d d k Z d d k l Z d d g Z d „ Z e d „ Z d e f d „ ƒ YZ d S(
s
Module to rename form fields
iÿÿÿÿN( t RewritingParsert renamet
add_prefixc C s- t | ƒ } | i | ƒ | i ƒ | i ƒ S( sº
Rename all the form fields in the form (a string), using rename_func
rename_func will be called with one argument, the name of the
field, and should return a new name.
( t RenamingParsert feedt closet text( t formt rename_funct p( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR
s
c s ‡ ‡ f d † } t | | ƒ S( sË
Add the given prefix to all the fields in the form.
If dotted is true, then add a dot between prefix and the previous
name. Empty fields will use the prefix as the name (with no dot).
c s/ ˆ o | o
ˆ d | Sˆ Sn ˆ | Sd S( Nt .( ( t
field_name( t prefixt dotted( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR s
( R ( R R R
R ( ( R R
s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR s R c B sA e Z d „ Z d „ Z d „ Z e d „ Z d „ Z d „ Z RS( c C s t i | ƒ | | _ d S( N( R t __init__R ( t selfR ( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR ) s
c C s- | i d ƒ t i | ƒ | i ƒ | _ d S( N( t handle_misct NoneR R t _get_textt _text( R ( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR - s
c C s1 y | i SWn t j
o t d ƒ ‚ n Xd S( NsC You must .close() a parser instance before getting the text from it( R t AttributeErrort Exception( R ( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR 2 s
c C s6 | i ƒ | d j o | i | | | ƒ n d Sd S( Nt inputt textareat select( s inputR R ( t write_post handle_field( R t tagt attrst startend( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyt handle_starttag: s
c C s | i | | t ƒ S( N( R t True( R R R ( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyt handle_startendtagA s c C su | i | d d ƒ } | i | ƒ } | d j o | i | d ƒ n | i | d | ƒ | i | | ƒ t | _ d S( Nt namet ( t get_attrR R t del_attrt set_attrt write_tagR t skip_next( R R R R R! t new_name( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR D s
( t __name__t
__module__R R R t FalseR R R ( ( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyR ' s ( t __doc__t
HTMLParsert formencode.rewritingparserR t __all__R R+ R R ( ( ( s9 /usr/lib/python2.6/site-packages/formencode/htmlrename.pyt