Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
rileyrainey
Product and Topic Expert
Product and Topic Expert

If you are not using Afaria to manage application settings, your Kapsel Logon Screen presents a list of choices that might seem a bit formidable to your end users. This article describes an quick and easy change to your SMP SDK installation that will limit the Logon UI to the most common choices needed by users.


The default SMP Logon Screen exposes choices to the user that you might not want to show (SMP 3 SDK SP09; iOS screen)

The SMP SDK offers support for many different styles of security integration.  In many of those cases, though, we simply need to obtain the user's id and password to authenticate the device for SMP or HCPms access.  It turns out that you can modify a single file in your SMP SDK Kapsel installation directory to change this for all new Kapsel applications you might create. The JavaScript file path is <install_location>/KapselSDK/plugins/logon/www/common/modules/StaticScreens.js ; the passage of code you'll want to modify starts around line 143 of the file (at least that's the location in SMP3 SDK SP10 PL09, you line number may vary).

The code you will want to add are the "visible: false" values. I suggest making a backup copy of the file before you save your edits.


       'SCR_REGISTRATION': {
            id: 'SCR_REGISTRATION',
            nav: {
                submit: {
                },
        cancel: {
        }
            },
            fields: {
                      serverHost : {
                           uiKey:'FLD_HOST',
                           editable:true,
                            visible:false
                      },
                        user : {
                            uiKey:'FLD_USER'
                        },
                        password : {
                            uiKey:'FLD_PASS',
                            type: 'password'
                        },
                        resourcePath : {
                            uiKey:'FLD_RESOURCE_PATH',
                            visible:false
                        },
                        https: {
                            uiKey:'FLD_IS_HTTPS',
                            type: 'switch',
                            'default':false,
                            visible:false
                        },
                        serverPort : {
                            uiKey:'FLD_PORT',
                            type: 'number',
                            editable:true,
                            visible:false
                        },
                        farmId : {
                            uiKey:'FLD_FARMID',
                            visible:false
                        },
                        communicatorId : {
                            uiKey: 'FLD_COMMUNICATORID',
                            'default':'REST',
                            visible:false
                        },
                        securityConfig: {
                            uiKey:'FLD_SECCONF',
                            visible:false
                        },
            }
        },

Save these changes under the same filename.

You should now be able to see a much cleaner Login UI in any new Kapsel project you create -- either from the kapsel / cordova shell commands or using Web IDE's Hybrid Application Toolkit.  You can also update an existing project by finding and changing the file in the Cordova project's source  tree -- since I use the Hybrid App Toolkit frequently, though, I find it much more convenient to change the default directly in the SDK directory as I have shown here.

Enjoy.

4 Comments