Add sematics to the markup – html tags and input type=email

This commit is contained in:
Yuriy Dybskiy
2012-10-11 15:58:24 -07:00
committed by David Greenspan
parent 776c482ac5
commit 58eb6f77f3
4 changed files with 14 additions and 13 deletions

View File

@@ -1,25 +1,25 @@
<template name="loginButtons">
<div id="login-buttons">
<section id="login-buttons">
{{#if currentUser}}
{{> _loginButtonsLoggedIn}}
{{else}}
{{> _loginButtonsLoggedOut}}
{{/if}}
</div>
</section>
</template>
<template name="_loginButtonsLoggedIn">
{{#if dropdown}}
{{> _loginButtonsLoggedInDropdown}}
{{else}}
<div class="login-header">
<header class="login-header">
{{#if currentUserLoaded}}
{{displayName}}
{{else}}
<div class="loading"></div>
{{/if}}
</div>
<div class="login-button" id="login-buttons-logout">Logout</div>
</header>
<footer class="login-button" id="login-buttons-logout">Logout</footer>
{{/if}}
</template>
@@ -35,16 +35,16 @@
{{/if}}
{{/if}}
{{else}}
<div class="no-services">No login services configured</div>
<section class="no-services">No login services configured</section>
{{/if}}
</template>
<!-- used in various places to display messages to user -->
<template name="_loginButtonsMessages">
{{#if errorMessage}}
<div class="message error-message">{{errorMessage}}</div>
<article class="message error-message">{{errorMessage}}</article>
{{/if}}
{{#if infoMessage}}
<div class="message info-message">{{infoMessage}}</div>
<article class="message info-message">{{infoMessage}}</article>
{{/if}}
</template>

View File

@@ -125,7 +125,7 @@
<div class="login-form">
<div id="forgot-password-email-label-and-input"> {{! XXX we should probably use loginButtonsFormField }}
<label id="forgot-password-email-label" for="forgot-password-email">Email</label>
<input id="forgot-password-email" type="text"/>
<input id="forgot-password-email" type="email"/>
</div>
{{> _loginButtonsMessages}}

View File

@@ -208,7 +208,7 @@
visible: function () {
return Accounts.ui._passwordSignupFields() === "USERNAME_ONLY";
}},
{fieldName: 'email', fieldLabel: 'Email',
{fieldName: 'email', fieldLabel: 'Email', inputType: 'email',
visible: function () {
return Accounts.ui._passwordSignupFields() === "EMAIL_ONLY";
}},
@@ -225,13 +225,13 @@
["USERNAME_AND_EMAIL", "USERNAME_AND_OPTIONAL_EMAIL", "USERNAME_ONLY"],
Accounts.ui._passwordSignupFields());
}},
{fieldName: 'email', fieldLabel: 'Email',
{fieldName: 'email', fieldLabel: 'Email', inputType: 'email',
visible: function () {
return _.contains(
["USERNAME_AND_EMAIL", "EMAIL_ONLY"],
Accounts.ui._passwordSignupFields());
}},
{fieldName: 'email', fieldLabel: 'Email (optional)',
{fieldName: 'email', fieldLabel: 'Email (optional)', inputType: 'email',
visible: function () {
return Accounts.ui._passwordSignupFields() === "USERNAME_AND_OPTIONAL_EMAIL";
}},

View File

@@ -340,8 +340,9 @@
background-color: rgba(0, 0, 0, 0.7);
}
input[type=text], input[type=password] {
input[type=text], input[type=email], input[type=password] {
padding: 4px;
border: 1px solid #999;
border-radius: 3px;
line-height: 1;
}