}
}
- if CONFIG.FreeSMSUser != "" {
- err := SendSMS(CONFIG.FreeSMSUser, CONFIG.FreeSMSPass, fmt.Sprintf("'%v' request a password reset. Token '/change-password?token=%v'", q.In.Email, token))
- if err != nil {
- return nil, NewInternalError(err)
- }
- }
-
return SignResult{token, newUser.Role == db.RoleAdmin}, nil
}
<div className="row">
<div className="col-12">
<form role="form" onSubmit={this.handleSubmit}>
- <label className="w-100">Key:
- <input className="form-control" type="text" placeholder="key" value={keyDisplayed} onChange={this.handleApiKeyChange} disabled={!this.props.editMode}/>
- </label>
- <label className="w-100">Secret:
- <input className="form-control" type="text" placeholder="secret" value={secretDisplayed} onChange={this.handleApiSecretChange} disabled={!this.props.editMode}/>
- </label>
+ <label className="w-100">Key:</label>
+ <input className="form-control" type="text" value={keyDisplayed} onChange={this.handleApiKeyChange} disabled={!this.props.editMode}/>
+ <label className="w-100">Secret:</label>
+ <input className="form-control" type="text" value={secretDisplayed} onChange={this.handleApiSecretChange} disabled={!this.props.editMode}/>
<input className="form-control submit" type={submitType} value="Save" />
<button className="form-control submit" style={{display: buttonDisplay}} onSubmit={null} onClick={this.props.onEditClick} type="button">Show/Edit</button>
</form>
var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
return (
<div className="row sign-in">
- <div className="offset-1 col-10 offset-md-4 col-md-4 text-center">
+ <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
<form role="form" onSubmit={this.handleSubmit}>
- <input className="form-control" type="password" placeholder="password" onChange={this.handlePasswordChange} />
+ <label className="w-100 text-left"><strong>New password</strong></label>
+ <input className="form-control" type="password" onChange={this.handlePasswordChange} />
<input className="form-control submit" type="submit" value="Change password" />
<div className={cName}>{this.state.msg}</div>
</form>
App.page('/signout', true, function(context) {
cookies.removeItem('jwt');
+ cookies.removeItem('isAdmin');
App.go('/');
});
}
return (
<div className="row otp-enroll">
- <div className="offset-4 col-4 col-xs-offset-1 col-xs-10 text-center">
+ <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
{qrCode}
<div className="row justify-content-center">
<form role="form" onSubmit={this.handleSubmit}>
- <input className="form-control" type="pass" placeholder="code" onChange={this.handlePassChange} />
+ <label className="w-100 text-left"><strong>Code</strong></label>
+ <input className="form-control" type="pass" onChange={this.handlePassChange} />
<input className="form-control submit" type="submit" value="Validate" />
<div className={cName}>{this.state.msg}</div>
</form>
return (
<div className={className}>
- <div className="box col-12">
+ <div className="box offset-1 col-10">
<div className="row">
<div className="col-4">{this.props.title}</div>
</div>
var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
return (
<div className="row sign-in">
- <div className="offset-1 col-10 offset-md-4 col-md-4 text-center">
+ <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
<form role="form" onSubmit={this.handleSubmit}>
- <input className="form-control" type="email" placeholder="email" onChange={this.handleEmailChange} />
+ <label className="w-100 text-left"><strong>Email address</strong></label>
+ <input className="form-control" type="email" onChange={this.handleEmailChange} />
<input className="form-control submit" type="submit" value="Reset" />
<div className={cName}>{this.state.msg}</div>
</form>
render = () => {
var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
return (
+ <React.Fragment>
<div className="row sign-in">
- <div className="offset-1 col-10 offset-md-4 col-md-4 text-center">
+ <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
<form role="form" onSubmit={this.handleSubmit}>
- <input className="form-control" type="email" placeholder="email" onChange={this.handleEmailChange} />
- <input className="form-control" type="password" placeholder="password" onChange={this.handlePasswordChange} />
+ <label className="w-100 text-left"><strong>Email address</strong></label>
+ <input className="form-control" type="email" onChange={this.handleEmailChange} />
+ <span className="w-100 d-inline-block text-left">
+ <label><strong>Password</strong></label>
+ <a className="blue-link hint-text float-right" href="/reset-password">Forgot password?</a>
+ </span>
+ <input className="form-control" type="password" onChange={this.handlePasswordChange} />
<input className="form-control submit" type="submit" value="Sign In" />
<div className={cName}>{this.state.msg}</div>
</form>
- <a href="#" onClick={App.onInternNavigation.bind(this, '/signup')}><u>Sign up</u></a>
</div>
</div>
+ <div className="row">
+ <div className="offset-1 col-10 box offset-md-4 col-md-4 text-center">
+ <span>New to CryptoPF? <a href="#" className="blue-link" onClick={App.onInternNavigation.bind(this, '/signup')}>Create an account.</a></span>
+ </div>
+ </div>
+ </React.Fragment>
);
}
}
var cName = classNames('form-message', {'hidden': this.state.hideMsg, 'message-ok': this.state.msgOk});
return (
<div className="row sign-in">
- <div className="offset-1 col-10 offset-md-4 col-md-4 text-center">
+ <div className="offset-1 box col-10 offset-md-4 col-md-4 text-center">
<form role="form" onSubmit={this.handleSubmit}>
- <input className="form-control" type="email" placeholder="email" onChange={this.handleEmailChange} />
- <input className="form-control" type="password" placeholder="password" onChange={this.handlePasswordChange} />
+ <label className="w-100 text-left"><strong>Email address</strong></label>
+ <input className="form-control" type="email" onChange={this.handleEmailChange} />
+ <label className="w-100 text-left"><strong>Password</strong></label>
+ <input className="form-control" type="password" onChange={this.handlePasswordChange} />
<input className="form-control submit" type="submit" value="Sign Up" />
<div className={cName}>{this.state.msg}</div>
- <a href="#" onClick={App.onInternNavigation.bind(this, '/signin')}><u>Sign In</u></a>
</form>
</div>
</div>
body {
font-family: 'Fira Mono', 'Helvetica Neue', Arial, Helvetica, sans-serif;
background-color: rgb(246, 248, 251);
+ font-size: 0.9em;
}
ul {
.sign-in .form-control {
margin-bottom: 20px;
border-radius: 2px;
- border: none;
background-color: white;
}
.sign-in .submit {
background-color: rgb(20, 20, 20);
color: white;
+ font-weight: bold;
+}
+
+.blue-link {
+ color: #0366d6;
+}
+
+.hint-text {
+ font-size: 0.9em;
+ margin-top: 1px;
}
.api-credentials-form .form-control {
margin-bottom: 20px;
border-radius: 2px;
- border: none;
background-color: white;
}
.otp-enroll .form-control {
margin-bottom: 20px;
border-radius: 2px;
- border: none;
background-color: white;
}
.otp-enroll .submit {
background-color: rgb(20, 20, 20);
color: white;
+ font-weight: bold;
}
.form-message {
background-color: rgba(255, 6, 6, .33);