Commit 9e27a974 authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Revert "WebUI[MD-refresh]: switches remaining paper-input in Settings to cr-input."

This reverts commit f58a0ada.

Reason for revert: Suspecting this CL for the failures of CrSettingsSiteListTest.AddExceptionDialog and CrSettingsSiteListTest.EditExceptionDialog. https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=CrSettingsSiteListTest.*ExceptionDialog 

Original change's description:
> WebUI[MD-refresh]: switches remaining paper-input in Settings to cr-input.
> 
> Bug: 832177
> Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
> Change-Id: Iae1036e0a8975f65a37ff9ccc7b6084b4a6d45ef
> Reviewed-on: https://chromium-review.googlesource.com/1081243
> Commit-Queue: Scott Chen <scottchen@chromium.org>
> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#564968}

TBR=dpapad@chromium.org,scottchen@chromium.org

Change-Id: I4a0a973a5d54324389e2164e041bfb085dffd631
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 832177
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Reviewed-on: https://chromium-review.googlesource.com/1089870Reviewed-by: default avatarKevin McNee <mcnee@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565042}
parent 79b21072
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.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_vars_css.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="../settings_vars_css.html"> <link rel="import" href="../settings_vars_css.html">
<link rel="import" href="smb_browser_proxy.html"> <link rel="import" href="smb_browser_proxy.html">
...@@ -11,31 +10,33 @@ ...@@ -11,31 +10,33 @@
<dom-module id="settings-add-smb-share-dialog"> <dom-module id="settings-add-smb-share-dialog">
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
cr-input { paper-input {
--cr-input-error-display: none;
width: var(--settings-input-max-width); width: var(--settings-input-max-width);
} }
cr-input:not(:last-child) {
margin-bottom: var(--cr-form-field-bottom-spacing);
}
</style> </style>
<cr-dialog id="dialog"> <cr-dialog id="dialog">
<div slot="title">$i18n{addSmbShare}</div> <div slot="title">$i18n{addSmbShare}</div>
<div slot="body" spellcheck="false"> <div slot="body" spellcheck="false">
<cr-input id="address" label="$i18n{smbShareUrl}" value="{{mountUrl_}}" <paper-input always-float-label id="address"
label="$i18n{smbShareUrl}"
value="{{mountUrl_}}"
autofocus> autofocus>
</cr-input> </paper-input>
<cr-input id="name" label="$i18n{smbShareName}" value="{{mountName_}}" <paper-input always-float-label id="name"
maxlength="64"> label="$i18n{smbShareName}"
</cr-input> value="{{mountName_}}"
<cr-input id="username" label="$i18n{smbShareUsername}" maxlength=64>
</paper-input>
<paper-input always-float-label id="username"
label="$i18n{smbShareUsername}"
value="{{username_}}"> value="{{username_}}">
</cr-input> </paper-input>
<cr-input id="password" type="password" label="$i18n{smbSharePassword}" <paper-input always-float-label id="password"
type="password"
label="$i18n{smbSharePassword}"
value="{{password_}}"> value="{{password_}}">
</cr-input> </paper-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="cancel_" id="cancel"> <paper-button class="cancel-button" on-click="cancel_" id="cancel">
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
cr-input { cr-input {
width: var(--settings-input-max-width);
--cr-input-error-display: none; --cr-input-error-display: none;
} }
...@@ -22,18 +23,6 @@ ...@@ -22,18 +23,6 @@
margin-bottom: var(--cr-form-field-bottom-spacing); margin-bottom: var(--cr-form-field-bottom-spacing);
} }
#websiteInput,
#usernameInput {
width: var(--settings-input-max-width);
}
#passwordInput {
--cr-input-width: var(--settings-input-max-width);
--cr-input-row-container: {
justify-content: initial;
}
}
paper-icon-button-light { paper-icon-button-light {
-webkit-margin-start: 2px; -webkit-margin-start: 2px;
background-size: 24px; /* Other buttons are sized by --cr-icon-size. */ background-size: 24px; /* Other buttons are sized by --cr-icon-size. */
......
...@@ -171,7 +171,7 @@ js_library("password_prompt_dialog") { ...@@ -171,7 +171,7 @@ js_library("password_prompt_dialog") {
deps = [ deps = [
":lock_screen_constants", ":lock_screen_constants",
"..:route", "..:route",
"//ui/webui/resources/cr_elements/cr_input:cr_input", "//third_party/polymer/v1_0/components-chromium/paper-input:paper-input-extracted",
] ]
externs_list = [ "$externs_path/quick_unlock_private.js" ] externs_list = [ "$externs_path/quick_unlock_private.js" ]
extra_sources = [ "$interfaces_path/quick_unlock_private_interface.js" ] extra_sources = [ "$interfaces_path/quick_unlock_private_interface.js" ]
...@@ -228,8 +228,8 @@ js_library("sync_page") { ...@@ -228,8 +228,8 @@ js_library("sync_page") {
"..:page_visibility", "..:page_visibility",
"..:route", "..:route",
"../settings_page:settings_animated_pages", "../settings_page:settings_animated_pages",
"//third_party/polymer/v1_0/components-chromium/paper-input:paper-input-extracted",
"//ui/webui/resources/cr_elements/cr_expand_button:cr_expand_button", "//ui/webui/resources/cr_elements/cr_expand_button:cr_expand_button",
"//ui/webui/resources/cr_elements/cr_input:cr_input",
"//ui/webui/resources/js:assert", "//ui/webui/resources/js:assert",
"//ui/webui/resources/js:load_time_data", "//ui/webui/resources/js:load_time_data",
"//ui/webui/resources/js:util", "//ui/webui/resources/js:util",
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/html/assert.html"> <link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html"> <link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html">
...@@ -10,6 +9,7 @@ ...@@ -10,6 +9,7 @@
<link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripple.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripple.html">
<link rel="import" href="fingerprint_browser_proxy.html"> <link rel="import" href="fingerprint_browser_proxy.html">
<link rel="import" href="setup_fingerprint_dialog.html"> <link rel="import" href="setup_fingerprint_dialog.html">
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
background-color: white; background-color: white;
} }
cr-input { paper-input {
--cr-input-error-display: none; --paper-input-container-color: transparent;
} }
paper-ripple { paper-ripple {
...@@ -52,8 +52,9 @@ ...@@ -52,8 +52,9 @@
<template> <template>
<div class="list-item"> <div class="list-item">
<paper-ripple noink></paper-ripple> <paper-ripple noink></paper-ripple>
<cr-input value="{{item}}" on-change="onFingerprintLabelChanged_"> <paper-input value="{{item}}"
</cr-input> on-change="onFingerprintLabelChanged_">
</paper-input>
<paper-icon-button-light class="icon-delete-gray"> <paper-icon-button-light class="icon-delete-gray">
<button on-click="onFingerprintDeleteTapped_"></button> <button on-click="onFingerprintDeleteTapped_"></button>
</paper-icon-button-light> </paper-icon-button-light>
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.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/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="lock_screen_constants.html"> <link rel="import" href="lock_screen_constants.html">
<link rel="import" href="lock_state_behavior.html"> <link rel="import" href="lock_state_behavior.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
...@@ -22,16 +22,18 @@ ...@@ -22,16 +22,18 @@
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{passwordPromptTitle}</div> <div slot="title">$i18n{passwordPromptTitle}</div>
<div slot="body"> <div slot="body">
<div class="settings-box first"> <div class="settings-box first">
[[selectPasswordPromptEnterPasswordString(hasPinLogin)]] [[selectPasswordPromptEnterPasswordString(hasPinLogin)]]
</div> </div>
<cr-input id="passwordInput" type="password"
placeholder="$i18n{passwordPromptPasswordLabel}" <paper-input id="passwordInput" type="password"
invalid="[[passwordInvalid_]]" label="$i18n{passwordPromptPasswordLabel}"
invalid="{{passwordInvalid_}}"
error-message="$i18n{passwordPromptInvalidPassword}" error-message="$i18n{passwordPromptInvalidPassword}"
value="{{inputValue_}}" value="{{inputValue_}}"
aria-disabled="false"> aria-disabled="false">
</cr-input> </paper-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_"> <paper-button class="cancel-button" on-click="onCancelTap_">
......
...@@ -128,8 +128,9 @@ Polymer({ ...@@ -128,8 +128,9 @@ Polymer({
// Select the whole password if user entered an incorrect password. // Select the whole password if user entered an incorrect password.
// Return focus to the password input if it lost focus while being // Return focus to the password input if it lost focus while being
// checked (user pressed confirm button). // checked (user pressed confirm button).
this.$.passwordInput.inputElement.select(); this.$.passwordInput.inputElement.inputElement.select();
this.$.passwordInput.focus(); if (!this.$.passwordInput.focused)
this.$.passwordInput.focus();
return; return;
} }
......
...@@ -288,7 +288,7 @@ Polymer({ ...@@ -288,7 +288,7 @@ Polymer({
if (this.syncPrefs.passphraseRequired) { if (this.syncPrefs.passphraseRequired) {
// Wait for the dom-if templates to render and subpage to become visible. // Wait for the dom-if templates to render and subpage to become visible.
listenOnce(document, 'show-container', () => { listenOnce(document, 'show-container', () => {
const input = /** @type {!CrInputElement} */ ( const input = /** @type {!PaperInputElement} */ (
this.$$('#existingPassphraseInput')); this.$$('#existingPassphraseInput'));
input.focus(); input.focus();
}); });
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.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/assert.html"> <link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="../settings_vars_css.html"> <link rel="import" href="../settings_vars_css.html">
<dom-module id="settings-users-add-user-dialog"> <dom-module id="settings-users-add-user-dialog">
<template> <template>
<style include="settings-shared"> <style include="settings-shared">
cr-input { paper-input {
width: var(--settings-input-max-width); width: var(--settings-input-max-width);
--cr-input-error-display: none; --paper-input-container-focus-color: var(--google-blue-500);
--paper-input-container-input: {
font-size: inherit;
};
} }
</style> </style>
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{addUsers}</div> <div slot="title">$i18n{addUsers}</div>
<div slot="body"> <div slot="body">
<cr-input id="addUserInput" label="$i18n{addUsersEmail}" autofocus <paper-input id="addUserInput" label="$i18n{addUsersEmail}" autofocus
on-input="validate_" invalid="[[!isValid_]]"> on-input="validate_" invalid="[[!isValid_]]">
</cr-input> </paper-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_"> <paper-button class="cancel-button" on-click="onCancelTap_">
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/html/md_select_css.html"> <link rel="import" href="chrome://resources/html/md_select_css.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html">
<link rel="import" href="../i18n_setup.html"> <link rel="import" href="../i18n_setup.html">
<link rel="import" href="cups_add_printer_dialog_util.html"> <link rel="import" href="cups_add_printer_dialog_util.html">
...@@ -108,15 +108,24 @@ ...@@ -108,15 +108,24 @@
<div slot="dialog-title">$i18n{addPrintersManuallyTitle}</div> <div slot="dialog-title">$i18n{addPrintersManuallyTitle}</div>
<div slot="dialog-body"> <div slot="dialog-body">
<div class="settings-box first two-line"> <div class="settings-box first two-line">
<cr-input class="printer-name-input" autofocus <div class="start">
id="printerNameInput" value="{{newPrinter.printerName}}" <div class="label">$i18n{printerName}</div>
label="$i18n{printerName}"> <div class="secondary">
</cr-input> <paper-input class="printer-name-input" no-label-float autofocus
id="printerNameInput" value="{{newPrinter.printerName}}">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<cr-input id="printerAddressInput" label="$i18n{printerAddress}" <div class="start">
value="{{newPrinter.printerAddress}}"> <div class="label">$i18n{printerAddress}</div>
</cr-input> <div class="secondary">
<paper-input no-label-float id="printerAddressInput"
value="{{newPrinter.printerAddress}}">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
...@@ -137,9 +146,14 @@ ...@@ -137,9 +146,14 @@
</div> </div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<cr-input placeholder="ipp/print" label="$i18n{printerQueue}" <div class="start">
value="{{newPrinter.printerQueue}}"> <div class="label">$i18n{printerQueue}</div>
</cr-input> <div class="secondary">
<paper-input no-label-float label="ipp/print"
value="{{newPrinter.printerQueue}}">
</paper-input>
</div>
</div>
</div> </div>
</div> </div>
<div slot="dialog-buttons"> <div slot="dialog-buttons">
...@@ -194,14 +208,20 @@ ...@@ -194,14 +208,20 @@
</div> </div>
</div> </div>
<div class="settings-box two-line last"> <div class="settings-box two-line last">
<cr-input class="browse-file-input" readonly value="[[newUserPPD_]]" <div class="start">
label="$i18n{selectDriver}" invalid="[[invalidPPD_]]" <div class="label">$i18n{selectDriver}</div>
error-message="$i18n{selectDriverErrorMessage}"> <div class="secondary">
<paper-button class="browse-button" on-click="onBrowseFile_" <paper-input class="browse-file-input" no-label-float readonly
slot="suffix"> value="[[newUserPPD_]]"
$i18n{selectDriverButtonText} error-message="$i18n{selectDriverErrorMessage}"
</paper-button> invalid="[[invalidPPD_]]">
</cr-input> <paper-button class="browse-button" slot="suffix"
on-click="onBrowseFile_">
$i18n{selectDriverButtonText}
</paper-button>
</paper-input>
</div>
</div>
</div> </div>
</div> </div>
<div slot="dialog-buttons"> <div slot="dialog-buttons">
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="cups_add_printer_dialog_util.html"> <link rel="import" href="cups_add_printer_dialog_util.html">
<link rel="import" href="cups_printer_shared_css.html"> <link rel="import" href="cups_printer_shared_css.html">
<link rel="import" href="cups_printers_browser_proxy.html"> <link rel="import" href="cups_printers_browser_proxy.html">
...@@ -10,28 +10,33 @@ ...@@ -10,28 +10,33 @@
<dom-module id="settings-cups-edit-printer-dialog"> <dom-module id="settings-cups-edit-printer-dialog">
<template> <template>
<style include="cups-printer-shared"> <style include="cups-printer-shared">
/* This is needed to line up the existing PDD text with cr-input. #existingUserPPD {
TODO(scottchen): move away from using .settings-box just for margin, padding-top: 10px;
and then remove this hacky alignment. */
.last {
align-items: start;
flex-direction: column;
} }
</style> </style>
<add-printer-dialog> <add-printer-dialog>
<div slot="dialog-title">$i18n{editPrinterDialogTitle}</div> <div slot="dialog-title">$i18n{editPrinterDialogTitle}</div>
<div slot="dialog-body"> <div slot="dialog-body">
<div class="settings-box first two-line"> <div class="settings-box first two-line">
<cr-input class="printer-name-input" autofocus <div class="start">
value="{{activePrinter.printerName}}" <div class="label">$i18n{printerName}</div>
label="$i18n{printerName}"> <div class="secondary">
</cr-input> <paper-input class="printer-name-input" no-label-float autofocus
value="{{activePrinter.printerName}}">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<cr-input label="$i18n{printerAddress}" <div class="start">
value="{{activePrinter.printerAddress}}" <div class="label">$i18n{printerAddress}</div>
disabled="[[!networkProtocolActive_]]"> <div class="secondary">
</cr-input> <paper-input no-label-float
value="{{activePrinter.printerAddress}}"
disabled="[[!networkProtocolActive_]]">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
...@@ -70,15 +75,25 @@ ...@@ -70,15 +75,25 @@
</div> </div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<cr-input label="$i18n{printerQueue}" <div class="start">
value="{{activePrinter.printerQueue}}" <div class="label">$i18n{printerQueue}</div>
disabled="[[!networkProtocolActive_]]"> <div class="secondary">
</cr-input> <paper-input no-label-float
value="{{activePrinter.printerQueue}}"
disabled="[[!networkProtocolActive_]]">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<cr-input label="$i18n{printerURI}" readonly <div class="start">
value="[[getPrinterURI_(activePrinter)]]"> <div class="label">$i18n{printerURI}</div>
</cr-input> <div class="secondary">
<paper-input no-label-float disabled
value="[[getPrinterURI_(activePrinter)]]">
</paper-input>
</div>
</div>
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
...@@ -101,20 +116,25 @@ ...@@ -101,20 +116,25 @@
</div> </div>
</div> </div>
<div class="settings-box two-line last"> <div class="settings-box two-line last">
<cr-input class="browse-file-input" readonly <div class="start">
value="[[newUserPPD_]]" label="$i18n{selectDriver}" <div class="label">$i18n{selectDriver}</div>
error-message="$i18n{selectDriverErrorMessage}" <div class="secondary">
invalid="[[invalidPPD_]]"> <paper-input class="browse-file-input" no-label-float readonly
<paper-button class="browse-button" on-click="onBrowseFile_" value="[[newUserPPD_]]"
slot="suffix"> error-message="$i18n{selectDriverErrorMessage}"
$i18n{selectDriverButtonText} invalid="[[invalidPPD_]]">
</paper-button> <paper-button class="browse-button" slot="suffix"
</cr-input> on-click="onBrowseFile_">
<template is="dom-if" if="[[existingUserPPDMessage_]]"> $i18n{selectDriverButtonText}
<div class="secondary" id="existingUserPPD"> </paper-button>
[[existingUserPPDMessage_]] </paper-input>
</div> </div>
</template> <template is="dom-if" if="[[existingUserPPDMessage_]]">
<div class="secondary" id="existingUserPPD">
[[existingUserPPDMessage_]]
</div>
</template>
</div>
</div> </div>
</div> </div>
<div slot="dialog-buttons"> <div slot="dialog-buttons">
......
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/md_select_css.html"> <link rel="import" href="chrome://resources/html/md_select_css.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="../settings_vars_css.html"> <link rel="import" href="../settings_vars_css.html">
...@@ -19,21 +16,18 @@ ...@@ -19,21 +16,18 @@
} }
[slot='dialog-body'] .settings-box .start .label { [slot='dialog-body'] .settings-box .start .label {
@apply --cr-form-field-label; color: var(--google-grey-700);
} }
[slot='dialog-body'] .settings-box cr-input { [slot='dialog-body'] .settings-box paper-input {
--paper-input-container-input: {
font-size: inherit;
};
width: 270px; width: 270px;
} }
/* The only input that has error-message are at the end, so we don't
need to allocate space for error-message under each input
for consistency. */
[slot='dialog-body'] .settings-box cr-input:not([error-message]) {
--cr-input-error-display: none;
}
[slot='dialog-body'] .settings-box .md-select { [slot='dialog-body'] .settings-box .md-select {
margin-top: 8px;
width: 270px; width: 270px;
} }
...@@ -42,12 +36,25 @@ ...@@ -42,12 +36,25 @@
} }
[slot='dialog-body'] .settings-box .browse-file-input { [slot='dialog-body'] .settings-box .browse-file-input {
width: auto; --paper-input-container-input: {
--cr-input-width: 270px; border: 1px solid lightgray;
font-size: inherit;
};
--paper-input-container-underline: {
display: none;
};
--paper-input-container-underline-focus: {
display: none;
};
--paper-input-suffix: {
font-size: inherit;
};
width: 340px;
} }
[slot='dialog-body'] .settings-box .browse-button { [slot='dialog-body'] .settings-box .browse-button {
-webkit-margin-start: 5px; -webkit-margin-start: 5px;
color: black;
} }
[slot='dialog-body'] .last { [slot='dialog-body'] .last {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.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_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="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../i18n_setup.html"> <link rel="import" href="../i18n_setup.html">
<link rel="import" href="../settings_shared_css.html"> <link rel="import" href="../settings_shared_css.html">
<link rel="import" href="constants.html"> <link rel="import" href="constants.html">
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{addSiteTitle}</div> <div slot="title">$i18n{addSiteTitle}</div>
<div slot="body"> <div slot="body">
<cr-input id="site" label="$i18n{addSite}" <paper-input id="site" always-float-label label="$i18n{addSite}"
placeholder="$i18n{addSiteExceptionPlaceholder}" placeholder="$i18n{addSiteExceptionPlaceholder}"
value="{{site_}}" on-input="validate_" value="{{site_}}" on-input="validate_"
error-message="$i18n{notValidWebAddress}" spellcheck="false" error-message="$i18n{notValidWebAddress}" spellcheck="false"
autofocus></cr-input> autofocus></paper-input>
<cr-checkbox id="incognito" <cr-checkbox id="incognito"
invisible$="[[!showIncognitoSessionOnly_]]"> invisible$="[[!showIncognitoSessionOnly_]]">
$i18n{incognitoSiteOnly} $i18n{incognitoSiteOnly}
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.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/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html">
<link rel="import" href="../i18n_setup.html"> <link rel="import" href="../i18n_setup.html">
<link rel="import" href="site_settings_prefs_browser_proxy.html"> <link rel="import" href="site_settings_prefs_browser_proxy.html">
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<cr-dialog id="dialog"> <cr-dialog id="dialog">
<div slot="title">$i18n{editSiteTitle}</div> <div slot="title">$i18n{editSiteTitle}</div>
<div slot="body"> <div slot="body">
<cr-input label="$i18n{addSite}" value="{{origin_}}" <paper-input always-float-label label="$i18n{addSite}"
placeholder="$i18n{addSiteExceptionPlaceholder}" placeholder="$i18n{addSiteExceptionPlaceholder}" value="{{origin_}}"
on-input="validate_" error-message="$i18n{notValidWebAddress}" on-input="validate_" error-message="$i18n{notValidWebAddress}"
invalid="[[invalid_]]" autofocus> invalid="[[invalid_]]" autofocus>
</cr-input> </paper-input>
</div> </div>
<div slot="button-container"> <div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_" <paper-button class="cancel-button" on-click="onCancelTap_"
......
...@@ -66,7 +66,7 @@ Polymer({ ...@@ -66,7 +66,7 @@ Polymer({
/** @private */ /** @private */
validate_: function() { validate_: function() {
if (this.$$('cr-input').value.trim() == '') { if (this.$$('paper-input').value.trim() == '') {
this.invalid_ = true; this.invalid_ = true;
return; return;
} }
......
...@@ -137,8 +137,6 @@ ...@@ -137,8 +137,6 @@
/* This will spread the input field and the suffix apart only if the /* This will spread the input field and the suffix apart only if the
host element width is intentionally set to something large. */ host element width is intentionally set to something large. */
justify-content: space-between; justify-content: space-between;
@apply --cr-input-row-container;
} }
</style> </style>
<div id="label" hidden="[[!label]]">[[label]]</div> <div id="label" hidden="[[!label]]">[[label]]</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment