diff --git a/docs/en_US/release_notes_9_16.rst b/docs/en_US/release_notes_9_16.rst index 339d609ec7f..cfe8f3b651a 100644 --- a/docs/en_US/release_notes_9_16.rst +++ b/docs/en_US/release_notes_9_16.rst @@ -26,6 +26,7 @@ Bundled PostgreSQL Utilities New features ************ + | `Issue #9301 `_ - Added a "Back to login" link to the Forgot Password and Reset Password pages. | `Issue #9626 `_ - Add support for the TOAST tuple target storage parameter in the Materialized View dialog. | `Issue #9646 `_ - Make the init container security context in the Helm chart configurable via containerSecurityContext, consistent with the main container. | `Issue #9699 `_ - Add support for closing a tab with a middle-click on its title. diff --git a/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx b/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx index 70fbd73a7d1..78a3a295ce8 100644 --- a/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx +++ b/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx @@ -1,3 +1,4 @@ +import { Box } from '@mui/material'; import { useState } from 'react'; import ForgotPasswordImage from '../../img/forgot_password.svg?svgr'; import { InputText } from '../components/FormComponents'; @@ -5,7 +6,7 @@ import BasePage, { SecurityButton } from './BasePage'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; -export default function ForgotPasswordPage({csrfToken, actionUrl, ...props}) { +export default function ForgotPasswordPage({csrfToken, actionUrl, loginUrl, ...props}) { const [form, setForm] = useState(({email: ''})); const onTextChange = (n, val)=>{ @@ -20,6 +21,9 @@ export default function ForgotPasswordPage({csrfToken, actionUrl, ...props}) { onTextChange('email', v)} placeholder={gettext('Email Address')} autoFocus controlProps={{autoComplete: null}} /> {gettext('Recover Password')} + {loginUrl && + {gettext('Back to login')} + } ); @@ -28,4 +32,5 @@ export default function ForgotPasswordPage({csrfToken, actionUrl, ...props}) { ForgotPasswordPage.propTypes = { csrfToken: PropTypes.string, actionUrl: PropTypes.string, + loginUrl: PropTypes.string, }; diff --git a/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx b/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx index 66755c99ea8..dea3246a464 100644 --- a/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx +++ b/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx @@ -1,3 +1,4 @@ +import { Box } from '@mui/material'; import { useState } from 'react'; import ForgotPasswordImage from '../../img/forgot_password.svg?svgr'; import { InputText } from '../components/FormComponents'; @@ -5,7 +6,7 @@ import BasePage, { SecurityButton } from './BasePage'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; -export default function PasswordResetPage({csrfToken, actionUrl, ...props}) { +export default function PasswordResetPage({csrfToken, actionUrl, loginUrl, ...props}) { const [form, setForm] = useState(({password: '', password_confirm: ''})); const onTextChange = (n, val)=>{ @@ -21,6 +22,9 @@ export default function PasswordResetPage({csrfToken, actionUrl, ...props}) { onTextChange('password_confirm', v)} type="password" placeholder={gettext('Retype Password')} controlProps={{autoComplete: 'new-password'}} /> {gettext('Reset Password')} + {loginUrl && + {gettext('Back to login')} + } ); @@ -28,5 +32,6 @@ export default function PasswordResetPage({csrfToken, actionUrl, ...props}) { PasswordResetPage.propTypes = { csrfToken: PropTypes.string, - actionUrl: PropTypes.string + actionUrl: PropTypes.string, + loginUrl: PropTypes.string }; diff --git a/web/pgadmin/templates/security/forgot_password.html b/web/pgadmin/templates/security/forgot_password.html index 59ebe4e1fc8..9d572f603d6 100644 --- a/web/pgadmin/templates/security/forgot_password.html +++ b/web/pgadmin/templates/security/forgot_password.html @@ -1,6 +1,7 @@ {% set page_name = 'forgot_password' %} {% set page_props = { 'actionUrl': url_for('browser.forgot_password'), + 'loginUrl': url_for('authenticate.login'), 'csrfToken': csrf_token(), } %} {% extends "security/render_page.html" %} diff --git a/web/pgadmin/templates/security/reset_password.html b/web/pgadmin/templates/security/reset_password.html index ba448feeb50..7368a63c0e0 100644 --- a/web/pgadmin/templates/security/reset_password.html +++ b/web/pgadmin/templates/security/reset_password.html @@ -1,6 +1,7 @@ {% set page_name = 'reset_password' %} {% set page_props = { 'actionUrl': url_for('browser.reset_password', token=reset_password_token), + 'loginUrl': url_for('authenticate.login'), 'csrfToken': csrf_token(), } %} {% extends "security/render_page.html" %}