{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{*?template charset=latin1?*}

<form method="post" action="{$script}">

  <div align="center">
      <h1>{"Site details"|i18n("design/standard/setup/init")}</h1>
  </div>

  <p>
      {"This page lets you modify information about the site you have chosen to install. In addition, it also lets you choose a database for the site."|i18n("design/standard/setup/init")}
  </p>


{section show=eq( $site_access_illegal, 1 )}
    <blockquote class="error">
        <h2>{"Warning"|i18n("design/standard/setup/init")}</h2>
        <p>
        {switch match=$site_type.access_type}
	    {case match='url'}
		{"'User path' and 'Admin path' should only contain letters ('a-zA-Z'), digits ('0-9') and underscores ('_'). The access values must not be named 'admin' or 'user' and each value must be unique. Please change invalid values on site indicated by *"|i18n("design/standard/setup/init")}
	    {/case}
	    {case match='port'}
		{"'User port' and 'Admin port' should only contain digits ('0-9'). Please change invalid values on site indicated by *"|i18n("design/standard/setup/init")}
	    {/case}
	    {case match='hostname'}
		<p>{"'User hostname' and 'Admin hostname' should only contain letters ('a-zA-Z'), digits ('0-9'), dashes ('-'), dots ('.') and colons (':'). Please change invalid values on site indicated by *"|i18n("design/standard/setup/init")}</p>
	    {/case}
	    {case/}
	{/switch}
        </p>
    </blockquote>
{/section}

{section show=eq( $db_already_chosen, 1 )}
    <blockquote class="error">
        <h2>{"Warning"|i18n("design/standard/setup/init")}</h2>
        <p>
            {"You have chosen the same database for two or more site templates. Please change where indicated by *"|i18n("design/standard/setup/init")}
        </p>
    </blockquote>
{/section}

{section show=eq( $db_not_empty, 1 )}
    <blockquote class="error">
        <h2>{"Warning"|i18n("design/standard/setup/init")}</h2>
        <p>
            {"Your database already contain data.
The setup can continue with the initialization but may damage the present data."|i18n("design/standard/setup/init")}
        </p>
        <p>
            {"Select what to do from the drop-down box."|i18n("design/standard/setup/init")}
        </p>
    </blockquote>
{/section}

{section var=site_error show=$site_type.errors|count|gt( 0 ) loop=$site_type.errors}
    <blockquote class="error">
        <h2>{"Warning"|i18n("design/standard/setup/init")}</h2>
        <p>
            {$site_error.text}
        </p>
        {section show=$site_error.url}
            <a href="{$site_error.url.href}" target="_other">{$site_error.url.text|wash}</a>
        {/section}
    </blockquote>
{/section}

<div align="top" class="site-thumbnail">
    {section show=eq( $site_type.site_access_illegal, 1 )}<div style="color: #ff7f00;">*</div>{/section}
    {section show=is_set( $site_type.thumbnail )}
        <img class="site-type" src={concat( "design/standard/images/setup/thumbnails/", $site_type.thumbnail )|ezroot}>
        {section-else}
        <img class="site-type" src={"design/standard/images/setup/eZ_setup_template_default.png"|ezroot}>
    {/section}
</div>

<div align="bottom">
    <fieldset>
    <legend>{'Details for site'|i18n( 'design/standard/setup' )}:</legend>
    <table border="0" cellspacing="2" cellpadding="0">
    <tr>
        <td><label class="textfield">{"Title"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        <td><input type="text" size="30" name="eZSetup_site_templates_title" value="{$site_type.title|wash}" /></td>
    </tr>
    <tr>
        <td><label class="textfield">{"Site url"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        <td><input type="text" size="30" name="eZSetup_site_templates_url" value="{$site_type.url|wash}" /></td>
    </tr>
    <tr>
        {switch match=$site_type.access_type}
        {case match='url'}
            {if eq( $site_access_illegal, 1 )}<td class="invalid">* {else}<td>{/if}<label class="textfield">{"User path"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        {/case}
        {case match='port'}
            {if eq( $site_access_illegal, 1 )}<td class="invalid">* {else}<td>{/if}<label class="textfield">{"User port"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        {/case}
        {case match='hostname'}
            {if or( eq( $site_access_illegal, 1 ), eq( $site_access_illegal_name, 1) )}<td class="invalid">* {else}<td>{/if}<label class="textfield">{"User hostname"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        {/case}
        {case/}
        {/switch}
        <td><input type="text" size="30" name="eZSetup_site_templates_value" value="{$site_type.access_type_value|wash}" /></td>
    </tr>
    <tr>
        {switch match=$site_type.access_type}
        {case match='url'}
            {if eq( $site_access_illegal, 1 )}<td class="invalid">* {else}<td>{/if}<label class="textfield">{"Admin path"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        {/case}
        {case match='port'}
            {if eq( $site_access_illegal, 1 )}<td class="invalid">* {else}<td>{/if}<label class="textfield">{"Admin port"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        {/case}
        {case match='hostname'}
            {if or( eq( $site_access_illegal, 1 ), eq( $site_access_illegal_name, 1) )}<td class="invalid">* {else}<td>{/if}<label class="textfield">{"Admin hostname"|i18n("design/standard/setup/init")}:</label>&nbsp;</td>
        {/case}
        {case/}
        {/switch}
        <td><input type="text" size="30" name="eZSetup_site_templates_admin_value" value="{$site_type.admin_access_type_value|wash}" /></td>
    </tr>

    <tr>
        {if or( eq( $db_not_empty, 1 ), eq( $db_charset_differs, 1 ) )}<td class="invalid">* {else}<td>{/if}<label class="textfield">{"Database"|i18n("design/standard/setup/init")}</label>{section show=eq( $site_type.db_already_chosen, 1 )}<div style="color: #ff7f00;">*</div>{/section}: </td>
        <td>
        {section show=$database_available|count|gt( 0 )}
            <select name="eZSetup_site_templates_database">
            {section var=db loop=$database_available}
                <option value="{$db.item}" {section show=$db.item|eq( $site_type.database )}selected="selected"{/section}>{$db.item|wash}</option>
            {/section}
            </select>
        {section-else}
            <input type="text" size="30" name="eZSetup_site_templates_database" value="{section show=count( $site_type.database )}{$site_type.database}{section-else}{$database_default}{/section}" />
        {/section}
        </td>
    </tr>
    {section show=eq( $site_type.db_not_empty, 1 )}
        <tr>
            <td class="invalid"><label class="textfield">{"Action: "|i18n("design/standard/setup/init")}</label></td>
            <td>
            <select name="eZSetup_site_templates_existing_database">
            <option value="1"{section show=eq($site_type.existing_database, 1)} selected="selected"{/section}>{"Leave the data and add new"|i18n("design/standard/setup/init")}</option>
            <option value="2"{section show=eq($site_type.existing_database, 2)} selected="selected"{/section}>{"Remove existing data"|i18n("design/standard/setup/init")}</option>
            <option value="3"{section show=eq($site_type.existing_database, 3)} selected="selected"{/section}>{"Leave the data and do nothing"|i18n("design/standard/setup/init")}</option>
            <option value="4"{section show=ge($site_type.existing_database, 4)} selected="selected"{/section}>{"I have chosen a new database"|i18n("design/standard/setup/init")}</option>
            </select>
            </td>
       </tr>
   {/section}
   </table>
   </fieldset>
</div>


{include uri="design:setup/persistence.tpl"}
{include uri='design:setup/init/navigation.tpl' refresh=1}

</form>
