Home Analyst Portal

Cireson Portal – Disable or Hide User Settings Page on header

Gabriel_ArmentaGabriel_Armenta Member IT Monkey ✭
Hi Experts Monkeys,  I have a problems with the User Settings Page… have an error [COMException (0x8007200a): The specified directory service attribute or value does not exist.
], we need to disable this User Settings Page form my Users portal… somebody help me please... in advance Thanks

Best Answers

  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓
    Hi Gabriel,

    Oh yes, I apologize for the lack of explanation on how to use the code. I want to explain a couple of things first, just to make sure, that we do this the right way:

    First of all, you must do all customizations in the \CiresonPortal\CustomSpace folder, as any changes outside of this folder is completely unsupported my Cireson. So when you edit the UserProfile.js, you actually need to copy the file from \Scripts\forms\templates to the \CustomSpace folder and then make the changes in that file, thereby leaving the original UserProfile.js unchanged. So you need restore the UserProfile.js file in \Scripts\forms\templates if you have edited it. You can read more about how to customize forms here: https://support.cireson.com/KnowledgeBase/View/51#/

    In the same \CustomSpace folder you also find custom.js and custom.css - these are the files that you can add JavaScript code to (custom.js) and custom stylesheets (custom.css). Most / all customizations to the functionality and look of the portal is by adding code to these two files. custom.js is for functionality and custom.css is for look and design. More about the custom.js file here and the custom.css file here.

    Now, to your specific questions: The code must be added to the custom.js file and not UserProfile.js, and it actually needs to be expanded a bit, so the final code, which you must add to custom.js is:

    $(document).ready(function (){
        ($("a[href='/Settings/User/UserProfile']")).hide()
    });


    If you have something in your custom.js already, you will need make sure to insert that code outside any other functions, so insert it at the very bottom of the page, so there no characters after it.

    I hope my explanation wasn't to long, but I wanted to be sure, that you understand what is going on and how it works.

    If you have any questions, you are of course welcome to ask :)

Answers

  • Gabriel_ArmentaGabriel_Armenta Member IT Monkey ✭

    Thanks Konstantin for help me... I edited UserProfile.js file... I deleted all content... Now dont open User Profile Page... thats Oks... but I whant to a Hide this secction on the drop down menu... The code Line that send me, how to use??...

    I not a developer... Sorry..

    This is the content of my UserProfile.js file... where incert this line code??

    {
        "Default":{
            layoutType: "formPanelFull",
            tabList: [
                /*********/
                /** TAB **/
                /*********/
                {
                    name: "General",
                    content: [
                        {
                            customFieldGroupList: [
                                {
                                    name: "Profile",
                                    rows: [
                                        {
                                            columnFieldList: [
                                                { DataType: "String", PropertyDisplayName: "FirstName", PropertyName: "givenName", Disabled: true },
                                                { DataType: "String", PropertyDisplayName: "LastName", PropertyName: "sn", Disabled: true },
                                                { DataType: "String", PropertyDisplayName: "DisplayName", PropertyName: "displayName", Disabled: true },
                                                { DataType: "String", PropertyDisplayName: "MobilePhone", PropertyName: "mobile", Disabled: true }
                                            ]
                                        },
                                        {
                                            columnFieldList: [
                                                { DataType: "LongString", PropertyDisplayName: "EmailAddresses", PropertyName: "proxyAddresses", Rows: 3, Disabled: true },
                                                { DataType: "String", PropertyDisplayName: "AddEmailAddress", PropertyName: "new_proxyAddresses", Disabled: true },
                                            ]
                                        },
                                        {
                                            columnFieldList: [
                                                { DataType: "LongString", PropertyDisplayName: "OtherMobilePhone", PropertyName: "otherMobile", Rows: 3, Disabled: true },
                                                { DataType: "String", PropertyDisplayName: "AddOtherMobilePhone", PropertyName: "new_otherMobile", Disabled: true }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    name: "LanguageSettings",
                                    rows: [
                                        {
                                            columnFieldList: [
                                                {
                                                    type: "DropDownList",
                                                    PropertyDisplayName: "Language",
                                                    PropertyName: "LanguageCode",
                                                    Required: true,
                                                    DataSource: {
                                                        Url: "/Settings/User/GetAvailableLanguages/",
                                                    }
                                                },
                                                {
                                                    type: "DropDownList",
                                                    PropertyDisplayName: "DateLanguage",
                                                    PropertyName: "LanguageCodeDateTime",
                                                    Required: true,
                                                    DataSource: {
                                                        Url: "/Settings/User/GetAvailableLanguagesDateTime/",
                                                    }
                                                }
                                            ]
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }


    In advance Thanks!!!

  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭
    Answer ✓
    Hi Gabriel,

    Oh yes, I apologize for the lack of explanation on how to use the code. I want to explain a couple of things first, just to make sure, that we do this the right way:

    First of all, you must do all customizations in the \CiresonPortal\CustomSpace folder, as any changes outside of this folder is completely unsupported my Cireson. So when you edit the UserProfile.js, you actually need to copy the file from \Scripts\forms\templates to the \CustomSpace folder and then make the changes in that file, thereby leaving the original UserProfile.js unchanged. So you need restore the UserProfile.js file in \Scripts\forms\templates if you have edited it. You can read more about how to customize forms here: https://support.cireson.com/KnowledgeBase/View/51#/

    In the same \CustomSpace folder you also find custom.js and custom.css - these are the files that you can add JavaScript code to (custom.js) and custom stylesheets (custom.css). Most / all customizations to the functionality and look of the portal is by adding code to these two files. custom.js is for functionality and custom.css is for look and design. More about the custom.js file here and the custom.css file here.

    Now, to your specific questions: The code must be added to the custom.js file and not UserProfile.js, and it actually needs to be expanded a bit, so the final code, which you must add to custom.js is:

    $(document).ready(function (){
        ($("a[href='/Settings/User/UserProfile']")).hide()
    });


    If you have something in your custom.js already, you will need make sure to insert that code outside any other functions, so insert it at the very bottom of the page, so there no characters after it.

    I hope my explanation wasn't to long, but I wanted to be sure, that you understand what is going on and how it works.

    If you have any questions, you are of course welcome to ask :)

  • Gabriel_ArmentaGabriel_Armenta Member IT Monkey ✭

    HOOOW!!!!   

    Excelent answer.... really  Thanks so Much!!! 

    this solution work fine !!!

    Its all we need..

    Thanks Again Konstantin

  • Konstantin_Slavin-BoKonstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭
    Happy to help!
Sign In or Register to comment.