1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

Standardize CoaVerify route across apps

This commit is contained in:
Brett Sun 2016-01-29 11:20:43 +01:00
parent 01217318a4
commit 7383fbb1f6
2 changed files with 46 additions and 49 deletions

View File

@ -60,9 +60,8 @@ let CoaVerifyForm = React.createClass({
}, },
handleSuccess(response){ handleSuccess(response){
let notification = null;
if (response.verdict) { if (response.verdict) {
notification = new GlobalNotificationModel(getLangText('Certificate of Authenticity successfully verified'), 'success'); const notification = new GlobalNotificationModel(getLangText('Certificate of Authenticity successfully verified'), 'success');
GlobalNotificationActions.appendGlobalNotification(notification); GlobalNotificationActions.appendGlobalNotification(notification);
} }
}, },
@ -71,7 +70,6 @@ let CoaVerifyForm = React.createClass({
const { message, signature } = this.props; const { message, signature } = this.props;
return ( return (
<div>
<Form <Form
url={ApiUrls.coa_verify} url={ApiUrls.coa_verify}
handleSuccess={this.handleSuccess} handleSuccess={this.handleSuccess}
@ -80,7 +78,8 @@ let CoaVerifyForm = React.createClass({
type="submit" type="submit"
className="btn btn-default btn-wide"> className="btn btn-default btn-wide">
{getLangText('Verify your Certificate of Authenticity')} {getLangText('Verify your Certificate of Authenticity')}
</button>} </button>
}
spinner={ spinner={
<span className="btn btn-default btn-wide btn-spinner"> <span className="btn btn-default btn-wide btn-spinner">
<AscribeSpinner color="dark-blue" size="md" /> <AscribeSpinner color="dark-blue" size="md" />
@ -94,7 +93,6 @@ let CoaVerifyForm = React.createClass({
placeholder={getLangText('Copy paste the message on the bottom of your Certificate of Authenticity')} placeholder={getLangText('Copy paste the message on the bottom of your Certificate of Authenticity')}
autoComplete="on" autoComplete="on"
defaultValue={message} defaultValue={message}
name="username"
required /> required />
</Property> </Property>
<Property <Property
@ -110,7 +108,6 @@ let CoaVerifyForm = React.createClass({
</Property> </Property>
<hr /> <hr />
</Form> </Form>
</div>
); );
} }
}); });

View File

@ -77,7 +77,7 @@ let ROUTES = {
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)} component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)}
headerTitle='COLLECTION' /> headerTitle='COLLECTION' />
<Route path='editions/:editionId' component={EditionContainer} /> <Route path='editions/:editionId' component={EditionContainer} />
<Route path='verify' component={CoaVerifyContainer} /> <Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='pieces/:pieceId' component={CylandPieceContainer} /> <Route path='pieces/:pieceId' component={CylandPieceContainer} />
<Route path='*' component={ErrorNotFoundPage} /> <Route path='*' component={ErrorNotFoundPage} />
</Route> </Route>
@ -112,7 +112,7 @@ let ROUTES = {
headerTitle='COLLECTION' /> headerTitle='COLLECTION' />
<Route path='pieces/:pieceId' component={PieceContainer} /> <Route path='pieces/:pieceId' component={PieceContainer} />
<Route path='editions/:editionId' component={EditionContainer} /> <Route path='editions/:editionId' component={EditionContainer} />
<Route path='verify' component={CoaVerifyContainer} /> <Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} /> <Route path='*' component={ErrorNotFoundPage} />
</Route> </Route>
), ),
@ -156,7 +156,7 @@ let ROUTES = {
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} /> component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} />
<Route path='pieces/:pieceId' component={IkonotvPieceContainer} /> <Route path='pieces/:pieceId' component={IkonotvPieceContainer} />
<Route path='editions/:editionId' component={EditionContainer} /> <Route path='editions/:editionId' component={EditionContainer} />
<Route path='verify' component={CoaVerifyContainer} /> <Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} /> <Route path='*' component={ErrorNotFoundPage} />
</Route> </Route>
), ),
@ -192,7 +192,7 @@ let ROUTES = {
headerTitle='COLLECTION' /> headerTitle='COLLECTION' />
<Route path='pieces/:pieceId' component={MarketPieceContainer} /> <Route path='pieces/:pieceId' component={MarketPieceContainer} />
<Route path='editions/:editionId' component={MarketEditionContainer} /> <Route path='editions/:editionId' component={MarketEditionContainer} />
<Route path='verify' component={CoaVerifyContainer} /> <Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} /> <Route path='*' component={ErrorNotFoundPage} />
</Route> </Route>
), ),
@ -228,7 +228,7 @@ let ROUTES = {
headerTitle='COLLECTION' /> headerTitle='COLLECTION' />
<Route path='pieces/:pieceId' component={MarketPieceContainer} /> <Route path='pieces/:pieceId' component={MarketPieceContainer} />
<Route path='editions/:editionId' component={MarketEditionContainer} /> <Route path='editions/:editionId' component={MarketEditionContainer} />
<Route path='verify' component={CoaVerifyContainer} /> <Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} /> <Route path='*' component={ErrorNotFoundPage} />
</Route> </Route>
) )