From b510d154df84a267f0d6bf8928e3fecd8ac306b5 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Tue, 26 Jul 2016 10:20:06 -0400 Subject: [PATCH] =?UTF-8?q?remove=20=E2=80=98noformsy`=20option=20on=20inp?= =?UTF-8?q?uts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/forms/input.jsx | 7 +++---- src/components/forms/row.scss | 6 ++++++ src/components/navigation/www/navigation.jsx | 12 ++++++++---- src/components/navigation/www/navigation.scss | 12 +++++++++--- src/components/registration/steps.jsx | 2 ++ 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/components/forms/input.jsx b/src/components/forms/input.jsx index d1d9d5aa7..dc660018b 100644 --- a/src/components/forms/input.jsx +++ b/src/components/forms/input.jsx @@ -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 ? - : + return ( ); diff --git a/src/components/forms/row.scss b/src/components/forms/row.scss index 5122af021..43373ddd2 100644 --- a/src/components/forms/row.scss +++ b/src/components/forms/row.scss @@ -13,4 +13,10 @@ display: inline-block; margin-bottom: .75rem; } + + &.no-label { + label { + display: none; + } + } } diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index 02d36e681..eef9bead1 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -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({
  • -
    +
  • {this.props.session.status === sessionActions.Status.FETCHED ? ( this.props.session.session.user ? [ diff --git a/src/components/navigation/www/navigation.scss b/src/components/navigation/www/navigation.scss index 49451d283..6f67405f4 100644 --- a/src/components/navigation/www/navigation.scss +++ b/src/components/navigation/www/navigation.scss @@ -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; diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index bd956a8f5..9ce503d96 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -315,6 +315,7 @@ module.exports = {
    @@ -499,6 +500,7 @@ module.exports = {