<?xml version="1.0"?>

<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is Account Manager Addressing Settings Overlay.
   -
   - The Initial Developer of the Original Code is
   - The Mozilla Foundation.
   - Portions created by the Initial Developer are Copyright (C) 2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
   
<?xml-stylesheet href="chrome://messenger/content/messenger.css" type="text/css"?>
<?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>

<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/am-addressing.dtd">

<overlay xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">                                                       

  <script type="application/javascript" src="chrome://messenger/content/am-addressing.js"/>

  <vbox flex="1" id="compositionAndAddressing">
    <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>

    <groupbox>
      <caption label="&compositionGroupTitle.label;"/>
      <hbox align="center">
        <checkbox wsm_persist="true" id="identity.composeHtml" label="&useHtml.label;"
                  accesskey="&useHtml.accesskey;"
                  prefattribute="value"
                  prefstring="mail.identity.%identitykey%.compose_html"/>
      </hbox>

      <separator class="thin"/>

      <hbox align="center">
        <checkbox wsm_persist="true" id="identity.autoQuote" label="&autoQuote.label;"
                  oncommand="quoteEnabling();" accesskey="&autoQuote.accesskey;"
                  pref="true" preftype="bool" prefattribute="value"
                  prefstring="mail.identity.%identitykey%.auto_quote"/>
      </hbox>
      <hbox class="indent" align="center" id="thenBox">
        <label value="&then.label;" accesskey="&then.accesskey;" control="identity.replyOnTop"/>
        <menulist wsm_persist="true" id="identity.replyOnTop" oncommand="quoteEnabling();"
                  pref="true" preftype="int" prefattribute="value"
                  prefstring="mail.identity.%identitykey%.reply_on_top">
          <menupopup>
            <menuitem value="1" label="&aboveQuote.label;"/>
            <menuitem value="0" label="&belowQuote.label;"/>
            <menuitem value="2" label="&selectAndQuote.label;"/>
          </menupopup>
        </menulist>
      </hbox>
      <hbox class="indent" align="center" id="placeBox">
        <label value="&place.label;" accesskey="&place.accesskey;" control="identity.sig_bottom"/>
        <menulist wsm_persist="true" id="identity.sig_bottom" genericattr="true"
                  pref="true" preftype="bool" prefattribute="value"
                  prefstring="mail.identity.%identitykey%.sig_bottom">
          <menupopup>
            <menuitem value="true" label="&belowText.label;"/>
            <menuitem value="false" label="&aboveText.label;"/>
          </menupopup>
        </menulist>
      </hbox>

      <checkbox id="identity.sig_on_reply" wsm_persist="true"
                label="&includeSigOnReply.label;"
                accesskey="&includeSigOnReply.accesskey;"
                preftype="bool" genericattr="true"
                prefstring="mail.identity.%identitykey%.sig_on_reply"/>

      <checkbox id="identity.sig_on_fwd" wsm_persist="true"
                label="&includeSigOnForward.label;"
                accesskey="&includeSigOnForward.accesskey;"
                preftype="bool" genericattr="true"
                prefstring="mail.identity.%identitykey%.sig_on_fwd"/>

    </groupbox>

    <separator class="thin"/>

    <groupbox>
      <caption label="&addressingGroupTitle.label;"/>
      <hbox align="center">
        <checkbox wsm_persist="true" id="identity.autocompleteToMyDomain"
                  label="&autocompleteToMyDomain.label;"
                  accesskey="&autocompleteToMyDomain.accesskey;"
                  prefattribute="value"
                  prefstring="mail.identity.%identitykey%.autocompleteToMyDomain"/>
      </hbox>

      <separator class="thin"/>

      <label control="identity.overrideGlobal_Pref">&addressingText.label;</label>
      <radiogroup id="identity.overrideGlobal_Pref" class="indent"
                  oncommand="enabling();" wsm_persist="true"
                  genericattr="true" preftype="bool"
                  prefstring="mail.identity.%identitykey%.overrideGlobal_Pref">
        <radio value="false" label="&useGlobal.label;"
               accesskey="&useGlobal.accesskey;"/>
        <radio id="directories" value="true" label="&directories.label;"
               accesskey="&directories.accesskey;"/>
        <hbox class="indent">
          <menulist id="identity.directoryServer"
                    wsm_persist="true" preftype="string"
                    prefstring="mail.identity.%identitykey%.directoryServer"
                    style="min-width: 16em;" aria-labelledby="directories">
            <menupopup class="addrbooksPopup"
                       none="&directoriesNone.label;"
                       remoteonly="true" value="dirPrefId"/>
          </menulist>
          <button id="editButton" label="&editDirectories.label;"
                  accesskey="&editDirectories.accesskey;"
                  oncommand="onEditDirectories();"/>
        </hbox>
      </radiogroup>      
    </groupbox>
  </vbox>
</overlay>
