RainLoop / rainloop-webmail

Simple, modern & fast web-based email client
http://rainloop.net
MIT License
4.07k stars 873 forks source link

Overriding Notification Message Text in Plugin #2243

Open justinshewell opened 2 months ago

justinshewell commented 2 months ago

This more of a "how-to" question than an issue, but I couldn't find any other forum where I could ask this question.

I am writing a plugin for Rainloop to change the password via Postfixadmin. I have got everything working except the Notifications. When the password doesn't fit Postfixadmin's requirements, I want to display something like "Password must have at least 2 numbers" but the only option is "Password is too weak". I am trying to find a way to display additional information but nothing works.

RainLoop version, browser, OS: v 1.17.0

Expected behavior and actual behavior: I put a string (e.g. "Password needs at least 2 numbers" in the $sAdditionalMessage parameter of the "ClientException" but it doesn't show in the browser.

Steps to reproduce the problem:

Logs or screenshots:

the-djmaze commented 3 weeks ago

You need to modify https://github.com/RainLoop/rainloop-webmail/blob/master/dev/Settings/User/ChangePassword.js

Or throw your own ClientViewError exception with ErrorMessage