<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      lang="en"
      i18n:domain="plone">

<head>
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />

  <title i18n:translate="">Create a Plone site</title>

  <link rel="stylesheet" type="text/css"
        href="/++resource++plone-admin-ui.css" />

  <script type="text/javascript">
    function siteid_focus() {
      siteid = document.getElementById('site_id')
      siteid.focus()
    }
    window.onload = siteid_focus;
  </script>

</head>
<body>

  <img src="/++resource++plone-logo.png" width="215" height="56" />

  <h1 i18n:translate="">Create a Plone site</h1>

  <form action="#"
        method="post"
        tal:attributes="action string:${context/absolute_url}/@@plone-addsite"
        tal:define="profiles view/profiles;
                    base_profiles profiles/base;
                    default_profile profiles/default;
                    extension_profiles profiles/extensions;
                    advanced request/advanced|nothing;">

      <div class="field">
        <label for="site_id" i18n:translate="">
          Path identifier
        </label>

        <div class="formHelp" i18n:translate="">
          The id of the site. This ends up as part of the URL.<br /> 
          No special characters are allowed.
        </div>

        <input type="text" name="site_id" size="20" id="site_id"
               tal:attributes="value request/site_id|nothing" />
      </div>

      <div class="field">
        <label for="title" i18n:translate="label_title">Title</label>

        <div class="formHelp" i18n:translate="">
          A short title for the site. This will be shown in the title of the
          browser window on each page.
        </div>

        <input type="text" name="title" size="30" value="Site"
               i18n:attributes="value text_default_site_title;" />
      </div>

      <div class="field">
        <label for="default_language" i18n:translate="">Language</label>

        <div class="formHelp" i18n:translate="">
          The main language of the site.
        </div>

        <select name="default_language"
                tal:define="browser_language view/browser_language;
                            languages python:view.languages(browser_language)">
            <option value="en"
                    tal:repeat="lang languages"
                    tal:attributes="value python:lang[0];
                                    selected python:lang[0]==browser_language"
                    tal:content="python: lang[1]">
                English
            </option>
        </select>
      </div>

      <div class="field" tal:condition="advanced">
        <label for="setup_content" i18n:translate="">Example content</label>

        <div class="formHelp" />

        <input type="checkbox" name="setup_content:boolean" />

        <span i18n:translate="">
            Should the default example content be added to the site?
        </span>
      </div>
      <tal:content tal:condition="not:advanced">
        <input type="hidden" name="setup_content:boolean" value="true" />
      </tal:content>

      <tal:baseprofile condition="python: len(base_profiles) > 1">
        <div class="field">
          <label for="profile_id" i18n:translate="">
            Base configuration
          </label>

          <div class="formHelp" i18n:translate="">
            You normally don't need to change anything here unless you have
            specific reasons and know what you are doing.
          </div>

          <dl>
            <tal:bases tal:repeat="info base_profiles">
              <dt>
                <input type="radio"
                       name="profile_id:string"
                       value="profile"
                       tal:attributes="id info/id;
                                       value info/id;
                                       checked python: default_profile==info['id'] and 'checked' or nothing"
                       />
                <label tal:attributes="for info/id"
                       tal:content="info/title">
                    Profile title
                </label>
              </dt>
              <dd tal:content="info/description">
                Profile description
              </dd>
            </tal:bases>
          </dl>
        </div>
      </tal:baseprofile>

      <tal:extensionprofiles condition="extension_profiles">
        <fieldset id="add-on-list">
          <legend i18n:translate="">
            Add-ons
          </legend>

          <div class="formHelp" i18n:translate="">
              Select any add-ons you want to activate immediately. You can
              also activate add-ons after the site has been created using the
              Add-ons control panel.
          </div>

          <dl id="extension_ids">
            <tal:addons tal:repeat="info extension_profiles">
              <tal:info tal:define="selected info/selected|nothing">
                <tal:normal tal:condition="python: not selected or advanced">
                  <dt>
                    <input type="checkbox" name="extension_ids:list" value=""
                           tal:attributes="value info/id;
                                           id info/id;
                                           checked info/selected|nothing;" />
                    <label
                        tal:attributes="for info/id"
                        tal:content="info/title">
                      profile title
                    </label>
                  </dt>
                  <dd tal:content="info/description">
                    profile description
                  </dd>
                </tal:normal>
                <tal:hidden tal:condition="python: selected and not advanced">
                  <input type="hidden" name="extension_ids:list" value=""
                         tal:attributes="value info/id;
                                         checked info/selected|nothing;" />
                </tal:hidden>
              </tal:info>
            </tal:addons>
          </dl>
        </fieldset>
      </tal:extensionprofiles>

      <div class="formControls">
        <input type="hidden" name="form.submitted:boolean" value="True" />
        <input type="submit" name="submit" value="Create Plone Site"
               i18n:attributes="value;" />
      </div>

  </form>
  </body>
</html>
