Commits

Gael Pasgrimaud committed 02f432c

improve country widget

Comments (0)

Files changed (3)

members/forms/users.py

     def render(self, **kwargs):
         options = [(v.decode('utf-8'), k) for k, v in sorted(COUNTRIES.items())]
         return super(CountriesRenderer, self).render(options=options, **kwargs)
+    def render_readonly(self):
+        return COUNTRIES.get(self._value)
 
 class RoleRenderer(SelectFieldRenderer):
     def render(self, **kwargs):

members/templates/bulletin.mako

             chez ${c.fs.sn.render_readonly()}<br />
             ${c.fs.street.render_readonly()}<br />
             ${c.fs.postalCode.render_readonly()}&nbsp;${c.fs.l.render_readonly()}<br/>
+            ${c.fs.st.render_readonly()}
   </div>
   <div class="corps">
       <p>Adhésion à l'AFPY pour <strong>${c.now.year}</strong></p>

members/templates/courrier.mako

             chez ${c.fs.sn.render_readonly()}<br />
             ${c.fs.street.render_readonly()}<br />
             ${c.fs.postalCode.render_readonly()}&nbsp;${c.fs.l.render_readonly()}<br/>
+            ${c.fs.st.render_readonly()}
   </div>
   <div class="corps">
       <p>Adhésion à l'AFPY pour <strong>${c.now.year}</strong></p>