<userInput>
  <panel id="UserInputPanel.DB_CHECK">
    <field type="staticText" align="left"
      txt="We will verify that the database owner and database admin users specified in the service.properties file have access to the database." />
    <field type="title" txt="Database access check" bold="true" size="2" />
  </panel>

  <panel id="UserInputPanel.PSQL_PATH">
    <field type="staticText" align="left"
      txt="The openBIS installation process requires access to the PostreSQL command line tools 'psql' and 'pg_dump'. Please specify their location:" />
    <field type="title" txt="Path to 'psql' (PostgreSQL) tool " bold="true" size="2" />
    <field type="dir" align="left" variable="POSTGRES_BIN">
      <spec txt="" size="30" set="/opt/local/lib/postgresql90/bin" mustExist="true" create="false" />
    </field>
  </panel>

  <panel id="UserInputPanel.KEY_STORE">
    <field type="title" txt="Key Store" bold="true" size="2" />
    <field type="staticText" align="left"
      txt="If you have a new keystore for SSL, enter it here. Leave this field blank to use the existing keystore (or the default keystore in a new installation)." />
    <field type="file" align="left" variable="KEY_STORE_FILE">
      <spec txt="Key store" size="20" set="" mustExist="true" allowEmptyValue="true" />
    </field>
    
  </panel>

  <panel id="UserInputPanel.KEY_STORE_PASSWORDS">
    <field type="title" txt="Key Store Passwords" bold="true" size="2" />
    
    <field type="password" align="left" variable="KEY_STORE_PASSWORD">
      <spec>
        <pwd txt="Key store password" size="20" set="" />
        <pwd txt="Re-type key store password" size="20" set=""/>
      </spec>
      <validator class="com.izforge.izpack.panels.userinput.validator.PasswordEqualityValidator" txt="The specified key store passwords do not match." />
      <validator class="com.izforge.izpack.panels.userinput.validator.RegularExpressionValidator" txt="Key store password cannot be empty.">
        <param name="pattern" value="^.+$" />
      </validator>
    </field>
    <field type="password" align="left" variable="KEY_PASSWORD">
      <spec>
        <pwd txt="Key password" size="20" set="" />
        <pwd txt="Re-type key password" size="20" set=""/>
      </spec>
      <validator class="com.izforge.izpack.panels.userinput.validator.PasswordEqualityValidator" txt="The specified key passwords do not match." />
      <validator class="com.izforge.izpack.panels.userinput.validator.RegularExpressionValidator" txt="key password cannot be empty.">
        <param name="pattern" value="^.+$" />
      </validator>
    </field>
  </panel>

  <panel id="UserInputPanel.TECHNOLOGIES">
    <field type="title" txt="Technologies" bold="true" size="2" />
    <field type="staticText" align="left"
      txt="Select any technology-specific modules that should installed along with openBIS. The selection can be altered at the next upgrade:" />
    <field type="check" variable="ELN-LIMS">
      <spec txt="ELN/LIMS" true="true" false="false"/>
    </field>
    <field type="check" variable="ELN-LIMS-TEMPLATE-TYPES">
      <spec txt="ELN/LIMS Template Types" true="true" false="false"/>
    </field>
    <field type="check" variable="MICROSCOPY">
      <spec txt="Microscopy" true="true" false="false"/>
    </field>
    <field type="check" variable="FLOW">
      <spec txt="Flow Cytometry" true="true" false="false"/>
    </field>
  </panel>
  
  <panel id="UserInputPanel.MISC">
    <field type="title" txt="Misc" bold="true" size="2" />
    <field type="password" align="left" variable="ADMIN_PASSWORD">
      <spec>
        <pwd txt="Admin password" size="20" set="" />
        <pwd txt="Re-type password" size="20" set=""/>
      </spec>
      <validator class="com.izforge.izpack.panels.userinput.validator.PasswordEqualityValidator" txt="The specified 'admin' passwords do not match." />
      <validator class="com.izforge.izpack.panels.userinput.validator.RegularExpressionValidator" txt="Admin password cannot be empty.">
        <param name="pattern" value="^.+$" />
      </validator>
    </field>
    <field type="staticText" align="left" txt="Password for the openBIS 'admin' user." />

    <field type="space"/>
    <field type="space"/>
    
    <field type="dir" align="left" variable="DSS_ROOT_DIR">
      <spec txt="Data folder" size="25" set="$INSTALL_PATH/data" mustExist="false" create="true"/>
    </field>
    <field type="staticText" align="left" txt="The directory to be used to store raw data like images, analysis files etc." />

    <field type="space"/>
    <field type="space"/>

    <field type="radio" variable="INSTALLATION_TYPE">
      <description align="left" id="Installation type" />
      <spec>
        <choice txt="Server (accessed from other machines)" value="server"/>
        <choice txt="Local (accessed from only from localhost)" value="local" set="true"/>
      </spec>
    </field>
  </panel>
  
  <panel id="UserInputPanel.BACKUP_OLD">
    <field type="title" txt="Detected existing openBIS installation" bold="true" size="2" />
    <field type="staticText" align="left" txt="Please click next to create a backup of the existing installation." />
  </panel>  
  
  <panel id="UserInputPanel.BACKUP">
    <field type="title" txt="Detected existing openBIS installation" bold="true" size="2" />
    <field type="staticText" align="left" txt="Configuration files will be backed up, as will the following databases:" />
    <field type="text" align="left" variable="DATABASES_TO_BACKUP">
      <spec txt="Databases:" size="39" set="$DATABASES_TO_BACKUP" mustExist="true" allowEmptyValue="false"/>
    </field>
    <field type="staticText" align="left" txt="Databases can be removed from this list if backup is not required." />
    <field type="space"/>
    <field type="staticText" align="left" txt="Click next to create a backup of the existing installation." />
    
  </panel>  

</userInput>