Modifying WAB based app "Sign In" window

1244
5
Jump to solution
01-25-2017 06:32 AM
AveKargaja
Occasional Contributor

Hi

Where can I modify the text content of WAB based app "Sign In" window? My focus is on the service (subfolder/service) and server (http://...) name, which I want to be removed (or hidden).

NLS libraries are not very helpful with those

sign in window

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Ramon,

   This is what I figured out. In the jimu.js/tokenUtils.js find the _bindEvents and add lines 28-31 and add the new requires lines 18 - 20 and 23.

define([
  'dojo/_base/lang',
  'dojo/_base/array',
  'dojo/aspect',
  'dojo/Deferred',
  'dojo/cookie',
  'dojo/json',
  'dojo/topic',
  'dojo/request/script',
  'esri/kernel',
  'esri/config',
  'esri/request',
  'esri/urlUtils',
  'esri/IdentityManager',
  'esri/arcgis/OAuthInfo',
  'jimu/portalUrlUtils',
  'jimu/utils',
  'dojo/on',
  'dojo/dom-style',
  'dojo/query'
],
function(lang, array, aspect, Deferred, cookie, json, topic, dojoScript, esriNS, esriConfig,
  esriRequest, esriUrlUtils, IdentityManager, OAuthInfo, portalUrlUtils, jimuUtils, on, domStyle, query) {

.....

    _bindEvents: function(){
      on(esriNS.id, 'dialog-create', function(){
        domStyle.set(query(".serverLink", esriNS.id.dialog.domNode)[0], "display", "none");
        domStyle.set(query(".resLink", esriNS.id.dialog.domNode)[0], "display", "none");
      });‍‍‍‍‍

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Ramon,

   This is what I figured out. In the jimu.js/tokenUtils.js find the _bindEvents and add lines 28-31 and add the new requires lines 18 - 20 and 23.

define([
  'dojo/_base/lang',
  'dojo/_base/array',
  'dojo/aspect',
  'dojo/Deferred',
  'dojo/cookie',
  'dojo/json',
  'dojo/topic',
  'dojo/request/script',
  'esri/kernel',
  'esri/config',
  'esri/request',
  'esri/urlUtils',
  'esri/IdentityManager',
  'esri/arcgis/OAuthInfo',
  'jimu/portalUrlUtils',
  'jimu/utils',
  'dojo/on',
  'dojo/dom-style',
  'dojo/query'
],
function(lang, array, aspect, Deferred, cookie, json, topic, dojoScript, esriNS, esriConfig,
  esriRequest, esriUrlUtils, IdentityManager, OAuthInfo, portalUrlUtils, jimuUtils, on, domStyle, query) {

.....

    _bindEvents: function(){
      on(esriNS.id, 'dialog-create', function(){
        domStyle.set(query(".serverLink", esriNS.id.dialog.domNode)[0], "display", "none");
        domStyle.set(query(".resLink", esriNS.id.dialog.domNode)[0], "display", "none");
      });‍‍‍‍‍

View solution in original post

AveKargaja
Occasional Contributor

Works just the way I expected, thanks a lot

0 Kudos
AveKargaja
Occasional Contributor

Oh, by the way Robert Scheitlin, GISP‌, do you have a clue where the rest of the sign in window text comes from. Trying to figure this out as this also looks kind of clumsy with my native language package  In english it is just one string, but in my case consists of three different strings.

RobertScheitlin__GISP
MVP Esteemed Contributor

Ramon,

   Sure you need to change the default strings associated with the API and the dijit:

'dojo/i18n!esri/nls/jsapi',
...
esriBundle

...
esriBundle.identity.info = "Please sign in to access the item on ${server} ${resource}";

Make sure you see this thread for info:

https://community.esri.com/thread/165417 

AveKargaja
Occasional Contributor

Thanks once again

0 Kudos