Skip to content

Commit

Permalink
Merge pull request #2006 from MAIF/Title-for-modal
Browse files Browse the repository at this point in the history
add title for some modals
  • Loading branch information
mathieuancelin authored Oct 16, 2024
2 parents 8bd8edd + 3ecc5c7 commit 48da777
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions otoroshi/javascript/src/components/AuthModuleConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion otoroshi/javascript/src/components/Thumbtack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions otoroshi/javascript/src/components/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export function registerPrompt() {
ReactDOM.render(
<Prompt
message={message}
title={opts.title}
value={opts.value}
type={opts.type}
textarea={opts.textarea}
Expand Down

0 comments on commit 48da777

Please sign in to comment.