1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Standardize CoaVerify route across apps

This commit is contained in:
Brett Sun 2016-01-29 11:20:43 +01:00
parent 5cfbe5cc39
commit 2661f2ba57
2 changed files with 46 additions and 49 deletions

View File

@ -27,7 +27,7 @@ let CoaVerifyContainer = React.createClass({
return (
<div className="ascribe-login-wrapper">
<br/>
<br />
<div className="ascribe-login-text ascribe-login-header">
{getLangText('Verify your Certificate of Authenticity')}
</div>
@ -60,9 +60,8 @@ let CoaVerifyForm = React.createClass({
},
handleSuccess(response){
let notification = null;
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);
}
},
@ -71,7 +70,6 @@ let CoaVerifyForm = React.createClass({
const { message, signature } = this.props;
return (
<div>
<Form
url={ApiUrls.coa_verify}
handleSuccess={this.handleSuccess}
@ -80,7 +78,8 @@ let CoaVerifyForm = React.createClass({
type="submit"
className="btn btn-default btn-wide">
{getLangText('Verify your Certificate of Authenticity')}
</button>}
</button>
}
spinner={
<span className="btn btn-default btn-wide btn-spinner">
<AscribeSpinner color="dark-blue" size="md" />
@ -94,8 +93,7 @@ let CoaVerifyForm = React.createClass({
placeholder={getLangText('Copy paste the message on the bottom of your Certificate of Authenticity')}
autoComplete="on"
defaultValue={message}
name="username"
required/>
required />
</Property>
<Property
name='signature'
@ -106,11 +104,10 @@ let CoaVerifyForm = React.createClass({
rows={3}
placeholder={getLangText('Copy paste the signature on the bottom of your Certificate of Authenticity')}
defaultValue={signature}
required/>
required />
</Property>
<hr />
</Form>
</div>
);
}
});

View File

@ -78,7 +78,7 @@ let ROUTES = {
headerTitle='COLLECTION'
disableOn='noPieces' />
<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='*' component={ErrorNotFoundPage} />
</Route>
@ -114,7 +114,7 @@ let ROUTES = {
disableOn='noPieces' />
<Route path='pieces/:pieceId' component={PieceContainer} />
<Route path='editions/:editionId' component={EditionContainer} />
<Route path='verify' component={CoaVerifyContainer} />
<Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} />
</Route>
),
@ -159,7 +159,7 @@ let ROUTES = {
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} />
<Route path='pieces/:pieceId' component={IkonotvPieceContainer} />
<Route path='editions/:editionId' component={EditionContainer} />
<Route path='verify' component={CoaVerifyContainer} />
<Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} />
</Route>
),
@ -196,7 +196,7 @@ let ROUTES = {
disableOn='noPieces' />
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
<Route path='editions/:editionId' component={MarketEditionContainer} />
<Route path='verify' component={CoaVerifyContainer} />
<Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} />
</Route>
),
@ -233,7 +233,7 @@ let ROUTES = {
disableOn='noPieces' />
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
<Route path='editions/:editionId' component={MarketEditionContainer} />
<Route path='verify' component={CoaVerifyContainer} />
<Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} />
</Route>
)