mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
add help for users
This commit is contained in:
@@ -51,5 +51,14 @@
|
||||
"password-invalid": "Password has to be between 6 and 32 characters",
|
||||
"passwordValidation-invalid": "Passwords have to be the same",
|
||||
"validatePassword": "Please validate password here"
|
||||
},
|
||||
"help": {
|
||||
"usernameHelpText": "Unique name of the user.",
|
||||
"displayNameHelpText": "Display name of the user.",
|
||||
"mailHelpText": "Email address of the user.",
|
||||
"passwordHelpText": "Plain text password of the user.",
|
||||
"passwordConfirmHelpText": "Repeat the password for validation.",
|
||||
"adminHelpText": "An administrator is able to create, modify and delete repositories, groups and users.",
|
||||
"activeHelpText": "Activate or deactive the user."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ class UserForm extends React.Component<Props, State> {
|
||||
value={user ? user.name : ""}
|
||||
validationError={this.state.nameValidationError}
|
||||
errorMessage={t("validation.name-invalid")}
|
||||
helpText={t("help.usernameHelpText")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -109,6 +110,7 @@ class UserForm extends React.Component<Props, State> {
|
||||
value={user ? user.displayName : ""}
|
||||
validationError={this.state.displayNameValidationError}
|
||||
errorMessage={t("validation.displayname-invalid")}
|
||||
helpText={t("help.displayNameHelpText")}
|
||||
/>
|
||||
<InputField
|
||||
label={t("user.mail")}
|
||||
@@ -116,6 +118,7 @@ class UserForm extends React.Component<Props, State> {
|
||||
value={user ? user.mail : ""}
|
||||
validationError={this.state.mailValidationError}
|
||||
errorMessage={t("validation.mail-invalid")}
|
||||
helpText={t("help.mailHelpText")}
|
||||
/>
|
||||
<InputField
|
||||
label={t("user.password")}
|
||||
@@ -124,6 +127,7 @@ class UserForm extends React.Component<Props, State> {
|
||||
value={user ? user.password : ""}
|
||||
validationError={this.state.validatePasswordError}
|
||||
errorMessage={t("validation.password-invalid")}
|
||||
helpText={t("help.passwordHelpText")}
|
||||
/>
|
||||
<InputField
|
||||
label={t("validation.validatePassword")}
|
||||
@@ -132,16 +136,19 @@ class UserForm extends React.Component<Props, State> {
|
||||
value={this.state ? this.state.validatePassword : ""}
|
||||
validationError={this.state.passwordValidationError}
|
||||
errorMessage={t("validation.passwordValidation-invalid")}
|
||||
helpText={t("help.passwordConfirmHelpText")}
|
||||
/>
|
||||
<Checkbox
|
||||
label={t("user.admin")}
|
||||
onChange={this.handleAdminChange}
|
||||
checked={user ? user.admin : false}
|
||||
helpText={t("help.adminHelpText")}
|
||||
/>
|
||||
<Checkbox
|
||||
label={t("user.active")}
|
||||
onChange={this.handleActiveChange}
|
||||
checked={user ? user.active : false}
|
||||
helpText={t("help.activeHelpText")}
|
||||
/>
|
||||
<SubmitButton
|
||||
disabled={!this.isValid()}
|
||||
|
||||
Reference in New Issue
Block a user