<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="ringo">
  <source>
    <entity id="e1" name="title" label="Title" type="string" required="true"/>
    <entity id="e2" name="description" label="Description" type="string">
      <renderer type="textarea"/>
    </entity>
    <entity id="e3" name="category" label="Category" type="integer">
      <renderer type="dropdown"></renderer>
      <options>
        <option value="0">Default</option>
      </options>
    </entity>
    <entity id="e4" name="definition" label="Formdefiniton" type="string" required="true">
      <renderer type="formbareditor" url="/rest/form/render" rows="20"/>
    </entity>
    <entity id="modul" name="modul" label="Modul">
      <help>Select the modul for which this form will be available</help>
    </entity>
    <entity id="s1" name="review_state_id" label="Review state" type="integer">
      <renderer type="state"></renderer>
      <help>Only forms in the state "published" will be available for other users.</help>
    </entity>
    <entity id="e5" name="tags" label="Keywords">
      <renderer type="listing" filter="'forms' eq %modul"/>
    </entity>
    <entity id="e6" name="comments" label="Comments">
      <renderer type="comments"/>
    </entity>
  </source>
  <form id="create" autocomplete="off" method="POST" action="" enctype="multipart/form-data">
    <snippet ref="create_snippet"/>
  </form>
  <form id="update" autocomplete="off" method="POST" action="" enctype="multipart/form-data">
    <snippet ref="create_snippet"/>
  </form>
  <form id="read" readonly="true">
    <snippet ref="create_snippet"/>
  </form>

  <!-- Create-->
  <snippet id="create_snippet">
    <snippet ref="s1"/>
  </snippet>

  <!-- Role -->
  <snippet id="s1">
    <page id="p1" label="Form">
      <row>
        <col><field ref="e1"/></col>
      </row>
      <row>
        <col><field ref="e2"/></col>
      </row>
      <row>
        <col><field ref="modul"/></col>
        <col><field ref="e3"/></col>
      </row>
      <row>
        <col><field ref="e4"/></col>
      </row>
      <row>
        <col><field ref="e5"/></col>
      </row>
    </page>
    <page id="p2" label="State/Comments">
      <row>
        <col><field ref="s1"/></col>
      </row>
      <row>
        <col><field ref="e6"/></col>
      </row>
    </page>
  </snippet>
</configuration>
