added interpolation for the translations and added label for plus id's for the fields

This commit is contained in:
Richard 2020-01-17 21:55:42 +01:00
parent 8a392fff9e
commit 4c36fd097f

View file

@ -80,17 +80,16 @@ export class Setup extends Component<any, State> {
registerUser() { registerUser() {
return ( return (
<form onSubmit={linkEvent(this, this.handleRegisterSubmit)}> <form onSubmit={linkEvent(this, this.handleRegisterSubmit)}>
<h5> <h4>{ i18n.t('setup_admin')}</h4>
<T i18nKey="setup_admin">#</T>
</h5>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"> <label class="col-sm-2 col-form-label" for="username">
<T i18nKey="username">#</T> { i18n.t('username') }
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input <input
type="text" type="text"
class="form-control" class="form-control"
id="username"
value={this.state.userForm.username} value={this.state.userForm.username}
onInput={linkEvent(this, this.handleRegisterUsernameChange)} onInput={linkEvent(this, this.handleRegisterUsernameChange)}
required required
@ -101,12 +100,14 @@ export class Setup extends Component<any, State> {
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"> <label class="col-sm-2 col-form-label" for="email">
<T i18nKey="email">#</T> { i18n.t('email') }
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input <input
type="email" type="email"
id="email"
class="form-control" class="form-control"
placeholder={i18n.t('optional')} placeholder={i18n.t('optional')}
value={this.state.userForm.email} value={this.state.userForm.email}
@ -116,12 +117,13 @@ export class Setup extends Component<any, State> {
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"> <label class="col-sm-2 col-form-label" for="password">
<T i18nKey="password">#</T> { i18n.t('password')}
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input <input
type="password" type="password"
id="password"
value={this.state.userForm.password} value={this.state.userForm.password}
onInput={linkEvent(this, this.handleRegisterPasswordChange)} onInput={linkEvent(this, this.handleRegisterPasswordChange)}
class="form-control" class="form-control"
@ -130,12 +132,13 @@ export class Setup extends Component<any, State> {
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label"> <label class="col-sm-2 col-form-label" for="verify-password">
<T i18nKey="verify_password">#</T> { i18n.t('verify_password') }
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<input <input
type="password" type="password"
id="verify-password"
value={this.state.userForm.password_verify} value={this.state.userForm.password_verify}
onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)} onInput={linkEvent(this, this.handleRegisterPasswordVerifyChange)}
class="form-control" class="form-control"