summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/extensions/runtime_hosts_dialog.html
blob: db6b162825ec594553780652d253005d3b5a246c (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
<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_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="strings.html">

<dom-module id="extensions-runtime-hosts-dialog">
  <template>
    <style include="cr-shared-style"></style>
    <cr-dialog id="dialog" close-text="$i18n{close}">
      <div slot="title">[[computeDialogTitle_(currentSite)]]</div>
      <div slot="body">
        <cr-input id="input" label="$i18n{runtimeHostsDialogInputLabel}"
            placeholder="http://example.com"
            value="{{site_}}" on-input="validate_"
            invalid="[[inputInvalid_]]"
            error-message="$i18n{runtimeHostsDialogInputError}"
            spellcheck="false"
            autofocus>
        </cr-input>
      </div>
      <div slot="button-container">
        <cr-button class="cancel-button" on-click="onCancelTap_">
          $i18n{cancel}
        </cr-button>
        <cr-button class="action-button" id="submit" on-click="onSubmitTap_"
            disabled="[[computeSubmitButtonDisabled_(inputInvalid_, site_)]]">
          [[computeSubmitButtonLabel_(currentSite)]]
        </cr-button>
      </div>
    </cr-dialog>
  </template>
  <script src="runtime_hosts_dialog.js"></script>
</dom-module>