mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
remove FormPropertyHeader
This commit is contained in:
parent
a3bfda186a
commit
68f4decaad
@ -13,7 +13,6 @@ import apiUrls from '../../constants/api_urls';
|
|||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
|
||||||
let CreateEditionsForm = React.createClass({
|
let CreateEditionsForm = React.createClass({
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
handleSuccess: React.PropTypes.func,
|
handleSuccess: React.PropTypes.func,
|
||||||
pieceId: React.PropTypes.number
|
pieceId: React.PropTypes.number
|
||||||
|
@ -8,7 +8,6 @@ import Form from './form';
|
|||||||
import Property from './property';
|
import Property from './property';
|
||||||
import InputTextAreaToggable from './input_textarea_toggable';
|
import InputTextAreaToggable from './input_textarea_toggable';
|
||||||
|
|
||||||
|
|
||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
import { getLangText } from '../../utils/lang_utils.js';
|
import { getLangText } from '../../utils/lang_utils.js';
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import AppConstants from '../../constants/application_constants';
|
|||||||
|
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
|
||||||
|
|
||||||
let PieceDeleteForm = React.createClass({
|
let PieceDeleteForm = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
pieceId: React.PropTypes.number,
|
pieceId: React.PropTypes.number,
|
||||||
|
@ -11,7 +11,6 @@ import UserActions from '../../actions/user_actions';
|
|||||||
|
|
||||||
import Form from './form';
|
import Form from './form';
|
||||||
import Property from './property';
|
import Property from './property';
|
||||||
import FormPropertyHeader from './form_property_header';
|
|
||||||
|
|
||||||
import apiUrls from '../../constants/api_urls';
|
import apiUrls from '../../constants/api_urls';
|
||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
@ -20,7 +19,6 @@ import { getLangText } from '../../utils/lang_utils';
|
|||||||
|
|
||||||
|
|
||||||
let LoginForm = React.createClass({
|
let LoginForm = React.createClass({
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
headerMessage: React.PropTypes.string,
|
headerMessage: React.PropTypes.string,
|
||||||
submitMessage: React.PropTypes.string,
|
submitMessage: React.PropTypes.string,
|
||||||
@ -114,9 +112,9 @@ let LoginForm = 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" />
|
||||||
</span>
|
</span>
|
||||||
}>
|
}>
|
||||||
<FormPropertyHeader>
|
<div className="ascribe-form-header">
|
||||||
<h3>{this.props.headerMessage}</h3>
|
<h3>{this.props.headerMessage}</h3>
|
||||||
</FormPropertyHeader>
|
</div>
|
||||||
<Property
|
<Property
|
||||||
name='email'
|
name='email'
|
||||||
label={getLangText('Email')}>
|
label={getLangText('Email')}>
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
let FormPropertyHeader = React.createClass({
|
|
||||||
propTypes: {
|
|
||||||
children: React.PropTypes.oneOfType([
|
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
|
||||||
React.PropTypes.element
|
|
||||||
])
|
|
||||||
},
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div className="ascribe-form-header">
|
|
||||||
{this.props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
export default FormPropertyHeader;
|
|
@ -7,7 +7,6 @@ import UserActions from '../../actions/user_actions';
|
|||||||
|
|
||||||
import Form from './form';
|
import Form from './form';
|
||||||
import Property from './property';
|
import Property from './property';
|
||||||
import FormPropertyHeader from './form_property_header';
|
|
||||||
|
|
||||||
import ReactS3FineUploader from '../ascribe_uploader/react_s3_fine_uploader';
|
import ReactS3FineUploader from '../ascribe_uploader/react_s3_fine_uploader';
|
||||||
|
|
||||||
@ -110,9 +109,9 @@ let RegisterPieceForm = 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" />
|
||||||
</span>
|
</span>
|
||||||
}>
|
}>
|
||||||
<FormPropertyHeader>
|
<div className="ascribe-form-header">
|
||||||
<h3>{this.props.headerMessage}</h3>
|
<h3>{this.props.headerMessage}</h3>
|
||||||
</FormPropertyHeader>
|
</div>
|
||||||
<Property
|
<Property
|
||||||
ignoreFocus={true}>
|
ignoreFocus={true}>
|
||||||
<FileUploader
|
<FileUploader
|
||||||
|
@ -12,7 +12,6 @@ import GlobalNotificationActions from '../../actions/global_notification_actions
|
|||||||
|
|
||||||
import Form from './form';
|
import Form from './form';
|
||||||
import Property from './property';
|
import Property from './property';
|
||||||
import FormPropertyHeader from './form_property_header';
|
|
||||||
import InputCheckbox from './input_checkbox';
|
import InputCheckbox from './input_checkbox';
|
||||||
|
|
||||||
import apiUrls from '../../constants/api_urls';
|
import apiUrls from '../../constants/api_urls';
|
||||||
@ -83,9 +82,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" />
|
||||||
</span>
|
</span>
|
||||||
}>
|
}>
|
||||||
<FormPropertyHeader>
|
<div className="ascribe-form-header">
|
||||||
<h3>{this.props.headerMessage}</h3>
|
<h3>{this.props.headerMessage}</h3>
|
||||||
</FormPropertyHeader>
|
</div>
|
||||||
<Property
|
<Property
|
||||||
name='email'
|
name='email'
|
||||||
label={getLangText('Email')}>
|
label={getLangText('Email')}>
|
||||||
|
@ -5,7 +5,6 @@ import Router from 'react-router';
|
|||||||
|
|
||||||
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 apiUrls from '../constants/api_urls';
|
import apiUrls from '../constants/api_urls';
|
||||||
|
|
||||||
import GlobalNotificationModel from '../models/global_notification_model';
|
import GlobalNotificationModel from '../models/global_notification_model';
|
||||||
@ -15,12 +14,15 @@ import { getLangText } from '../utils/lang_utils';
|
|||||||
|
|
||||||
let PasswordResetContainer = React.createClass({
|
let PasswordResetContainer = React.createClass({
|
||||||
mixins: [Router.Navigation],
|
mixins: [Router.Navigation],
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
return {isRequested: false};
|
return {isRequested: false};
|
||||||
},
|
},
|
||||||
handleRequestSuccess(email){
|
|
||||||
|
handleRequestSuccess(email) {
|
||||||
this.setState({isRequested: email});
|
this.setState({isRequested: email});
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.props.query.email && this.props.query.token) {
|
if (this.props.query.email && this.props.query.token) {
|
||||||
return (
|
return (
|
||||||
@ -57,12 +59,17 @@ let PasswordResetContainer = React.createClass({
|
|||||||
});
|
});
|
||||||
|
|
||||||
let PasswordRequestResetForm = React.createClass({
|
let PasswordRequestResetForm = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
handleRequestSuccess: React.PropTypes.func
|
||||||
|
},
|
||||||
|
|
||||||
handleSuccess() {
|
handleSuccess() {
|
||||||
let notificationText = getLangText('If your email address exists in our database, you will receive a password recovery link in a few minutes.');
|
let notificationText = getLangText('If your email address exists in our database, you will receive a password recovery link in a few minutes.');
|
||||||
let notification = new GlobalNotificationModel(notificationText, 'success', 50000);
|
let notification = new GlobalNotificationModel(notificationText, 'success', 50000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
this.props.handleRequestSuccess(this.refs.form.refs.email.state.value);
|
this.props.handleRequestSuccess(this.refs.form.refs.email.state.value);
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
@ -80,15 +87,15 @@ let PasswordRequestResetForm = 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" />
|
||||||
</span>
|
</span>
|
||||||
}>
|
}>
|
||||||
<FormPropertyHeader>
|
<div className="ascribe-form-header">
|
||||||
<h3>{getLangText('Reset your password')}</h3>
|
<h3>{getLangText('Reset your password')}</h3>
|
||||||
</FormPropertyHeader>
|
</div>
|
||||||
<Property
|
<Property
|
||||||
name='email'
|
name='email'
|
||||||
label={getLangText('Email')}>
|
label={getLangText('Email')}>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
placeholder={getLangText("Enter your email and we'll send a link")}
|
placeholder={getLangText('Enter your email and we\'ll send a link')}
|
||||||
name="email"
|
name="email"
|
||||||
required/>
|
required/>
|
||||||
</Property>
|
</Property>
|
||||||
@ -99,19 +106,26 @@ let PasswordRequestResetForm = React.createClass({
|
|||||||
});
|
});
|
||||||
|
|
||||||
let PasswordResetForm = React.createClass({
|
let PasswordResetForm = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
email: React.PropTypes.string,
|
||||||
|
token: React.PropTypes.string
|
||||||
|
},
|
||||||
|
|
||||||
mixins: [Router.Navigation],
|
mixins: [Router.Navigation],
|
||||||
|
|
||||||
getFormData(){
|
getFormData() {
|
||||||
return {
|
return {
|
||||||
email: this.props.email,
|
email: this.props.email,
|
||||||
token: this.props.token
|
token: this.props.token
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSuccess() {
|
handleSuccess() {
|
||||||
this.transitionTo('pieces');
|
this.transitionTo('pieces');
|
||||||
let notification = new GlobalNotificationModel(getLangText('password successfully updated'), 'success', 10000);
|
let notification = new GlobalNotificationModel(getLangText('password successfully updated'), 'success', 10000);
|
||||||
GlobalNotificationActions.appendGlobalNotification(notification);
|
GlobalNotificationActions.appendGlobalNotification(notification);
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Form
|
<Form
|
||||||
@ -130,9 +144,9 @@ let PasswordResetForm = 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" />
|
||||||
</span>
|
</span>
|
||||||
}>
|
}>
|
||||||
<FormPropertyHeader>
|
<div className="ascribe-form-header">
|
||||||
<h3>{getLangText('Reset the password for')} {this.props.email}</h3>
|
<h3>{getLangText('Reset the password for')} {this.props.email}</h3>
|
||||||
</FormPropertyHeader>
|
</div>
|
||||||
<Property
|
<Property
|
||||||
name='password'
|
name='password'
|
||||||
label={getLangText('Password')}>
|
label={getLangText('Password')}>
|
||||||
|
@ -23,7 +23,6 @@ import GlobalNotificationActions from '../actions/global_notification_actions';
|
|||||||
import Property from './ascribe_forms/property';
|
import Property from './ascribe_forms/property';
|
||||||
import PropertyCollapsible from './ascribe_forms/property_collapsible';
|
import PropertyCollapsible from './ascribe_forms/property_collapsible';
|
||||||
import RegisterPieceForm from './ascribe_forms/form_register_piece';
|
import RegisterPieceForm from './ascribe_forms/form_register_piece';
|
||||||
//import FormPropertyHeader from './ascribe_forms/form_property_header';
|
|
||||||
|
|
||||||
import LoginContainer from './login_container';
|
import LoginContainer from './login_container';
|
||||||
import SlidesContainer from './ascribe_slides_container/slides_container';
|
import SlidesContainer from './ascribe_slides_container/slides_container';
|
||||||
|
Loading…
Reference in New Issue
Block a user