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

Unified Diff: chrome/browser/resources/chromeos/login/gaia_input_form.html

Issue 1129063003: <gaia-input> element extracted from <gaia-input-form>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected test. Created 5 years, 7 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/chromeos/login/gaia_input_form.html
diff --git a/chrome/browser/resources/chromeos/login/gaia_input_form.html b/chrome/browser/resources/chromeos/login/gaia_input_form.html
index 27a137da88524497e81649d0bf434033f17464aa..b887708eee7776e799f2c52cef813286e1ff3546 100644
--- a/chrome/browser/resources/chromeos/login/gaia_input_form.html
+++ b/chrome/browser/resources/chromeos/login/gaia_input_form.html
@@ -1,45 +1,32 @@
<link rel="import" href="chrome://resources/polymer/polymer/polymer.html">
<link rel="import" href="chrome://resources/polymer/polymer/layout.html">
-<link rel="import" href="chrome://resources/polymer/paper-input/paper-input-decorator.html">
<!--
A simple input form with a button. Being used for typing email or password.
+ User should put one or more <gaia-input>s inside.
Example:
- <gaia-input-form id="emailInput" inputType="email"
+ <gaia-input-form buttonText="Submit">
+ <gaia-input label="Email" type="email"></gaia-input>
+ <gaia-input label="Password" type="password"></gaia-input>
+ <gaia-input label="OTP"></gaia-input>
</gaia-input-form>
Attributes:
- 'inputType' - type of the input (e.g. email, password).
- 'inputLabel' - label displayed on the input. (e.g. Enter you email).
- 'errorMsg' - error message which should be displayed when input is
- incorrect.
'buttonText' - text on the button.
- 'emailDomain' - autocomplete domain for the inputType="email".
Events:
- 'buttonclick' - fired on button click.
+ 'submit' - fired on button click or "Enter" press inside input field.
Methods:
- 'focus' - focuses input field.
- 'setValid' - accept boolean argument |isValid|. Set validity state on
- the form.
- 'checkValidity' - returns current validity state of the input form. Calls
- setValid at the end.
+ 'focus' - focuses input field.
-->
<polymer-element name="gaia-input-form" vertical start-justified layout
- attributes="inputType errorMsg inputLabel buttonText emailDomain">
+ attributes="buttonText"
+ on-keydown="{{onKeyDown}}">
<template>
<link rel="stylesheet" href="gaia_input_form.css">
- <paper-input-decorator id="paperInputDecorator" error="{{errorMsg}}"
- label="{{inputLabel}}" on-tap="{{onTap}}"
- floatingLabel autoValidate>
- <div id="inputContainer" horizontal layout>
- <input id="inputForm" is="core-input" on-keydown="{{onKeyDown}}"
- value="{{inputValue}}" required type="{{inputType}}" flex>
- <span id="emailDomain" hidden?="{{!emailDomain}}">{{emailDomain}}</span>
- </div>
- </paper-input-decorator>
+ <content id="inputs" select="gaia-input"></content>
<div horizontal justified layout center reverse>
<gaia-raised-on-focus-button id="button" class="blue-button"
on-tap="{{onButtonClicked}}" self-end>

Powered by Google App Engine
This is Rietveld 408576698