[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/templates/admin/ -> newcustomfield.template (source)

   1  {include file="$admintemplatepath/header.template"}
   2  {include file="$admintemplatepath/navigation.template" showOpt=newCustomField title=$locale->tr("newCustomField")}
   3  
   4   <form name="newCustomField" method="post" action="admin.php" onSubmit="listSelectAll('fieldValues');return true">
   5    <fieldset class="inputField">
   6     <legend>{$locale->tr("newCustomField")}</legend>
   7     {include file="$admintemplatepath/formvalidate.template"}   
   8     
   9     <div class="field">
  10      <label for="fieldName">{$locale->tr("name")}</label>
  11      <span class="required">*</span>
  12      <div class="formHelp">{$locale->tr("field_name_help")}</div>
  13      <input type="text" name="fieldName" value="{$fieldName}" id="fieldName" />
  14      {include file="$admintemplatepath/validate.template" field=fieldName message=$locale->tr("error_empty_name")}
  15     </div>
  16     
  17     <div class="field">
  18      <label for="fieldDescription">{$locale->tr("description")}</label>
  19      <span class="required"></span>
  20      <div class="formHelp">{$locale->tr("field_description_help")}</div>
  21      <input type="text" name="fieldDescription" value="{$fieldDescription}" id="fieldDescription" />
  22      {include file="$admintemplatepath/validate.template" field=fieldDescription message=$locale->tr("error_empty_description")}
  23     </div>
  24     
  25     <div class="field">
  26      <label for="fieldType">{$locale->tr("type")}</label>
  27      <span class="required">*</span>
  28      <div class="formHelp">{$locale->tr("field_type_help")}</div>
  29      <select name="fieldType" id="fieldType" {literal}onChange="elem=document.getElementById('fieldValuesBlock');if(this.selectedIndex==4){elem.style.display='block';}else{elem.style.display='none';}"{/literal}>
  30       <option value="1" {if $fieldType == 1}selected="selected"{/if}>{$locale->tr("text_field")}</option>
  31       <option value="2" {if $fieldType == 2}selected="selected"{/if}>{$locale->tr("text_area")}</option>
  32       <option value="3" {if $fieldType == 3}selected="selected"{/if}>{$locale->tr("checkbox")}</option>
  33       <option value="4" {if $fieldType == 4}selected="selected"{/if}>{$locale->tr("date_field")}</option>    
  34       <option value="5" {if $fieldType == 5}selected="selected"{/if}>{$locale->tr("dropdown_list_field")}</option>
  35      </select>   
  36     </div>
  37  
  38     <div class="field" id="fieldValuesBlock" {if $fieldType != 5}style="display:none"{/if}>
  39      <label for="fieldValues">{$locale->tr("values")}</label>
  40      <span class="required">*</span>
  41      <div class="formHelp">{$locale->tr("field_values")}</div>
  42          <select name="fieldValues[]" id="fieldValues" multiple="multiple" style="width:40%" size="5">
  43          {foreach from=$fieldValues item=value}
  44             <option value="{$value}">{$value}</option>
  45          {/foreach}
  46          </select>
  47          <br />
  48          <input type="button" class="button" {literal}onClick="newValue=window.prompt('Enter new value for the custom field');if(newValue!=null){appendDocumentList(document,'fieldValues',newValue,newValue);}"{/literal} value="{$locale->tr("add")}" />
  49          <input type="button" class="button" onClick="removeSelectedItemsFromList(document.getElementById('fieldValues'))" value="{$locale->tr("remove_selected")}" />
  50     </div>
  51  
  52     <div class="field">
  53      <label for="fieldHidden">{$locale->tr("hidden")}</label>
  54      <span class="required">*</span>
  55      <div class="formHelp">
  56        <input class="checkbox" type="checkbox" id="fieldHidden" name="fieldHidden" value="1" {if $fieldHidden}checked="checked"{/if} />
  57        {$locale->tr("field_hidden_help")}
  58      </div>
  59     </div>
  60    </fieldset>  
  61    <div class="buttons"> 
  62      <input type="hidden" name="fieldSearchable" value="1" />
  63      <input type="hidden" name="op" value="addCustomField" />
  64      <input type="reset" name="Rest" value="{$locale->tr("reset")}" />
  65      <input type="submit" name="{$locale->tr("add")}" value="{$locale->tr("add")}" />
  66    </div>  
  67   </form>
  68   
  69  {include file="$admintemplatepath/footernavigation.template"}
  70  {include file="$admintemplatepath/footer.template"}


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics