remove ‘noformsy` option on inputs

This commit is contained in:
Matthew Taylor 2016-07-26 10:20:06 -04:00
parent 6787ae03ce
commit b510d154df
5 changed files with 28 additions and 11 deletions

View file

@ -29,14 +29,13 @@ var Input = React.createClass({
},
render: function () {
var classes = classNames(
'input',
this.state.status,
this.props.className
);
return (this.props.type === 'submit' || this.props.noformsy ?
<input {... this.props} className={classes} /> :
return (
<FRCInput {... this.props}
className={classes}
className="input"
rowClassName={classes}
onValid={this.onValid}
onInvalid={this.onInvalid} />
);

View file

@ -13,4 +13,10 @@
display: inline-block;
margin-bottom: .75rem;
}
&.no-label {
label {
display: none;
}
}
}

View file

@ -11,6 +11,7 @@ var api = require('../../../lib/api');
var Avatar = require('../../avatar/avatar.jsx');
var Button = require('../../forms/button.jsx');
var Dropdown = require('../../dropdown/dropdown.jsx');
var Form = require('../../forms/form.jsx');
var Input = require('../../forms/input.jsx');
var log = require('../../../lib/log.js');
var Login = require('../../login/login.jsx');
@ -170,6 +171,9 @@ var Navigation = React.createClass({
this.props.dispatch(sessionActions.refreshSession());
this.closeRegistration();
},
onSearchSubmit: function (formData) {
window.location.href = '/search/projects?q=' + formData.q;
},
render: function () {
var classes = classNames({
'logged-in': this.props.session.session.user
@ -216,14 +220,14 @@ var Navigation = React.createClass({
</li>
<li className="search">
<form action="/search/projects" method="get">
<Form onSubmit={this.onSearchSubmit}>
<Button type="submit" className="btn-search" />
<Input type="text"
className="no-label"
aria-label={formatMessage({id: 'general.search'})}
placeholder={formatMessage({id: 'general.search'})}
name="q"
noformsy />
</form>
name="q" />
</Form>
</li>
{this.props.session.status === sessionActions.Status.FETCHED ? (
this.props.session.session.user ? [

View file

@ -47,12 +47,18 @@
width: 100%;
}
form {
.form {
margin: 0;
}
input,
button {
.row {
.help-block {
display: none;
}
}
.input,
.button {
display: inline-block;
margin-top: 5px;
outline: none;

View file

@ -315,6 +315,7 @@ module.exports = {
<div className="gender-input">
<Input name="user.genderOther"
type="text"
className="no-label"
disabled={this.state.otherDisabled}
required={!this.state.otherDisabled}
help={null} />
@ -499,6 +500,7 @@ module.exports = {
</div>
<div className="other-input">
<Input type="text"
className="no-label"
name="organization.other"
disabled={this.state.otherDisabled}
required="isFalse"