Changeset 744

Show
Ignore:
Timestamp:
01/11/07 09:24:10
Author:
crchemist
Message:

Added compatibility with Ploneformmailer 0.3.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneCaptchas/trunk/skins/captchas_ploneformmailer/2.1.2/formmailer.cpt

    r743 r744  
    99  <head><title></title></head> 
    1010  <body> 
    11  
    1211    <div metal:fill-slot="main" 
    13          tal:define="form here/form; 
     12         tal:define="script here/runBeforeScriptIfNeeded; 
     13                     form here/form; 
    1414                     title python: test(form.title, form.title, 'unknown'); 
    1515                     method python:form.method; 
     
    1717                     fname string:${title}_form; 
    1818                     tid template/id; 
    19                      tabindex python:Iterator(pos=40000)"> 
    20  
     19                     tabindex tabindex|python:Iterator(pos=30000)"> 
    2120      <h1 tal:content="here/title_or_id" class="documentFirstHeading"> 
    2221        Title or id 
    2322      </h1> 
    24  
    2523      <div metal:use-macro="here/document_actions/macros/document_actions"> 
    2624        Document actions (print, sendto etc) 
    2725      </div> 
    28  
    2926      <div class="documentDescription" 
    3027           tal:content="here/Description"> 
    3128        description 
    3229      </div> 
    33  
    3430      <div tal:condition="python:here.isTransformable('form_pre')" 
    3531           tal:content="structure python:here.getFormPre()"> 
    3632        Prepended text. 
    3733      </div> 
    38  
    3934      <div id="formmailer"> 
    4035        <form action="" 
     
    4540                              enctype form/enctype"> 
    4641 
     42                              <div tal:condition="errors" class="portalMessage">Please correct the errors indicated below.</div> 
    4743          <tal:repeat tal:repeat="group groups" > 
    4844            <fieldset tal:omit-tag="python:group=='Default'"> 
    49  
    5045              <legend tal:content="group" 
    5146                      tal:condition="python:group!='Default'" 
     
    5348                Legend 
    5449              </legend> 
    55  
    5650              <tal:repeat define="fields python:form.get_fields_in_group(group)" 
    5751                          repeat="field fields"> 
    58  
    5952                <div class="field" 
    6053                     tal:condition="not:field/hidden" 
     
    6356                     tal:attributes="class python:test(error, 'field error', 'field'); 
    6457                                     id    python:'pfm_'+field_id;"> 
    65  
    6658                  <label tal:content="field/title" 
     59                         tal:attributes="for field_id" 
    6760                         i18n:translate="">Label</label> 
    68  
    6961                  <span tal:condition="field/is_required" 
    7062                        class="fieldRequired" 
     
    7365                        i18n:attributes="title" 
    7466                        i18n:translate="label_required">(Required)</span> 
    75  
    7667                  <div class="formHelp" 
    7768                       tal:define="desc python:field['description']" 
    7869                       tal:content="desc" 
    7970                       i18n:translate="">Help</div> 
    80  
    8171                  <div tal:content="error" 
    8272                       tal:condition="error" 
     
    8474                    Validation error output 
    8575                  </div> 
    86  
    87                   <div tal:condition="python: field.id in ['email',  'fullname']" 
    88                        tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'') or request.get(field.id,''); 
    89                                    input python:field.render(REQUEST=request, value = initvalue )" 
    90                        tal:replace="structure input" 
    91                        tal:attributes="tabindex tabindex/next;"> 
     76                  <div tal:define="initvalue python:request.get(field.id, None); 
     77                                   input python:field.render(REQUEST=request, value=initvalue)" 
     78                       tal:replace="structure input"> 
    9279                  </div> 
    93                   <div tal:condition="python: not field.id in ['email',  'fullname']" 
    94                        tal:define="input python:field.render(REQUEST=request)" 
    95                        tal:replace="structure input" 
    96                        tal:attributes="tabindex tabindex/next;"> 
    97                   </div> 
    98  
    9980                </div> 
    100  
    10181                <div tal:condition="field/hidden" 
    102                      tal:define="initvalue python:test(field.id in ['email', 'fullname'],member.getProperty(field.id, ''),''); 
    103                                  input python:field.render(REQUEST=request, value=initvalue )" 
     82                     tal:define="initvalue python:request.get(field.id, None); 
     83                                 input python:field.render(REQUEST=request, value=initvalue)" 
    10484                     tal:replace="structure input"> 
    10585                </div> 
    106  
    10786              </tal:repeat> 
    10887            </fieldset> 
     
    11695                                   type  python:button[2] or 'submit'; 
    11796                                   class python:button[3] or 'context'; 
    118                                    id    python:'pfm_button_%s' % button[1] or button[0]; 
    119                                    tabindex tabindex/next;" 
     97                                   id    python:'pfm_button_%s' % button[1] or button[0];" 
    12098                   class="context"/> 
    12199          </div> 
    122  
    123100          <input type="hidden" name="form.submitted" value="1" /> 
    124101          <input type="hidden" name="uf_formid" tal:attributes="value form/id" /> 
    125  
    126102        </form> 
    127103      </div> 
    128  
    129104      <div tal:condition="python:here.isTransformable('form_post')" 
    130105           tal:content="structure python:here.getFormPost()"> 
    131106        Appended text. 
    132107      </div> 
    133  
    134108    </div> 
    135109  </body> 
  • qPloneCaptchas/trunk/skins/captchas_ploneformmailer/2.1.2/formmailer_portlet.cpt

    r743 r744  
    99         i18n:domain="pfm" 
    1010         tal:omit-tag="" > 
    11       <dl class="portlet" 
     11      <div class="portlet" 
    1212           id="portlet-formmailer" 
    1313           tal:define="pfm python:here.pfmbox; 
    1414                       translatable python:hasattr(portal,'portal_languages') and portal.portal_languages.isTranslatable(pfm); 
    1515                       pfm python:translatable and pfm.getTranslation() or pfm; 
    16                        form python:pfm.form" 
    17            tal:condition="python: here!=pfm"> 
    18           <dt class="portletHeader" tal:content="pfm/title_or_id">Title or Id</dt
    19           <dd class="portletItem plain
     16                       form python:pfm.form"> 
     17        <div class="padding"> 
     18          <h5 tal:content="pfm/title_or_id">Title or Id</h5
     19          <div class="portletBody
    2020               tal:define="title python: test(form.title, form.title, 'unknown'); 
    2121                           method python:form.method; 
     
    2424                           tid template/id; 
    2525                           tabindex python:Iterator()"> 
     26            <div class="portletContent odd"> 
    2627              <div tal:condition="python:form.isTransformable('form_pre')" 
    2728                   tal:content="structure python:form.getFormPre()"> 
     
    5253                              i18n:domain="plone" 
    5354                              i18n:attributes="title" 
    54                               i18n:translate="label_required">(*)</span> 
     55                              i18n:translate="label_required">(Required)</span> 
    5556                        <div class="formHelp" 
    5657                             tal:define="desc python:field['description']" 
     
    5859                             i18n:translate="">Help</div> 
    5960                        <div tal:condition="python: field.id in ['email',  'fullname']" 
    60                              tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'') or request.get(field.id,'')
     61                             tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'')
    6162                                         input python:field.render(REQUEST=request, value = initvalue )" 
    6263                             tal:replace="structure input" 
     
    9495                Appended text 
    9596              </div> 
    96           </dd> 
    97       </dl> 
     97            </div> 
     98          </div> 
     99        </div> 
     100      </div> 
    98101    </div> 
    99102  </body> 
  • qPloneCaptchas/trunk/skins/captchas_ploneformmailer/2.5/formmailer.cpt

    r743 r744  
    99  <head><title></title></head> 
    1010  <body> 
    11  
    1211    <div metal:fill-slot="main" 
    13          tal:define="form here/form; 
     12         tal:define="script here/runBeforeScriptIfNeeded; 
     13                     form here/form; 
    1414                     title python: test(form.title, form.title, 'unknown'); 
    1515                     method python:form.method; 
     
    1717                     fname string:${title}_form; 
    1818                     tid template/id; 
    19                      tabindex python:Iterator(pos=40000)"> 
     19                     tabindex tabindex|python:Iterator(pos=30000)"> 
    2020 
    2121      <h1 tal:content="here/title_or_id" class="documentFirstHeading"> 
     
    2626        Document actions (print, sendto etc) 
    2727      </div> 
    28  
    2928      <div class="documentDescription" 
    3029           tal:content="here/Description"> 
    3130        description 
    3231      </div> 
    33  
    3432      <div tal:condition="python:here.isTransformable('form_pre')" 
    3533           tal:content="structure python:here.getFormPre()"> 
    3634        Prepended text. 
    3735      </div> 
    38  
    3936      <div id="formmailer"> 
    4037        <form action="" 
     
    4441                              method form/method; 
    4542                              enctype form/enctype"> 
    46  
     43                              <div tal:condition="errors" class="portalMessage">Please correct the errors indicated below.</div> 
    4744          <tal:repeat tal:repeat="group groups" > 
    4845            <fieldset tal:omit-tag="python:group=='Default'"> 
    49  
    5046              <legend tal:content="group" 
    5147                      tal:condition="python:group!='Default'" 
     
    5349                Legend 
    5450              </legend> 
    55  
    5651              <tal:repeat define="fields python:form.get_fields_in_group(group)" 
    5752                          repeat="field fields"> 
    58  
    5953                <div class="field" 
    6054                     tal:condition="not:field/hidden" 
     
    6357                     tal:attributes="class python:test(error, 'field error', 'field'); 
    6458                                     id    python:'pfm_'+field_id;"> 
    65  
    6659                  <label tal:content="field/title" 
     60                         tal:attributes="for field_id" 
    6761                         i18n:translate="">Label</label> 
    68  
    6962                  <span tal:condition="field/is_required" 
    7063                        class="fieldRequired" 
     
    7366                        i18n:attributes="title" 
    7467                        i18n:translate="label_required">(Required)</span> 
    75  
    7668                  <div class="formHelp" 
    7769                       tal:define="desc python:field['description']" 
    7870                       tal:content="desc" 
    7971                       i18n:translate="">Help</div> 
    80  
    8172                  <div tal:content="error" 
    8273                       tal:condition="error" 
     
    8475                    Validation error output 
    8576                  </div> 
    86  
    87                   <div tal:condition="python: field.id in ['email',  'fullname']" 
    88                        tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'') or request.get(field.id,''); 
    89                                    input python:field.render(REQUEST=request, value = initvalue )" 
    90                        tal:replace="structure input" 
    91                        tal:attributes="tabindex tabindex/next;"> 
     77                  <div tal:define="initvalue python:request.get(field.id, None); 
     78                                   input python:field.render(REQUEST=request, value=initvalue)" 
     79                       tal:replace="structure input"> 
    9280                  </div> 
    93                   <div tal:condition="python: not field.id in ['email',  'fullname']" 
    94                        tal:define="input python:field.render(REQUEST=request)" 
    95                        tal:replace="structure input" 
    96                        tal:attributes="tabindex tabindex/next;"> 
    97                   </div> 
    98  
    9981                </div> 
    100  
    10182                <div tal:condition="field/hidden" 
    102                      tal:define="initvalue python:test(field.id in ['email', 'fullname'],member.getProperty(field.id, ''),''); 
    103                                  input python:field.render(REQUEST=request, value=initvalue )" 
     83                     tal:define="initvalue python:request.get(field.id, None); 
     84                                 input python:field.render(REQUEST=request, value=initvalue)" 
    10485                     tal:replace="structure input"> 
    10586                </div> 
    106  
    10787              </tal:repeat> 
    10888            </fieldset> 
     
    11696                                   type  python:button[2] or 'submit'; 
    11797                                   class python:button[3] or 'context'; 
    118                                    id    python:'pfm_button_%s' % button[1] or button[0]; 
    119                                    tabindex tabindex/next;" 
     98                                   id    python:'pfm_button_%s' % button[1] or button[0];" 
    12099                   class="context"/> 
    121100          </div> 
    122  
    123101          <input type="hidden" name="form.submitted" value="1" /> 
    124102          <input type="hidden" name="uf_formid" tal:attributes="value form/id" /> 
    125  
    126103        </form> 
    127104      </div> 
    128  
    129105      <div tal:condition="python:here.isTransformable('form_post')" 
    130106           tal:content="structure python:here.getFormPost()"> 
    131107        Appended text. 
    132108      </div> 
    133  
    134109    </div> 
    135110  </body> 
  • qPloneCaptchas/trunk/skins/captchas_ploneformmailer/2.5/formmailer_portlet.cpt

    r743 r744  
    99         i18n:domain="pfm" 
    1010         tal:omit-tag="" > 
    11       <dl class="portlet" 
     11      <div class="portlet" 
    1212           id="portlet-formmailer" 
    1313           tal:define="pfm python:here.pfmbox; 
    1414                       translatable python:hasattr(portal,'portal_languages') and portal.portal_languages.isTranslatable(pfm); 
    1515                       pfm python:translatable and pfm.getTranslation() or pfm; 
    16                        form python:pfm.form" 
    17            tal:condition="python: here!=pfm"> 
    18           <dt class="portletHeader" tal:content="pfm/title_or_id">Title or Id</dt
    19           <dd class="portletItem plain
     16                       form python:pfm.form"> 
     17        <div class="padding"> 
     18          <h5 tal:content="pfm/title_or_id">Title or Id</h5
     19          <div class="portletBody
    2020               tal:define="title python: test(form.title, form.title, 'unknown'); 
    2121                           method python:form.method; 
     
    2424                           tid template/id; 
    2525                           tabindex python:Iterator()"> 
     26            <div class="portletContent odd"> 
    2627              <div tal:condition="python:form.isTransformable('form_pre')" 
    2728                   tal:content="structure python:form.getFormPre()"> 
     
    5253                              i18n:domain="plone" 
    5354                              i18n:attributes="title" 
    54                               i18n:translate="label_required">(*)</span> 
     55                              i18n:translate="label_required">(Required)</span> 
    5556                        <div class="formHelp" 
    5657                             tal:define="desc python:field['description']" 
     
    5859                             i18n:translate="">Help</div> 
    5960                        <div tal:condition="python: field.id in ['email',  'fullname']" 
    60                              tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'') or request.get(field.id,'')
     61                             tal:define="initvalue python:test(field.id in ['email',  'fullname'],member.getProperty(field.id, ''),'')
    6162                                         input python:field.render(REQUEST=request, value = initvalue )" 
    6263                             tal:replace="structure input" 
     
    9495                Appended text 
    9596              </div> 
    96           </dd> 
    97       </dl> 
     97            </div> 
     98          </div> 
     99        </div> 
     100      </div> 
    98101    </div> 
    99102  </body>