<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->


<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/imAccountWizard.css" type="text/css"?>

<!DOCTYPE wizard [
  <!ENTITY % accountWizardDTD SYSTEM "chrome://messenger/locale/imAccountWizard.dtd">
  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
  %accountWizardDTD;
  %brandDTD;
]>

<wizard id="accountWizard" title="&windowTitle.label;"
        windowtype="Messenger:accountWizard"
        onwizardfinish="return accountWizard.createAccount();"
        onload="accountWizard.onload();"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script type="application/javascript" src="chrome://messenger/content/chat/imAccountWizard.js"/>
  <stringbundle id="accountsBundle" src="chrome://messenger/locale/imAccounts.properties"/>

  <wizardpage id="accountprotocol" pageid="accountprotocol" next="accountusername"
              label="&accountProtocolTitle.label;"
              onpageadvanced="return accountWizard.selectProtocol();">
    <description>&accountProtocolInfo.label;</description>
    <separator/>
    <label value="&accountProtocolField.label;" control="protolist"
           id="protoLabel" hidden="true"/>
    <listbox flex="1" id="protolist"
             ondblclick="document.getElementById('accountWizard').advance();"/>
    <hbox pack="end">
      <label id="getMoreProtocols" class="text-link" value="&accountProtocolGetMore.label;"
             onclick="if (event.button == 0) { accountWizard.openURL(this.getAttribute('getMoreURL')); }"/>
    </hbox>
  </wizardpage>

  <wizardpage id="accountusername" pageid="accountusername" next="accountpassword"
              label="&accountUsernameTitle.label;"
              onpageshow="accountWizard.showUsernamePage();"
              onpagehide="accountWizard.hideUsernamePage();">
    <description id="usernameInfo"/>
    <separator/>
    <vbox id="userNameBox"/>
    <separator/>
    <description id="duplicateAccount" hidden="true">&accountUsernameDuplicate.label;</description>
  </wizardpage>

  <wizardpage id="accountpassword" pageid="accountpassword" next="accountadvanced"
              label="&accountPasswordTitle.label;">
    <description>&accountPasswordInfo.label;</description>
    <separator/>
    <hbox id="passwordBox" align="baseline">
      <label value="&accountPasswordField.label;" control="password" id="passwordLabel"/>
      <textbox id="password" type="password"/>
    </hbox>
    <separator/>
    <description id="passwordManagerDescription">&accountPasswordManager.label;</description>
  </wizardpage>

  <wizardpage id="accountadvanced" pageid="accountadvanced" next="accountsummary"
              label="&accountAdvancedTitle.label;"
              onpageshow="accountWizard.showAdvanced();">
    <description>&accountAdvancedInfo.label;</description>
    <separator class="thin"/>
    <groupbox id="aliasGroupbox" class="collapsable"
              onkeypress="accountWizard.onGroupboxKeypress(event)">
      <caption id="aliasGroupboxCaption" label="&accountAliasGroupbox.caption;"
               onclick="accountWizard.toggleGroupbox('aliasGroupbox')"/>
      <hbox id="aliasBox" align="baseline">
        <label value="&accountAliasField.label;" control="alias" id="aliasLabel"/>
        <textbox id="alias"/>
      </hbox>
      <description>&accountAliasInfo.label;</description>
    </groupbox>

    <checkbox id="newMailNotification"
              label="&accountAdvanced.newMailNotification.label;" hidden="true"/>

    <groupbox id="protoSpecificGroupbox" class="collapsable" closed="true"
              onkeypress="accountWizard.onGroupboxKeypress(event)">
      <caption id="protoSpecificCaption"
               onclick="accountWizard.toggleGroupbox('protoSpecificGroupbox')"/>
      <grid flex="1">
        <columns>
          <column id="label-column" flex="1"/>
          <column id="value-column" flex="1"/>
        </columns>
        <rows id="protoSpecific"/>
      </grid>
    </groupbox>
  </wizardpage>

  <wizardpage id="accountsummary" pageid="accountsummary"
              label="&accountSummaryTitle.label;"
              onpageshow="accountWizard.showSummary();">
    <description>&accountSummaryInfo.label;</description>
    <separator/>
    <grid id="summarygrid" flex="1">
      <columns>
        <column/>
        <column flex="1"/>
      </columns>
      <rows id="summaryRows"/>
    </grid>
    <separator/>
    <checkbox id="connectNow" label= "&accountSummary.connectNow.label;" checked="true"/>
  </wizardpage>

</wizard>
