Disable autocapitalize in iOS (ArcGIS Online) executive dashboard login

906
5
03-11-2014 06:42 AM
by Anonymous User
Not applicable
We are using the executive dashboard JavaScript template. The user names when signing using an iPad need to be lower case. Does anyone know how to turn off auto capitalization for the specific sign on? Thanks!

Attached is a screenshot of the sign in code:
0 Kudos
5 Replies
SteveCole
Frequent Contributor
I'd highly doubt you can change that since it's an OS thing. Why not just convert the user login to lower case using JS?
portalUser = loggedInUser.toLowerCase();


Steve
0 Kudos
by Anonymous User
Not applicable
Steve
Thanks for the reply, I tried your suggestion but it still doesn't change the case of the text for some reason when you sign in.

Ben
0 Kudos
SteveCole
Frequent Contributor
Hmm, yeah. I don't have access to a working example of this template but I suspect that my code suggestion is taking place AFTER the user actually tries to sign in. Is there some other function that calls AuthenticateUser, because this seems like the event function once someone actually clicks a log in button.
0 Kudos
by Anonymous User
Not applicable
The AuthenticateUser function only seems to be called in the onclick Sign in button on the default.htm page.

Here is the first part of the code for the loginpage.js within the Init function for the executive dashboard app:

var portal, portalUrl = document.location.protocol + '//www.arcgis.com';
var portalUser = null;
var share; //flag to determine whether the application is shared or not

function Init() {
    esri.config.defaults.io.proxyUrl = "proxy.ashx";
    esriConfig.defaults.io.alwaysUseProxy = false;
    esriConfig.defaults.io.timeout = 180000;

    // Create the portal
    portal = new esri.arcgis.Portal(portalUrl);

    // Set error messages from xml file
    dojo.xhrGet({
        url: "errorMessages.xml",
        handleAs: "xml",
        preventCache: true,
        load: function (xmlResponse) {
            messages = xmlResponse;


            if (dojo.isIE < 9 || dojo.isFF <= 3.5 || dojo.isChrome <= 5 || dojo.isOpera <= 9.5 || dojo.isSafari <= 3.1) {
                alert(messages.getElementsByTagName("browserSupport")[0].childNodes[0].nodeValue);
                return;
            }

            share = GetQuerystring('extent');
            if (share != "") {
                dojo.dom.byId("divTextContainer").style.display = "none";
                dojo.dom.byId("divMapContainer").style.display = "none";

                ShowProgressIndicator();


                portal.signIn().then(function (loggedInUser) {
                    portalUser = loggedInUser;
                    sessionStorage.clear();
                    FindArcGISGroup();
                });
                if (dojo.query(".dijitDialogPaneContentArea")[0]) {
                    dojo.query(".dijitDialogPaneContentArea")[0].childNodes[0].innerHTML = "Enter your Username and Password";
                }
            }
            else {
                dojo.dom.byId("divTextContainer").style.display = "block";
            }

            var userAgent = window.navigator.userAgent;

            if ((userAgent.indexOf("iPad") >= 0) || (userAgent.indexOf("Android") >= 0)) {
                isTablet = true;
                dojo.dom.byId('dynamicStyleSheet').href = "styles/tablet.css";
            }
            else {
                isBrowser = true;
                dojo.dom.byId('dynamicStyleSheet').href = "styles/browser.css";
            }

            dojo.connect(window, 'onresize', function (evt) {
                setTimeout(function () {
                    CreateScrollbar(dojo.dom.byId('divLayerContainer'), dojo.dom.byId('divLayerContent'));
                }, 500);
                if (map) {
                    if (dojo.dom.byId("map").style.display != "none") {
                        dojo.dom.byId('map').style.marginLeft = (dojo['dom-geometry'].getMarginBox("holder").l) + "px";
                        dojo.dom.byId('divFrozen').style.marginLeft = (dojo['dom-geometry'].getMarginBox("holder").l) + "px";
                        dojo.dom.byId('showHide').style.right = (dojo['dom-geometry'].getMarginBox("holder").l + 15) + "px";
                        ToggleContainers();
                        map.reposition();
                        map.resize();
                        ResetSlideControls();
                        dojo.dom.byId("divTempMap").style.left = ((dojo['dom-geometry'].getMarginBox("mapContainer").w + (dojo['dom-geometry'].getMarginBox("holder").l)) - dojo['dom-geometry'].getMarginBox("divMap").w) + "px";
                        setTimeout(function () {
                            dojo.dom.byId("divFrozen").style.height = (map.height - 140) + "px";
                        }, 500);
                        ResizeChartContainer();
                    }
                }
            });


0 Kudos
SteveCole
Frequent Contributor
I was all set to respond with "I don't know" but just had another idea. You probably can't modify the actual log in process into your ArcGIS Online account so maybe you can intercept it just before then by creating an event listener for the text box that the user actually enters their login name.

The event I'd consider playing with is the onChange event. In that situation, simply convert the current login entered into lower case. When the user clicks the log in button, it will then read the all lower case login.

You probably need to be careful since there's the possibility of an endless loop (first onChange function triggers another then another). Maybe evaluate if the login entered is already in all lower case?..
0 Kudos