browser/components/preferences/connection.xul
author Zibi Braniecki <zbraniecki@mozilla.com>
Tue, 17 Apr 2018 15:31:50 -0700
changeset 471627 fb836a045f2024b51bdd9899fe2e8db19bd96f8a
parent 468959 7870682a569da34d00e140742a4a2c3961e6d16d
child 471776 42c89029f1ad0f7b8ac9835d9db659bffc713419
permissions -rw-r--r--
Bug 1438375 - Refactor "extensionControlled" Preferences code to use Fluent. r=flod,Gijs MozReview-Commit-ID: 9XJxyuMUCHV

<?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/"?>
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>

<dialog id="ConnectionsDialog" type="child" class="prefwindow"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        data-l10n-id="connection-window"
        data-l10n-attrs="title, style"
        buttons="accept,cancel,help"
        persist="lastSelected screenX screenY"
        role="dialog"
        onbeforeaccept="return gConnectionsDialog.beforeAccept();"
        onload="gConnectionsDialog.checkForSystemProxy();"
        helpTopic="prefs-connection-settings"
        ondialoghelp="openPrefsHelp()">

  <link rel="localization" href="browser/preferences/connection.ftl"/>

  <!-- Used for extension-controlled lockdown message -->
  <link rel="localization" href="browser/preferences/preferences.ftl"/>
  <link rel="localization" href="branding/brand.ftl"/>
  <script type="application/javascript" src="chrome://global/content/l10n.js"></script>

  <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
  <script type="application/javascript" src="chrome://global/content/preferencesBindings.js"/>
  <script type="application/javascript" src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>

  <keyset>
    <key data-l10n-id="connection-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
  </keyset>

  <vbox id="ConnectionsDialogPane" class="prefpane largeDialogContainer">
    <script type="application/javascript" src="chrome://browser/content/preferences/connection.js"/>

    <hbox id="proxyExtensionContent" align="top" hidden="true">
      <description control="disableProxyExtension" flex="1" />
      <button id="disableProxyExtension"
              class="extension-controlled-button accessory-button"
              data-l10n-id="connection-disable-extension" />
    </hbox>

    <groupbox>
      <caption><label data-l10n-id="connection-proxy-configure" /></caption>

      <radiogroup id="networkProxyType" preference="network.proxy.type"
                  onsyncfrompreference="return gConnectionsDialog.readProxyType();">
        <radio value="0" data-l10n-id="connection-proxy-option-no" />
        <radio value="4" data-l10n-id="connection-proxy-option-system" />
        <radio value="5" data-l10n-id="connection-proxy-option-auto" id="systemPref" hidden="true" />
        <radio value="1" data-l10n-id="connection-proxy-option-manual"/>
        <grid class="indent" flex="1">
          <columns>
            <column/>
            <column flex="1"/>
          </columns>
          <rows>
            <row align="center">
              <hbox pack="end">
                <label data-l10n-id="connection-proxy-http" control="networkProxyHTTP" />
              </hbox>
              <hbox align="center">
                <textbox id="networkProxyHTTP" flex="1"
                         preference="network.proxy.http" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyServer();"/>
                <label data-l10n-id="connection-proxy-http-port" control="networkProxyHTTP_Port" />
                <textbox id="networkProxyHTTP_Port" class="proxy-port-input" type="number" max="65535" hidespinbuttons="true"
                         preference="network.proxy.http_port" onsyncfrompreference="return gConnectionsDialog.readHTTPProxyPort();"/>
              </hbox>
            </row>
            <row>
              <hbox/>
              <hbox>
                <checkbox id="shareAllProxies" data-l10n-id="connection-proxy-http-share"
                          preference="network.proxy.share_proxy_settings"
                          onsyncfrompreference="return gConnectionsDialog.updateProtocolPrefs();"/>
              </hbox>
            </row>
            <row align="center">
              <hbox pack="end">
                <label data-l10n-id="connection-proxy-ssl" control="networkProxySSL"/>
              </hbox>
              <hbox align="center">
                <textbox id="networkProxySSL" flex="1" preference="network.proxy.ssl"
                         onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', false);"/>
                <label data-l10n-id="connection-proxy-ssl-port" control="networkProxySSL_Port" />
                <textbox id="networkProxySSL_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ssl_port"
                         hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ssl', true);"/>
              </hbox>
            </row>
            <row align="center">
              <hbox pack="end">
                <label data-l10n-id="connection-proxy-ftp" control="networkProxyFTP"/>
              </hbox>
              <hbox align="center">
                <textbox id="networkProxyFTP" flex="1" preference="network.proxy.ftp"
                         onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', false);"/>
                <label data-l10n-id="connection-proxy-ftp-port" control="networkProxyFTP_Port"/>
                <textbox id="networkProxyFTP_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.ftp_port"
                         hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('ftp', true);"/>
              </hbox>
            </row>
            <row align="center">
              <hbox pack="end">
                <label data-l10n-id="connection-proxy-socks" control="networkProxySOCKS"/>
              </hbox>
              <hbox align="center">
                <textbox id="networkProxySOCKS" flex="1" preference="network.proxy.socks"
                         onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', false);"/>
                <label data-l10n-id="connection-proxy-socks-port" control="networkProxySOCKS_Port"/>
                <textbox id="networkProxySOCKS_Port" class="proxy-port-input" type="number" max="65535" size="5" preference="network.proxy.socks_port"
                         hidespinbuttons="true" onsyncfrompreference="return gConnectionsDialog.readProxyProtocolPref('socks', true);"/>
              </hbox>
            </row>
            <row>
              <spacer/>
              <box pack="start">
              <radiogroup id="networkProxySOCKSVersion" orient="horizontal"
                          preference="network.proxy.socks_version">
                <radio id="networkProxySOCKSVersion4" value="4" data-l10n-id="connection-proxy-socks4" />
                <radio id="networkProxySOCKSVersion5" value="5" data-l10n-id="connection-proxy-socks5" />
              </radiogroup>
              </box>
            </row>
            <label data-l10n-id="connection-proxy-noproxy" control="networkProxyNone"/>
            <textbox id="networkProxyNone" preference="network.proxy.no_proxies_on" multiline="true" rows="2"/>
            <label control="networkProxyNone" data-l10n-id="connection-proxy-noproxy-desc" />
          </rows>
        </grid>
        <radio value="2" data-l10n-id="connection-proxy-autotype" />
        <hbox class="indent" flex="1" align="center">
          <textbox id="networkProxyAutoconfigURL" flex="1" preference="network.proxy.autoconfig_url"
                   oninput="gConnectionsDialog.updateReloadButton();"/>
          <button id="autoReload" icon="refresh"
                  data-l10n-id="connection-proxy-reload"
                  oncommand="gConnectionsDialog.reloadPAC();"
                  preference="pref.advanced.proxies.disable_button.reload"/>
        </hbox>
      </radiogroup>
    </groupbox>
    <separator class="thin"/>
    <checkbox id="autologinProxy"
              data-l10n-id="connection-proxy-autologin"
              preference="signon.autologin.proxy" />
    <checkbox id="networkProxySOCKSRemoteDNS"
              preference="network.proxy.socks_remote_dns"
              data-l10n-id="connection-proxy-socks-remote-dns" />
    <separator/>
  </vbox>
</dialog>