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
|
||||
margin="dense"
|
||||
className="name"
|
||||
label="Name *"
|
||||
type="email"
|
||||
label="Username *"
|
||||
value={name}
|
||||
name="username"
|
||||
id="username"
|
||||
onChange={this.handleChange.bind(this, 'name')}
|
||||
fullWidth
|
||||
/>
|
||||
|
|
@ -65,7 +66,9 @@ export default class AddEditDialog extends Component<IProps, IState> {
|
|||
type="password"
|
||||
value={pass}
|
||||
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')}
|
||||
/>
|
||||
<FormControlLabel
|
||||
|
|
@ -89,7 +92,7 @@ export default class AddEditDialog extends Component<IProps, IState> {
|
|||
? passPresent
|
||||
? ''
|
||||
: 'password is required'
|
||||
: 'name is required'
|
||||
: 'username is required'
|
||||
}>
|
||||
<div>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -28,17 +28,21 @@ class Login extends Component<Stores<'currentUser'>> {
|
|||
<form onSubmit={this.preventDefault} id="login-form">
|
||||
<TextField
|
||||
autoFocus
|
||||
id="username"
|
||||
className="name"
|
||||
label="Username"
|
||||
name="username"
|
||||
margin="dense"
|
||||
autoComplete="username"
|
||||
value={username}
|
||||
onChange={(e) => (this.username = e.target.value)}
|
||||
/>
|
||||
<TextField
|
||||
id="password"
|
||||
type="password"
|
||||
className="password"
|
||||
label="Password"
|
||||
name="password"
|
||||
margin="normal"
|
||||
autoComplete="current-password"
|
||||
value={password}
|
||||
|
|
|
|||
|
|
@ -46,21 +46,26 @@ export default class RegistrationDialog extends Component<IProps, IState> {
|
|||
<DialogContent>
|
||||
<TextField
|
||||
autoFocus
|
||||
id="register-username"
|
||||
margin="dense"
|
||||
className="name"
|
||||
label="Name *"
|
||||
type="email"
|
||||
label="Username *"
|
||||
name="username"
|
||||
value={name}
|
||||
autoComplete="username"
|
||||
onChange={this.handleChange.bind(this, 'name')}
|
||||
fullWidth
|
||||
/>
|
||||
<TextField
|
||||
id="register-password"
|
||||
margin="dense"
|
||||
className="password"
|
||||
type="password"
|
||||
value={pass}
|
||||
fullWidth
|
||||
label="Pass *"
|
||||
label="Password *"
|
||||
name="password"
|
||||
autoComplete="new-password"
|
||||
onChange={this.handleChange.bind(this, 'pass')}
|
||||
/>
|
||||
</DialogContent>
|
||||
|
|
@ -73,7 +78,7 @@ export default class RegistrationDialog extends Component<IProps, IState> {
|
|||
? passPresent
|
||||
? ''
|
||||
: 'password is required'
|
||||
: 'name is required'
|
||||
: 'username is required'
|
||||
}>
|
||||
<div>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class Users extends Component<WithStyles<'wrapper'> & Stores<'userStore'>> {
|
|||
<Table id="user-table">
|
||||
<TableHead>
|
||||
<TableRow style={{textAlign: 'center'}}>
|
||||
<TableCell>Name</TableCell>
|
||||
<TableCell>Username</TableCell>
|
||||
<TableCell>Admin</TableCell>
|
||||
<TableCell />
|
||||
</TableRow>
|
||||
|
|
|
|||
Loading…
Reference in New Issue