mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
Add missing subtitles (#1496)
Add the last missing subtitles in the scmm core.
This commit is contained in:
@@ -28,7 +28,8 @@ import {
|
||||
Level,
|
||||
Notification,
|
||||
PasswordConfirmation,
|
||||
SubmitButton
|
||||
SubmitButton,
|
||||
Subtitle
|
||||
} from "@scm-manager/ui-components";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Me } from "@scm-manager/ui-types";
|
||||
@@ -55,9 +56,6 @@ class ChangeUserPassword extends React.Component<Props, State> {
|
||||
oldPassword: "",
|
||||
password: "",
|
||||
loading: false,
|
||||
passwordConfirmationError: false,
|
||||
validatePasswordError: false,
|
||||
validatePassword: "",
|
||||
passwordChanged: false,
|
||||
passwordValid: false
|
||||
};
|
||||
@@ -127,6 +125,7 @@ class ChangeUserPassword extends React.Component<Props, State> {
|
||||
|
||||
return (
|
||||
<form onSubmit={this.submit}>
|
||||
<Subtitle subtitle={t("password.subtitle")} />
|
||||
{message}
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
|
||||
@@ -25,7 +25,7 @@ import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { Link } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Level, Notification, SubmitButton } from "@scm-manager/ui-components";
|
||||
import { ErrorNotification, Level, Notification, SubmitButton, Subtitle } from "@scm-manager/ui-components";
|
||||
import { getLink } from "../../modules/indexResource";
|
||||
import { loadPermissionsForEntity, setPermissions } from "./handlePermissions";
|
||||
import PermissionsWrapper from "./PermissionsWrapper";
|
||||
@@ -134,6 +134,7 @@ class SetPermissions extends React.Component<Props, State> {
|
||||
|
||||
return (
|
||||
<form onSubmit={this.submit}>
|
||||
<Subtitle subtitle={t("setPermissions.subtitle")} />
|
||||
{message}
|
||||
{this.renderPermissions()}
|
||||
<Level
|
||||
|
||||
@@ -24,7 +24,14 @@
|
||||
import React from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import { User } from "@scm-manager/ui-types";
|
||||
import { ErrorNotification, Level, Notification, PasswordConfirmation, SubmitButton } from "@scm-manager/ui-components";
|
||||
import {
|
||||
ErrorNotification,
|
||||
Subtitle,
|
||||
Level,
|
||||
Notification,
|
||||
PasswordConfirmation,
|
||||
SubmitButton
|
||||
} from "@scm-manager/ui-components";
|
||||
import { setPassword } from "./setPassword";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
@@ -46,9 +53,6 @@ class SetUserPassword extends React.Component<Props, State> {
|
||||
this.state = {
|
||||
password: "",
|
||||
loading: false,
|
||||
passwordConfirmationError: false,
|
||||
validatePasswordError: false,
|
||||
validatePassword: "",
|
||||
passwordChanged: false,
|
||||
passwordValid: false
|
||||
};
|
||||
@@ -85,14 +89,16 @@ class SetUserPassword extends React.Component<Props, State> {
|
||||
const { password } = this.state;
|
||||
this.setLoadingState();
|
||||
setPassword(user._links.password.href, password)
|
||||
.then(result => {
|
||||
.then((result) => {
|
||||
if (result.error) {
|
||||
this.setErrorState(result.error);
|
||||
} else {
|
||||
this.setSuccessfulState();
|
||||
}
|
||||
})
|
||||
.catch(err => {});
|
||||
.catch((err) => {
|
||||
this.setErrorState(err);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -116,6 +122,7 @@ class SetUserPassword extends React.Component<Props, State> {
|
||||
|
||||
return (
|
||||
<form onSubmit={this.submit}>
|
||||
<Subtitle subtitle={t("singleUserPassword.subtitle")} />
|
||||
{message}
|
||||
<PasswordConfirmation
|
||||
passwordChanged={this.passwordChanged}
|
||||
|
||||
Reference in New Issue
Block a user