The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cPanel plugin create form

Discussion in 'User Experience' started by Hristomir Hristov, Feb 17, 2017.

  1. Hristomir Hristov

    Hristomir Hristov Registered

    Joined:
    Feb 17, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sofia, Bulgaria
    cPanel Access Level:
    Root Administrator
    Hello,

    I am trying to create a new form in a custom plugin. I use those two pages as reference:
    cPanel Style Guide
    Guide to cPanel Interface Customization - jQuery - Software Development Kit - cPanel Documentation

    But when I try i get this javascript error:
    Error: Script error for: base
    Common Errors

    This is my javascript code:
    Code:
    document.addEventListener("DOMContentLoaded", function () {
            // Load the frameworks bundle, which contains the jQuery library and is used by the rest of cPanel
            require(["frameworksBuild"], function () {
                require([
                    "angular",
                    "uiBootstrap",
                    "ngSanitize",
                    "cjt/directives/toggleLabelInfoDirective",
                    "base"
                ], function (angular) {
                    var app = angular.module("App");
    
                    app.controller("formController", ["$scope", function ($scope) {
    
                        }]);
                });
            });
        });
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look to see what's happening?

    Thank you.
     
  3. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    190
    Likes Received:
    16
    Trophy Points:
    93
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Tapped a UI developer on the shoulder about this. He suggests removing the dependency on "base" and seeing if that fixes it. He's also addressing it in an update to the style guide as well if you'd like to see the fix in action there.
     
    cPanelMichael and Infopro like this.
  4. cPanelAdamF

    cPanelAdamF cPanel Product Owner
    Staff Member

    Joined:
    Mar 21, 2013
    Messages:
    190
    Likes Received:
    16
    Trophy Points:
    93
    Location:
    Houston TX
    cPanel Access Level:
    DataCenter Provider
    Twitter:
Loading...

Share This Page