Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed issue with duplicate password fields, input autoCapitalized value condition and prop-types. #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions main.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Accounts, STATES } from 'meteor/std:accounts-ui';

/**
* Form.propTypes = {
* fields: React.PropTypes.object.isRequired,
* buttons: React.PropTypes.object.isRequired,
* error: React.PropTypes.string,
* ready: React.PropTypes.bool
* };
*/
class Form extends Accounts.ui.Form {
render() {
const {
Expand Down Expand Up @@ -71,6 +64,13 @@ class Form extends Accounts.ui.Form {
}
}

Form.propTypes = {
fields: PropTypes.object.isRequired,
buttons: PropTypes.object.isRequired,
error: PropTypes.string,
ready: PropTypes.bool
};

class Buttons extends Accounts.ui.Buttons {
}
class Button extends Accounts.ui.Button {
Expand Down Expand Up @@ -134,13 +134,13 @@ class Field extends Accounts.ui.Field {
return mount ? (
<div className={["form-group", required ? "required" : ""].join(' ')}>
<label htmlFor={ id } className="form-control-label control-label">{ label }</label>
<input id="password" className="form-control" name="password" style={{display: 'none'}} />
{/*}<input id="password" className="form-control" name="password" style={{display: 'none'}} /> */}
<input id={ id }
className="form-control"
name={ id }
type={ type }
ref={ (ref) => this.input = ref }
autoCapitalize={ type == 'email' ? 'none' : false }
autoCapitalize={ type == 'email' ? 'none' : undefined }
autoCorrect="off"
onChange={ onChange }
placeholder={ hint }
Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'std:accounts-bootstrap',
version: '1.2.0',
version: '1.2.1',
summary: 'Bootstrap UI - Accounts UI for React in Meteor 1.3+',
git: 'https://github.com/studiointeract/accounts-bootstrap',
documentation: 'README.md'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"homepage": "https://github.com/studiointeract/accounts-bootstrap",
"dependencies": {

"prop-types": "^15.6.0"
},
"peerDependencies": {
"react": ">=0.14.7 || ^15.0.0-rc.2",
Expand Down