soumaeda 2 лет назад
Родитель
Сommit
6c0948ea2a
1 измененных файлов с 20 добавлено и 2 удалено
  1. 20 2
      apps/app/src/components/Admin/Users/PasswordResetModal.jsx

+ 20 - 2
apps/app/src/components/Admin/Users/PasswordResetModal.jsx

@@ -8,7 +8,7 @@ import {
 } from 'reactstrap';
 
 import { apiv3Put } from '~/client/util/apiv3-client';
-import { toastError } from '~/client/util/toastr';
+import { toastSuccess, toastError } from '~/client/util/toastr';
 
 
 class PasswordResetModal extends React.Component {
@@ -24,7 +24,6 @@ class PasswordResetModal extends React.Component {
     this.resetPassword = this.resetPassword.bind(this);
   }
 
-  // Reset Password
   async resetPassword() {
     const { t, userForPasswordResetModal } = this.props;
     try {
@@ -37,6 +36,25 @@ class PasswordResetModal extends React.Component {
     }
   }
 
+  showToaster() {
+    toastSuccess('Copied Password');
+  }
+
+  renderButtons() {
+    const { t, isMailerSetup } = this.props;
+
+    return (
+      <>
+        <button type="submit" className="btn btn-primary" onClick={this.onClickSendNewPasswordButton} disabled={!isMailerSetup}>
+          {t('Send')}
+        </button>
+        <button type="submit" className="btn btn-danger" onClick={this.props.onClose}>
+          {t('Close')}
+        </button>
+      </>
+    );
+  }
+
   renderModalBodyBeforeReset() {
     const { t, userForPasswordResetModal } = this.props;