summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/settings/controls/password_prompt_dialog.html
blob: 810fd0b8b0024f58f18d49c262fbf0c8878a14ad (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_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="../settings_shared_css.html">

<dom-module id="settings-password-prompt-dialog">
  <template>
    <style include="settings-shared">
      cr-dialog::part(dialog) {
        width: 320px;
      }

      #passwordPrompt {
        padding-bottom: 20px;
        padding-inline-end: 0;
        padding-inline-start: 0;
      }
    </style>
    <cr-dialog id="dialog" close-text="$i18n{close}">
      <div slot="title">$i18n{passwordPromptTitle}</div>
      <div slot="body">
        <div id="passwordPrompt" class="settings-box first"
            hidden="[[!passwordPromptText]]">
          [[passwordPromptText]]
        </div>
        <cr-input id="passwordInput" type="password"
            placeholder="$i18n{passwordPromptPasswordLabel}"
            invalid="[[passwordInvalid_]]"
            error-message="$i18n{passwordPromptInvalidPassword}"
            value="{{inputValue_}}"
            aria-disabled="false">
        </cr-input>
      </div>
      <div slot="button-container">
        <cr-button class="cancel-button" on-click="onCancelTap_">
          $i18n{cancel}
        </cr-button>

        <cr-button id="confirmButton" class="action-button"
            disabled$="[[!isConfirmEnabled_(inputValue_, passwordInvalid_)]]"
            on-click="submitPassword_">
          $i18n{confirm}
        </cr-button>
      </div>
    </cr-dialog>
  </template>
  <script src="password_prompt_dialog.js"></script>
</dom-module>