<!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++plonegovbr.png" width="164" height="70" alt="Iniciativa PloneGov-Br"/>

  <h1>Criar um novo 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_1" i18n:translate="label_title_1">Título (linha 1)</label>

        <div class="formHelp" i18n:translate="">
          Primeira linha do título
        </div>

        <input type="text" name="title_1" size="30" value="Secretaria de" />
      </div>

      <div class="field">
        <label for="title_2" i18n:translate="label_title_2">Título (linha 2)</label>

        <div class="formHelp" i18n:translate="">
          Segunda linha do título
        </div>

        <input type="text" name="title_2" size="30"
               value="Comunicação Social" />
      </div>

      <div class="field">
        <label for="orgao" i18n:translate="label_orgao">Órgão</label>

        <div class="formHelp" i18n:translate="">
          Nome do Ministério ou da Secretaria ao qual este site está subordinado.
        </div>

        <input type="text" name="orgao"
               size="60"
               value="Presidência da República" />
      </div>

      <div class="field">
        <label for="description" i18n:translate="label_description">Description</label>

        <div class="formHelp" i18n:translate="">
          Uma breve descrição deste site.
        </div>

        <input type="text" name="description"
               size="60"
               value="Portal do Governo Brasileiro" />
      </div>

      <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" style="display:none;">
          <legend>
             Extensões ao site
          </legend>

          <div class="formHelp" >
              Selecione extensões que serão aplicadas imediatamente ao novo site.
          </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>
