[ Index ]
 

Code source de Serendipity 1.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/templates/bulletproof/ -> plugin_dynamicform.tpl (source)

   1  {if $plugin_contactform_articleformat}
   2     <div class="serendipity_Entry_Date">
   3         <h3 class="serendipity_date">{$plugin_contactform_name}</h3>
   4         <div class="serendipity_entry">
   5             <div class="serendipity_entry_body">
   6  {/if}
   7  
   8  {if $is_contactform_error}
   9     <div class="serendipity_center serendipity_msg_important">{$plugin_contactform_error}</div>
  10     <!-- Needed for Captchas -->
  11     {foreach from=$comments_messagestack item="message"}
  12        <div class="serendipity_center serendipity_msg_important">{$message}</div>
  13     {/foreach}
  14  {/if}
  15  
  16  {if (empty($is_contactform_sent))}
  17     <div>{$plugin_contactform_preface}</div>
  18  {/if}
  19  
  20  {if $is_contactform_sent}
  21      <div class="serendipity_center serendipity_msg_notice">{$plugin_contactform_sent}</div>
  22  {else}
  23  
  24  <!-- This whole commentform style, including field names is needed -->
  25  <!-- for Captchas. The spamblock plugin relies on the field names  -->
  26  <!-- [name], [email], [url], [comment]!                            -->
  27  
  28  <div class="serendipityCommentForm">
  29      <a id="serendipity_CommentForm"></a>
  30      <form id="serendipity_comment_CommentForm" action="{$commentform_action}#feedback" method="post">
  31          <div>
  32              <input type="hidden" name="serendipity[subpage]" value="{$commentform_sname}" />
  33              <input type="hidden" name="serendipity[commentform]" value="true" />
  34              {foreach name="field" from=$commentform_dynamicfields item="field"}
  35                  {if $field.type == "hidden"}
  36                      <input type="hidden" name="serendipity[{$field.id}]" value="{$field.default}" />
  37                {/if}
  38              {/foreach}
  39         </div>
  40  
  41         <fieldset>
  42             <legend><a href="#">{$plugin_contactform_pagetitle}</a></legend>
  43             <dl>
  44                 {foreach name="field" from=$commentform_dynamicfields item="field"}
  45                     {if $field.type != "hidden"}
  46                         <dt class="serendipity_commentsLabel">
  47                             {if $field.required}<sup>*</sup>{/if}<label for="serendipity_commentform_{$field.id}">{$field.name}</label>
  48                         </dt>
  49                         <dd class="serendipity_commentsValue">
  50                             {if $field.type == "checkbox"}
  51                                 <input class="frm_check" type="checkbox" name="{$field.id}" id="{$field.id}" {$field.default} /><label class="frm_check_label" for="{$field.id}">{$field.message}</label>
  52                             {elseif $field.type == "radio"}
  53                                 {foreach name="radio_option" from=$field.options item="option"}
  54                                     <input class="frm_radio" type="radio" name="{$field.id}" id="{$field.id}.{$option.id}" value="{$option.value}" {$option.default} /><label class="frm_radio_label" for="{$field.id}.{$option.id}">{$option.name}</label>
  55                                 {/foreach}
  56                             {elseif $field.type == "select"}
  57                                 <select name="{$field.id}">
  58                                     {foreach name="radio_option" from=$field.options item="option"}
  59                                         <option name="{$field.id}" id="{$field.id}.{$option.id}" value="{$option.value}" {$option.default} >{$option.name}</option>
  60                                     {/foreach}
  61                                 </select>
  62                             {elseif $field.type == "password"}
  63                                 <input class="frm" type="password" id="serendipity_commentform_{$field.id}" name="serendipity[{$field.id}]" value="{$field.default}" size="30" />
  64                             {elseif $field.type == "textarea"}
  65                                 <textarea class="frm" rows="10" cols="40" id="serendipity_commentform_{$field.id}" name="serendipity[{$field.id}]">{$field.default}</textarea>
  66                             {else}
  67                                 <input class="frm" type="text" id="serendipity_commentform_{$field.id}" name="serendipity[{$field.id}]" value="{$field.default}" size="30" />
  68                             {/if}
  69                         </dd>
  70                     {/if}
  71                 {/foreach}
  72                 <dt>&#160;</dt>
  73                 <dd>
  74  <!-- This is where the spamblock/Captcha plugin is called -->
  75                     {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry}
  76                 </dd>
  77                 <dt>&#160;</dt>
  78                 <dd>
  79                     <input class="frm" type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}" />
  80                 </dd>
  81             </dl>
  82         </fieldset>
  83      </form>
  84  </div>
  85  {/if}
  86  
  87  {if $plugin_contactform_articleformat}
  88              </div>
  89          </div>
  90      </div>
  91  {/if}


Généré le : Sat Nov 24 09:00:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics