Deeplink login message

0
Hi, I'm using mendix 5.12 and the deeplink 4.2.3 module. Now in the deeplink login.html there is a part that shows the message. <div id="loginMessage" class="mx-dialog-header login-message" style="-webkit-user-select: none;"> <h4 class="caption mx-dialog-caption">{RESULT}.</h4> </div> {Result} at first has the value 'Sign in' and when you enter the wrong credentials it becomes 'The username/password incorrect'. I want to change the messages, does anybody know where to do this? I changed the system texts in the modeler, but that doesn't seem to do anything Update: The complate login.html is: <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Mendix 5 - Login</title> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="robots" content="noindex, nofollow"> <link rel="stylesheet" href="{RELPATH}lib/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="{RELPATH}mxclientsystem/mxui/ui/mxui.css"> <link rel="stylesheet" href="{RELPATH}css/theme.css"> </head> <body dir="ltr" class="profile-desktop loginPage"> <div class="modal-dialog mx-dialog mx-login" id="mxui_widget_Login_0" widgetid="mxui_widget_Login_0" style="opacity: 1; z-index: 1002; top: 250.6px; left: 724px;"> <form class="modal-content mx-dialog-content loginBox" action="{RELPATH}{URL}" method="post"> <div id="loginMessage" class="modal-header mx-dialog-header login-message" style="-webkit-user-select: none;"> <h4 class="caption mx-dialog-caption mx-groupbox-header">{RESULT}</h4> </div> <div class="modal-body mx-dialog-body"> <input class="form-control" name="username" type="text" autocorrect="off" autocapitalize="none" placeholder="Gebruikersnaam"> <input class="form-control" name="password" type="password" autocorrect="off" autocapitalize="none" placeholder="Wachtwoord"> </div> <div class="modal-footer mx-dialog-footer" focus-id="mxui_wm_focus_Box_0"> <button type="submit" class="btn btn-primary">Login</button> <button class="btn" style="display: none;">Cancel</button> </div> </form> <div class="mx-resizer mx-resizer-n" data-resize-dir="n" style="-webkit-user-select: none;"></div> <div class="mx-resizer mx-resizer-e" data-resize-dir="e" style="-webkit-user-select: none;"></div> <div class="mx-resizer mx-resizer-s" data-resize-dir="s" style="-webkit-user-select: none;"></div> <div class="mx-resizer mx-resizer-w" data-resize-dir="w" style="-webkit-user-select: none;"></div> <div class="mx-resizer mx-resizer-ne" data-resize-dir="ne" style="-webkit-user-select: none;"></div> <div class="mx-resizer mx-resizer-se" data-resize-dir="se" style="-webkit-user-select: none;"></div> <div class="mx-resizer mx-resizer-sw" data-resize-dir="sw" style="-webkit-user-select: none;"></div> <div class="mx-resizer mx-resizer-nw" data-resize-dir="nw" style="-webkit-user-select: none;"></div> </div> </body> </html>
asked
2 answers
2

The deeplink module does all of this internally. In StartDeepLink.java you will find the following snippet of code:

        Map<String, String> args = new HashMap<String, String>();
        args.put("url", url);
        args.put("result", result);
        args.put("relpath", getRelPath(request));

        renderTemplate("login", args, response);

Only two possible values for result will ever be passed to this:

    private static final String DEFAULTLOGINTEXT = "Sign in";
    private static final String ERRORLOGINTEXT = "The username or password you entered is incorrect.";`

So this is where you could change this. In general it seems like it's somewhat of an issue that i8n is not taken into account at all here, as these are hardcoded Strings.

answered
1

Hi Topin,

For as far as I know the login logic uses the js files in deployment\web\js for the texts. Translations are in the login_i18n.js file and login.js contains the logic on the client side.

I don't know if this login_i18n.js is generated based on data that you can edit in the modeler. But overwriting it could be done using the theme folder.

answered