summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/settings/site_settings/add_site_dialog.html
blob: 6b38253df503db8a3f15b0d504e2ba667b0d5ab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="../i18n_setup.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="constants.html">
<link rel="import" href="site_settings_behavior.html">

<dom-module id="add-site-dialog">
  <template>
    <style include="settings-shared">
      #incognito {
        padding-bottom: 10px;
      }
    </style>
    <cr-dialog id="dialog" close-text="$i18n{close}">
      <div slot="title">$i18n{addSiteTitle}</div>
      <div slot="body">
        <cr-input id="site" label="$i18n{addSite}"
            placeholder="$i18n{addSiteExceptionPlaceholder}"
            value="{{site_}}" on-input="validate_"
            error-message="{{errorMessage_}}" spellcheck="false"
            autofocus></cr-input>
        <cr-checkbox id="incognito"
            hidden$="[[!showIncognitoSessionOnly_(hasIncognito,
                contentSetting)]]">
          $i18n{incognitoSiteOnly}
        </cr-checkbox>
        <cr-checkbox id="thirdParties"
            hidden$="[[shouldHideThirdPartyCookieCheckbox_(category)]]">
          $i18n{siteSettingsCookiesThirdPartyExceptionLabel}
        </cr-checkbox>
      </div>
      <div slot="button-container">
        <cr-button class="cancel-button" on-click="onCancelTap_">
          $i18n{cancel}
        </cr-button>
        <cr-button class="action-button" id="add" on-click="onSubmit_"
            disabled>
          $i18n{add}
        </cr-button>
      </div>
    </cr-dialog>
  </template>
  <script src="add_site_dialog.js"></script>
</dom-module>