Merge pull request #815 from martinfrancois/master
Consistency and Accessibility Improvements of the user-related UIs
This commit is contained in:
commit
a9ecbdc94e
|
|
@ -53,9 +53,10 @@ export default class AddEditDialog extends Component<IProps, IState> {
|
||||||
autoFocus
|
autoFocus
|
||||||
margin="dense"
|
margin="dense"
|
||||||
className="name"
|
className="name"
|
||||||
label="Name *"
|
label="Username *"
|
||||||
type="email"
|
|
||||||
value={name}
|
value={name}
|
||||||
|
name="username"
|
||||||
|
id="username"
|
||||||
onChange={this.handleChange.bind(this, 'name')}
|
onChange={this.handleChange.bind(this, 'name')}
|
||||||
fullWidth
|
fullWidth
|
||||||
/>
|
/>
|
||||||
|
|
@ -65,7 +66,9 @@ export default class AddEditDialog extends Component<IProps, IState> {
|
||||||
type="password"
|
type="password"
|
||||||
value={pass}
|
value={pass}
|
||||||
fullWidth
|
fullWidth
|
||||||
label={isEdit ? 'Pass (empty if no change)' : 'Pass *'}
|
label={isEdit ? 'Password (empty if no change)' : 'Password *'}
|
||||||
|
name="password"
|
||||||
|
id="password"
|
||||||
onChange={this.handleChange.bind(this, 'pass')}
|
onChange={this.handleChange.bind(this, 'pass')}
|
||||||
/>
|
/>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
|
|
@ -89,7 +92,7 @@ export default class AddEditDialog extends Component<IProps, IState> {
|
||||||
? passPresent
|
? passPresent
|
||||||
? ''
|
? ''
|
||||||
: 'password is required'
|
: 'password is required'
|
||||||
: 'name is required'
|
: 'username is required'
|
||||||
}>
|
}>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -28,17 +28,21 @@ class Login extends Component<Stores<'currentUser'>> {
|
||||||
<form onSubmit={this.preventDefault} id="login-form">
|
<form onSubmit={this.preventDefault} id="login-form">
|
||||||
<TextField
|
<TextField
|
||||||
autoFocus
|
autoFocus
|
||||||
|
id="username"
|
||||||
className="name"
|
className="name"
|
||||||
label="Username"
|
label="Username"
|
||||||
|
name="username"
|
||||||
margin="dense"
|
margin="dense"
|
||||||
autoComplete="username"
|
autoComplete="username"
|
||||||
value={username}
|
value={username}
|
||||||
onChange={(e) => (this.username = e.target.value)}
|
onChange={(e) => (this.username = e.target.value)}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
|
id="password"
|
||||||
type="password"
|
type="password"
|
||||||
className="password"
|
className="password"
|
||||||
label="Password"
|
label="Password"
|
||||||
|
name="password"
|
||||||
margin="normal"
|
margin="normal"
|
||||||
autoComplete="current-password"
|
autoComplete="current-password"
|
||||||
value={password}
|
value={password}
|
||||||
|
|
|
||||||
|
|
@ -46,21 +46,26 @@ export default class RegistrationDialog extends Component<IProps, IState> {
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<TextField
|
<TextField
|
||||||
autoFocus
|
autoFocus
|
||||||
|
id="register-username"
|
||||||
margin="dense"
|
margin="dense"
|
||||||
className="name"
|
className="name"
|
||||||
label="Name *"
|
label="Username *"
|
||||||
type="email"
|
name="username"
|
||||||
value={name}
|
value={name}
|
||||||
|
autoComplete="username"
|
||||||
onChange={this.handleChange.bind(this, 'name')}
|
onChange={this.handleChange.bind(this, 'name')}
|
||||||
fullWidth
|
fullWidth
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
|
id="register-password"
|
||||||
margin="dense"
|
margin="dense"
|
||||||
className="password"
|
className="password"
|
||||||
type="password"
|
type="password"
|
||||||
value={pass}
|
value={pass}
|
||||||
fullWidth
|
fullWidth
|
||||||
label="Pass *"
|
label="Password *"
|
||||||
|
name="password"
|
||||||
|
autoComplete="new-password"
|
||||||
onChange={this.handleChange.bind(this, 'pass')}
|
onChange={this.handleChange.bind(this, 'pass')}
|
||||||
/>
|
/>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
@ -73,7 +78,7 @@ export default class RegistrationDialog extends Component<IProps, IState> {
|
||||||
? passPresent
|
? passPresent
|
||||||
? ''
|
? ''
|
||||||
: 'password is required'
|
: 'password is required'
|
||||||
: 'name is required'
|
: 'username is required'
|
||||||
}>
|
}>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ class Users extends Component<WithStyles<'wrapper'> & Stores<'userStore'>> {
|
||||||
<Table id="user-table">
|
<Table id="user-table">
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow style={{textAlign: 'center'}}>
|
<TableRow style={{textAlign: 'center'}}>
|
||||||
<TableCell>Name</TableCell>
|
<TableCell>Username</TableCell>
|
||||||
<TableCell>Admin</TableCell>
|
<TableCell>Admin</TableCell>
|
||||||
<TableCell />
|
<TableCell />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue