{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=Gravatar title=$locale->tr("gravatar_plugin")}
<form name="gravatarPluginConfig" method="post">
 <fieldset class="inputField">
 <legend>{$locale->tr("label_configuration")}</legend> 
  {include file="$admintemplatepath/successmessage.template"}
  {include file="$admintemplatepath/errormessage.template"}
  <div class="field">
   <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
   <span class="required"></span>
   <div class="formHelp">
	
     <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1" {user_cannot_override key=plugin_gravatar_enabled}disabled="disabled"{/user_cannot_override}/>{$locale->tr("gravatar_plugin_enabled")}
   </div>
  </div> 

  <div class="field">
   <label for="rating">{$locale->tr("label_rating")}</label>
   <span class="required"></span>
   <div class="formHelp">{$locale->tr("gravatar_rating")}</div>
   <select name="rating" id="rating" {user_cannot_override key=plugin_gravatar_rating}disabled="disabled"{/user_cannot_override}>
    <option value="G" {if $rating=="G"}selected="selected"{/if}>G</option>
    <option value="PG" {if $rating=="PG"}selected="selected"{/if}>PG</option>
    <option value="R" {if $rating=="R"}selected="selected"{/if}>R</option>
    <option value="X" {if $rating=="X"}selected="selected"{/if}>X</option>
   </select>
  </div>

  <div class="field">
   <label for="size">{$locale->tr("label_size")}</label>
   <div class="formHelp">{$locale->tr("gravatar_size")}</div>
   <span class="required"></span>
   <select name="size" id="size" {user_cannot_override key=plugin_gravatar_size}disabled="disabled"{/user_cannot_override}>
    <option value="30" {if $size==30}selected="selected"{/if}>30x30</option>
    <option value="40" {if $size==40}selected="selected"{/if}>40x40</option>
    <option value="50" {if $size==50}selected="selected"{/if}>50x50</option>
    <option value="60" {if $size==60}selected="selected"{/if}>60x60</option>
    <option value="70" {if $size==70}selected="selected"{/if}>70x70</option>
    <option value="80" {if $size==80}selected="selected"{/if}>80x80</option>
   </select>
 </div>

  <div class="field">
  <label for="default">{$locale->tr("label_default")}</label>
  <span class="required"></span>
  <div class="formHelp">{$locale->tr("gravatar_default")}</div>
    <table>
    <thead>
     <tr>
      <th style="width:20px;"></th>
      <th style="width:130px;">{$locale->tr("gravatar_avatar_name")}</th>
      <th style="width:450px;">{$locale->tr("gravatar_avatar_image")}</th>
     </tr>
    </thead>
    <tbody> 
     {foreach from=$avatars item=avatar}
     <tr>
      <td>
       <input class="radio" type="radio" name="default" id="default" value="{$avatar}" {if $default==$avatar} checked="checked" {/if}  {user_cannot_override key=plugin_gravatar_default}disabled="disabled"{/user_cannot_override}/>
      </td>
      <td>
       {$avatar}
      </td>
      <td>
       <img src="{$url->getUrl("/plugins/gravatar/avatars/$avatar")}" alt="{$avatar}" />
      </td> 
     </tr> 
     {/foreach}
    </tbody>
   </table>
    </div>
 </fieldset>
 <div class="buttons">
  <input type="hidden" name="op" value="updateGravatarConfig" />
  <input type="reset" name="{$locale->tr("reset")}" />
  <input type="submit" name="{$locale->tr("settings")}" value="{$locale->tr("update")}" />
 </div>
</form>
{include file="$admintemplatepath/footernavigation.template"}
{include file="$admintemplatepath/footer.template"}