Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7559)

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html

Issue 2787713004: MD Settings: Make password dialog inputs appear read-only (Closed)
Patch Set: restyle readonly textfields in password dialog Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html
index 57539bbc64ed7bbe6b92f4515121664687c14dc0..709f041ec5c9f3ba56f927378c6cc41715d7f9c9 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html
@@ -9,6 +9,20 @@
<dom-module id="password-edit-dialog">
<template>
<style include="settings-shared">
+ paper-input[readonly] {
+ /* Lighter than label to appear uneditable. */
+ color: var(--paper-grey-500);
+
+ /* For readonly inputs we don't want to show focus styles. */
+ --paper-input-container-underline-focus: {
+ display: none;
+ };
+
+ --paper-input-container-label-focus: {
+ color: var(--paper-input-container-color, --secondary-text-color);
+ };
+ }
+
#passwordGroup {
align-items: center;
display: flex;
@@ -26,16 +40,19 @@
<div class="title">$i18n{passwordDetailsTitle}</div>
<div class="body">
<paper-input id="websiteInput" label="$i18n{editPasswordWebsiteLabel}"
- value="[[item.loginPair.originUrl]]" readonly>
+ value="[[item.loginPair.originUrl]]" readonly always-float-label
+ on-tap="onReadonlyInputTap_">
</paper-input>
<paper-input id="usernameInput" label="$i18n{editPasswordUsernameLabel}"
- value="[[item.loginPair.username]]" readonly>
+ value="[[item.loginPair.username]]" readonly always-float-label
+ on-tap="onReadonlyInputTap_">
</paper-input>
<div id="passwordGroup">
- <paper-input id="passwordInput"
+ <paper-input id="passwordInput" always-float-label
label="$i18n{editPasswordPasswordLabel}"
type="[[getPasswordInputType_(password)]]"
- value="[[getPassword_(item, password)]]" readonly>
+ value="[[getPassword_(item, password)]]" readonly
+ on-tap="onReadonlyInputTap_">
</paper-input>
<paper-icon-button id="showPasswordButton"
icon="settings:visibility" on-tap="onShowPasswordButtonTap_"

Powered by Google App Engine
This is Rietveld 408576698