<mt:setvarblock name="page_title"><__trans phrase="Configuration File"></mt:setvarblock>
<mt:setvar name="complete" value="1">
<mt:include name="include/chromeless_header.tmpl">
<form method="post">
  <input type="hidden" name="__mode" value="" />
  <input type="hidden" name="step" value="seed" />
  <input type="hidden" name="config" value="<mt:var name="config" escape="html">" />
  <input type="hidden" name="set_static_uri_to" id="set_static_uri_to" value="<mt:var name=static_uri escape="html">">
  <input type="hidden" name="default_language" value="<mt:var name="default_language" escape="html">" />
<mt:if name="file_not_found">
  <mtapp:statusmsg
     id="file_not_found"
     class="error"
     can_close="0">
    <__trans phrase="The [_1] configuration file can't be located." params="<mt:var name=MT_PRODUCT_NAME>">
  </mtapp:statusmsg>
  <p><em><__trans phrase="Please use the configuration text below to create a file named 'mt-config.cgi' in the root directory of [_1] (the same directory in which mt.cgi is found)." params="<mt:var name=MT_PRODUCT_NAME>"></em></p>
<mt:else>
  <mt:unless name="config_created">
  <mtapp:statusmsg
     id="config_error"
     class="error"
     can_close="0">
    <__trans phrase="The wizard was unable to save the [_1] configuration file." params="<mt:var name=MT_PRODUCT_NAME>">
  </mtapp:statusmsg>
  <p><em><__trans phrase="Confirm that your [_1] home directory (the directory that contains mt.cgi) is writable by your web server and then click 'Retry'." params="<mt:var name=MT_PRODUCT_NAME>"></em></p>
  <mt:else>
  <mtapp:statusmsg
     id="config_success"
     class="success"
     can_close="0">
    <__trans phrase="Congratulations! You've successfully configured [_1]." params="<mt:var name=MT_PRODUCT_NAME>">
  </mtapp:statusmsg>
  </mt:unless>
</mt:if>
<mt:unless name="config_created">
  <p id="config_settings_toggle"><a href="javascript:void(0)" onclick="showByID('config_settings'); hideByID('config_settings_toggle')"><__trans phrase="Show the mt-config.cgi file generated by the wizard"></a></p>
</mt:unless>
  <div id="config_settings" style="display: none;">
    <textarea class="text full high code" onclick="this.select()"><mt:include name="mt-config.tmpl"></textarea>
  </div>
<mt:unless name="config_created">
  <p><input name="manually" id="manually" type="checkbox" value="1" onclick="toggleConfig()" <mt:if name="manually">checked="checked"</mt:if>> <label for="manually"><__trans phrase="The mt-config.cgi file has been created manually."></label></p>
</mt:unless>

  <div id="retry-buttons" class="actions-bar" <mt:if name="file_not_found">style="display:none;"</mt:if>>
    <p><mt:var name="file_not_found" escape="html"></p>
    <mt:unless name="config_created">
    <button
       name="retry"
       type="submit"
       onclick="go('retry');"
       class="retry action primary button">
      <__trans phrase="Retry">
    </button>
    <button
       name="back"
       type="submit"
       onclick="go('previous_step');"
       class="goback action button">
      <__trans phrase="Back">
    </button>
  <mt:else>
    <button
       name="continue"
       type="submit"
       onclick="document.location.href='<mt:var name="mt_script">'; return false"
       class="action primary button">
      <__trans phrase="Continue">
    </button>
  </mt:unless>
  </div>

  <div id="automatic-buttons" class="actions-bar" <mt:unless name="file_not_found">style="display:none;"</mt:unless>>
    <button
       name="retry"
       type="submit"
       onclick="go('retry');"
       class="retry action primary button">
      <__trans phrase="Continue">
    </button>
    <button
       name="retry"
       type="submit"
       onclick="go('retry');"
       class="goback action button">
      <__trans phrase="Back">
    </button>
  </div>
</form>

<script type="text/javascript">
/* <![CDATA[ */
function go(mode) {
    var f = document.forms[0];
    f['__mode'].value = mode;
}

function toggleConfig() {
    var manually = getByID('manually');
    var retry = getByID('retry-buttons');
    var automatic = getByID('automatic-buttons');
    if (manually) {
        if (manually.checked == true) {
            retry.style.display = 'none';
            automatic.style.display = 'block';
        } else {
            retry.style.display = 'block';
            automatic.style.display = 'none';
        }
    }
}
/* ]]> */
</script>
<mt:include name="include/chromeless_footer.tmpl">
