1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 10:25:08 +01:00

refactor signup form

This commit is contained in:
Tim Daubenschütz 2015-07-10 16:04:57 +02:00
parent b364414e16
commit e55bc239b4
4 changed files with 26 additions and 21 deletions

View File

@ -31,7 +31,7 @@ let InputCheckbox = React.createClass({
<input type="checkbox" ref="checkbox"/> <input type="checkbox" ref="checkbox"/>
<span className="checkbox"> <span className="checkbox">
<span> <span>
{getLangText('I agree to the Terms of Service') + ' '} {' ' + getLangText('I agree to the Terms of Service') + ' '}
(<a href="/terms" target="_blank" style={{fontSize: '0.9em', color: 'rgba(0,0,0,0.7)'}}> (<a href="/terms" target="_blank" style={{fontSize: '0.9em', color: 'rgba(0,0,0,0.7)'}}>
{getLangText('read')} {getLangText('read')}
</a>) </a>)

View File

@ -25,7 +25,8 @@ let Property = React.createClass({
children: React.PropTypes.oneOfType([ children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.element), React.PropTypes.arrayOf(React.PropTypes.element),
React.PropTypes.element React.PropTypes.element
]) ]),
style: React.PropTypes.object
}, },
getDefaultProps() { getDefaultProps() {
@ -166,7 +167,8 @@ let Property = React.createClass({
<div <div
className={'ascribe-settings-wrapper ' + this.getClassName()} className={'ascribe-settings-wrapper ' + this.getClassName()}
onClick={this.handleFocus} onClick={this.handleFocus}
onFocus={this.handleFocus}> onFocus={this.handleFocus}
style={this.props.style}>
<OverlayTrigger <OverlayTrigger
delay={500} delay={500}
placement="top" placement="top"

View File

@ -13,6 +13,7 @@ import GlobalNotificationActions from '../actions/global_notification_actions';
import Form from './ascribe_forms/form'; import Form from './ascribe_forms/form';
import Property from './ascribe_forms/property'; import Property from './ascribe_forms/property';
import FormPropertyHeader from './ascribe_forms/form_property_header';
import InputCheckbox from './ascribe_forms/input_checkbox'; import InputCheckbox from './ascribe_forms/input_checkbox';
@ -67,9 +68,6 @@ let SignupContainer = React.createClass({
return ( return (
<div className="ascribe-login-wrapper"> <div className="ascribe-login-wrapper">
<br/> <br/>
<div className="ascribe-login-text ascribe-login-header">
{getLangText('Welcome to')} ascribe...
</div>
<SignupForm handleSuccess={this.handleSuccess}/> <SignupForm handleSuccess={this.handleSuccess}/>
</div> </div>
); );
@ -99,6 +97,7 @@ let SignupForm = React.createClass({
getLangText('Store it in a safe place') + '!'; getLangText('Store it in a safe place') + '!';
return ( return (
<Form <Form
className="ascribe-form-bordered"
ref='form' ref='form'
url={apiUrls.users_signup} url={apiUrls.users_signup}
handleSuccess={this.handleSuccess} handleSuccess={this.handleSuccess}
@ -111,6 +110,9 @@ let SignupForm = React.createClass({
<img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" /> <img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" />
</button> </button>
}> }>
<FormPropertyHeader>
<h3>{getLangText('Welcome to ascribe')}</h3>
</FormPropertyHeader>
<Property <Property
name='email' name='email'
label={getLangText('Email')}> label={getLangText('Email')}>
@ -149,7 +151,8 @@ let SignupForm = React.createClass({
</Property> </Property>
<Property <Property
name="terms" name="terms"
className="ascribe-settings-property-collapsible-toggle"> className="ascribe-settings-property-collapsible-toggle"
style={{paddingBottom: 0}}>
<InputCheckbox /> <InputCheckbox />
</Property> </Property>
</Form> </Form>

View File

@ -28,13 +28,13 @@
.is-error { .is-error {
background-color: rgba(169, 68, 66, 0.05); background-color: rgba(169, 68, 66, 0.05);
border-left: 3px solid rgba(169, 68, 66, 1); border-left: 3px solid rgba(169, 68, 66, 1);
div { > div {
span { > span {
color: rgba(169, 68, 66, 1); color: rgba(169, 68, 66, 1);
font-size: 0.9em; font-size: 0.9em;
margin-right: 1em; margin-right: 1em;
} }
input, textarea { > input, > textarea {
color: #666; color: #666;
} }
} }
@ -46,12 +46,12 @@
.is-fixed { .is-fixed {
cursor: default; cursor: default;
div { > div {
cursor: default; cursor: default;
span { > span {
cursor: default; cursor: default;
} }
input, div, pre, textarea { > input, > div, > pre, > textarea {
cursor: default; cursor: default;
color: #666; color: #666;
} }
@ -70,19 +70,19 @@
cursor:pointer; cursor:pointer;
input, div, span:not(.glyphicon), pre, textarea, select { > input, > div, > span:not(.glyphicon), > pre, > textarea, > select {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
} }
span { > span {
font-weight: normal; font-weight: normal;
font-size: 0.9em; font-size: 0.9em;
color: rgba(0,0,0,.5); color: rgba(0,0,0,.5);
} }
div { > div {
/* margin-top: 10px; */ /* margin-top: 10px; */
div:not(.file-drag-and-drop div) { > div:not(.file-drag-and-drop div) {
padding-left: 0; padding-left: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal; font-weight: normal;
@ -92,11 +92,11 @@
} }
} }
.progressbar-container, .progressbar-progress { > .progressbar-container, .progressbar-progress {
margin-top: 0 !important; margin-top: 0 !important;
} }
input, pre, textarea, select { > input, > pre, > textarea, > select {
font-weight: 400; font-weight: 400;
font-size: 1.1em; font-size: 1.1em;
width:100%; width:100%;
@ -119,7 +119,7 @@
} }
textarea{ > textarea{
color: #666; color: #666;
margin-top: 1em; margin-top: 1em;
padding: 0; padding: 0;
@ -143,7 +143,7 @@
cursor:pointer; cursor:pointer;
/* Taken from: http://www.htmllion.com/css3-checkbox.html */ /* Taken from: http://www.htmllion.com/css3-checkbox.html */
> .checkbox { .checkbox {
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;