'use strict'; import React from 'react'; import Router from 'react-router'; import GlobalNotificationModel from '../models/global_notification_model'; import GlobalNotificationActions from '../actions/global_notification_actions'; import Form from './ascribe_forms/form'; import Property from './ascribe_forms/property'; import apiUrls from '../constants/api_urls'; let LoginContainer = React.createClass({ mixins: [Router.Navigation], render() { return (

Log in to ascribe...
); } }); let LoginForm = React.createClass({ mixins: [Router.Navigation], handleSuccess(){ let notification = new GlobalNotificationModel('Login successsful', 'success', 10000); GlobalNotificationActions.appendGlobalNotification(notification); /*Taken from http://stackoverflow.com/a/14916411 */ /* We actually have to trick the Browser into showing the "save password" dialog as Chrome expects the login page to be reloaded after the login. Users on Stack Overflow claim this is a bug in chrome and should be fixed in the future. Until then, we redirect the HARD way, but reloading the whole page using window.location */ window.location = '/collection'; }, render() { return (
Log in to ascribe } spinner={ }>
Not an ascribe user? Sign up...
Forgot my password? Rescue me...
); } }); export default LoginContainer;