<?xml version="1.0" encoding="utf-8"?>
<form>
  <fieldset>
    <field
      name="id"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_IMGMAN_IMAGE_ID"
      size="20"
      readonly="true"
      disabled="true"
    />
    <field
      name="cid"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_IMGMAN_IMAGE_ID"
      size="20"
      readonly="true"
      disabled="true"
    />
    <field
      name="asset_id"
      type="hidden"
      filter="unset"
    />
    <field
      name="imgtitle"
      type="text"
      class="inputbox"
      id="title"
      label="COM_JOOMGALLERY_COMMON_TITLE"
      maxLength="255"
      required="true"
      message="COM_JOOMGALLERY_COMMON_ALERT_IMAGE_MUST_HAVE_TITLE"
    />
    <field
      id="alias"
      name="alias"
      type="text"
      class="inputbox"
      label="COM_JOOMGALLERY_COMMON_ALIAS"
      description="COM_JOOMGALLERY_IMGMAN_ALIAS_TIP"
      maxLength="255"
    />
    <field 
      name="catid"
      id="catid"
      type="joomcategory"
      label="COM_JOOMGALLERY_COMMON_CATEGORY"
      validate="joompositivenumeric"
      message="COM_JOOMGALLERY_COMMON_ALERT_YOU_MUST_SELECT_CATEGORY"
      required="true"
      action="joom.upload"
    />  
    <field
      id="published"
      name="published"
      type="radio"
      class="btn-group"
      label="COM_JOOMGALLERY_COMMON_PUBLISHED"
      size="1"
    >
      <option value="0">
        JNO</option>
      <option value="1">
        JYES</option>
    </field>
    <field
      name="access"
      class="inputbox"
      type="accesslevel"
      label="COM_JOOMGALLERY_COMMON_ACCESS"
      description="COM_JOOMGALLERY_IMGMAN_ACCESS_TIP"
      size="1"
    />
    <field
      name="imgtext"
      type="editor"
      class="inputbox"
      label="COM_JOOMGALLERY_COMMON_DESCRIPTION"
      filter="JComponentHelper::filterText"
      buttons="true"
      hide="readmore,pagebreak"
    />
    <field 
      id="detail_catid"
      name="detail_catid"
      type="joomcategory"
      label="COM_JOOMGALLERY_IMGMAN_IMAGE_CATEGORY"
      message="COM_JOOMGALLERY_COMMON_ALERT_YOU_MUST_SELECT_CATEGORY"
      size="1"
      onchange="javascript:document.adminForm.submit()"
    />
    <field
      id="imgfilename"
      name="imgfilename"
      class="inputbox"
      type="imagelist"
      label="COM_JOOMGALLERY_COMMON_IMAGE"
      message="COM_JOOMGALLERY_IMGMAN_ALERT_SELECT_IMAGE_FILENAME"
      hide_default="true"
      hide_none="true"
      size="1"
      onchange="javascript:document.adminForm.submit()"
    >
      <option value="">
        COM_JOOMGALLERY_COMMON_PLEASE_SELECT_IMAGE</option>     
    </field>
    <field
      id="original_exists"
      name="original_exists"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_IMGMAN_DOES_ORIGINAL_EXIST"
      description="COM_JOOMGALLERY_IMGMAN_ASSIGN_ORIGINAL_LONG"
      readonly="true"
      disabled="true"
      size="40"      
    />
    <field
      id="copy_original"
      name="copy_original"
      type="radio"
      class="btn-group"
      label="COM_JOOMGALLERY_IMGMAN_ASSIGN_ORIGINAL"
      default="0"
    >
      <option value="0">
        JNO</option>
      <option value="1">
        JYES</option>
    </field>
    <field 
      id="thumb_catid"
      name="thumb_catid"
      type="joomcategory"
      label="COM_JOOMGALLERY_IMGMAN_THUMBNAIL_CATEGORY"
      message="COM_JOOMGALLERY_COMMON_ALERT_YOU_MUST_SELECT_CATEGORY"
      size="1"
      onchange="javascript:document.adminForm.submit()"
    />
    <field
      id="imgthumbname"
      name="imgthumbname"
      class="inputbox"
      type="imagelist"
      label="COM_JOOMGALLERY_COMMON_THUMBNAIL"
      message="COM_JOOMGALLERY_IMGMAN_ALERT_SELECT_THUMBNAIL_FILENAME"
      hide_default="true"
      hide_none="true"
      size="1"
      onchange="javascript:document.adminForm.submit()"
    >
      <option value="">
        COM_JOOMGALLERY_IMGMAN_PLEASE_SELECT_THUMBNAIL</option>     
    </field>
    <field
      name="imagelib"
      class="img-polaroid"
      type="thumbnailpreview"
      label="COM_JOOMGALLERY_COMMON_THUMBNAIL_PREVIEW"
    />
    <field
      name="imagelib2"
      type="imagepreview"
      class="img-polaroid"      
      label="COM_JOOMGALLERY_IMGMAN_IMAGE_PREVIEW"
    />
    <field
      id="rules"
      name="rules"
      type="rules"
      label="JFIELD_RULES_LABEL"
      translate_label="false"
      filter="rules"
      validate="rules"
      class="inputbox"
      component="com_joomgallery"
      section="image"
    >
    </field>
    <field
      name="publishhiddenstate"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_COMMON_STATE"
      readonly="true"
      disabled="true"    
    />
    <field
      name="hits"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_IMGMAN_HITS"
      readonly="true"
      disabled="true"    
    />
    <field
      name="downloads"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_COMMON_DOWNLOADS"
      readonly="true"
      disabled="true"
    />
    <field
      name="rating"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_IMGMAN_IMAGE_RATING"
      readonly="true"
      disabled="true"    
    />
    <field
      name="date"
      type="text"
      class="readonly"
      label="COM_JOOMGALLERY_COMMON_DATE"
      readonly="true"
      disabled="true"
      size="40"
    />
    <field
      name="owner"
      type="joomuser"
      label="COM_JOOMGALLERY_COMMON_OWNER"
      description="COM_JOOMGALLERY_COMMON_OWNER_DESC"
    />
    <field
      name="imgauthor"
      type="text"
      label="COM_JOOMGALLERY_COMMON_AUTHOR"
      description="COM_JOOMGALLERY_IMGMAN_AUTHOR_TIP"
      size="30"
      default=""
    />
    <field
      name="hidden"
      type="radio"
      default="0"
      class="btn-group"
      label="COM_JOOMGALLERY_IMGMAN_HIDDEN"
      description="COM_JOOMGALLERY_IMGMAN_HIDDEN_TIP"
    >
      <option value="0">
        JNO</option>
      <option value="1">
        JYES</option>
    </field>
    <field 
      name="metadesc"
      type="textarea"
      rows="5"
      cols="40"
      default=""
      label="COM_JOOMGALLERY_COMMON_METADESC"
      description="COM_JOOMGALLERY_COMMON_METADESC_TIP"
    />
    <field
      name="metakey"
      type="textarea"
      rows="5"
      cols="40"
      default=""
      label="COM_JOOMGALLERY_COMMON_METAKEYS"
      description="COM_JOOMGALLERY_COMMON_METAKEYS_TIP"
    />
  </fieldset>
  <fields name="files">
    <fieldset>
      <field 
        name="spacer"
        type="spacer"
        label="COM_JOOMGALLERY_IMGMAN_REPLACE_FILES_DESCRIPTION"
      />
      <field
        name="thumb"
        type="file"
        default=""
        label="COM_JOOMGALLERY_IMGMAN_REPLACE_THUMB"
        description="COM_JOOMGALLERY_IMGMAN_REPLACE_THUMB_TIP"
        size="20"
      />
      <field
        name="img"
        type="file"
        default=""
        label="COM_JOOMGALLERY_IMGMAN_REPLACE_IMG"
        description="COM_JOOMGALLERY_IMGMAN_REPLACE_IMG_TIP"
        size="20"
      />
      <field
        name="orig"
        type="file"
        default=""
        label="COM_JOOMGALLERY_IMGMAN_REPLACE_ORIG"
        description="COM_JOOMGALLERY_IMGMAN_REPLACE_ORIG_TIP"
        size="20"
      />
    </fieldset>
  </fields>
</form>