From 3ecc5c7ecf567704768ecc0ee0ec7787b62523d9 Mon Sep 17 00:00:00 2001 From: baudelotphilippe Date: Tue, 8 Oct 2024 15:00:16 +0200 Subject: [PATCH] add title for some modals --- otoroshi/javascript/src/components/AuthModuleConfig.js | 4 ++-- otoroshi/javascript/src/components/Thumbtack.js | 2 +- otoroshi/javascript/src/components/window.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/otoroshi/javascript/src/components/AuthModuleConfig.js b/otoroshi/javascript/src/components/AuthModuleConfig.js index 7c2725e54..11939c468 100644 --- a/otoroshi/javascript/src/components/AuthModuleConfig.js +++ b/otoroshi/javascript/src/components/AuthModuleConfig.js @@ -748,8 +748,8 @@ export class User extends Component { className="btn btn-sm btn-success" title="Set password" onClick={(e) => { - window.newPrompt('Type password', { type: 'password' }).then((value1) => { - window.newPrompt('Re-type password', { type: 'password' }).then((value2) => { + window.newPrompt('Type password', { type: 'password', title:'Set the password' }).then((value1) => { + window.newPrompt('Re-type password', { type: 'password', title:'Confirm the password' }).then((value2) => { if (value1 && value2 && value1 === value2) { this.props.hashPassword(this.props.user.email, value1); } else { diff --git a/otoroshi/javascript/src/components/Thumbtack.js b/otoroshi/javascript/src/components/Thumbtack.js index ba4c4192f..141e66a27 100644 --- a/otoroshi/javascript/src/components/Thumbtack.js +++ b/otoroshi/javascript/src/components/Thumbtack.js @@ -36,7 +36,7 @@ export default function Thumbtack({ env, getTitle, reloadEnv }) { } } }); - window.newPrompt('Shortcut title ?', { value: title }).then((newTitle) => { + window.newPrompt('Shortcut title ?', { value: title, title : 'Add a shortcut' }).then((newTitle) => { if (newTitle) { fetch('/bo/api/me/preferences/backoffice_sidebar_shortcuts', { method: 'GET', diff --git a/otoroshi/javascript/src/components/window.js b/otoroshi/javascript/src/components/window.js index 7f32f9aed..d26dfeb1d 100644 --- a/otoroshi/javascript/src/components/window.js +++ b/otoroshi/javascript/src/components/window.js @@ -279,6 +279,7 @@ export function registerPrompt() { ReactDOM.render(