<?xml version="1.0" encoding="utf-8"?>

<stage name="settings" xmlns="http://eprints.org/ep3/workflow" xmlns:epc="http://eprints.org/ep3/control">
  <component id="c_metafield_properties_help" type="XHTML"><epc:phrase ref="metafield_properties_help"/></component>
  <component id="c_required"><field ref="required"/></component>
  <component id="c_volatile"><field ref="volatile"/></component>
  <component id="c_export_as_xml"><field ref="export_as_xml"/></component>
  <component id="c_allow_null"><field ref="allow_null"/></component>
  <component id="c_sql_index"><field ref="sql_index"/></component>
  <epc:if test="type='counter'">
      <component id="c_sql_counter"><field ref="sql_counter" required="yes"/></component>
  </epc:if>
  <component id="c_rendering_options" type="Field::Multi">
      <title>Rendering Options</title>
      <field ref="render_input"/>
      <field ref="render_value"/>
      <epc:if test="type!='boolean' and type!='compound'">
          <field ref="browse_link"/>
      </epc:if>
  </component>
  <epc:if test="type='search' or type='fields' or type='subobject' or type='itemref'">
      <component id="c_datasetid"><field ref="datasetid" required="yes"/></component>
  </epc:if>
  <epc:if test="multiple='TRUE'">
      <component id="c_multiple_values" type="Field::Multi">
          <title>Multiple Values</title>
          <field ref="input_boxes"/>
          <field ref="input_ordered"/>
      </component>
  </epc:if>
  <epc:if test="type!='boolean' and type!='compound'">
      <component id="c_maxlength"><field ref="maxlength"/></component>
      <component id="c_input_cols"><field ref="input_cols"/></component>
  </epc:if>
  <epc:if test="type='longtext' or type='boolean' or type='set' or type='namedset' or type='subject'">
      <component id="c_input_rows"><field ref="input_rows"/></component>
  </epc:if>
  <epc:if test="type='subject'">
      <component id="c_top"><field ref="top"/></component>
  </epc:if>
  <epc:if test="type='name'">
      <component id="c_name_options" type="Field::Multi">
          <title>Name Options</title>
          <field ref="render_order"/>
          <field ref="hide_honourific"/>
          <field ref="hide_lineage"/>
          <field ref="family_first"/>
      </component>
  </epc:if>
  <epc:if test="type='subobject'">
      <component id="c_datasetid"><field ref="datasetid"/></component>
  </epc:if>
  <epc:if test="type='date'">
      <component id="c_min_resolution"><field ref="min_resolution" options="year,month,day"/></component>
  </epc:if>
  <epc:if test="type='time'">
      <component id="c_min_resolution"><field ref="min_resolution"/></component>
  </epc:if>
  <epc:if test="type='boolean'">
      <component id="c_input_style"><field ref="input_style" options="menu,radio"/></component>
  </epc:if>
  <epc:if test="type='set' or type='namedset'">
      <component id="c_input_style"><field ref="input_style" options="short,medium,long"/></component>
  </epc:if>
  <epc:if test="type='set'">
      <component id="c_options"><field ref="options"/></component>
  </epc:if>
  <epc:if test="type='namedset'">
      <component id="c_set_name"><field ref="set_name"/></component>
  </epc:if>
</stage>
