$scope.submit = function()

in public/components/stub-modal/stub-modal.js [319:338]


    $scope.submit = function (form) {
        if (form.$invalid) {
            useNativeFormFeedback($scope.stub)
            return;  // Form is not ready to submit
        }
        if ($scope.actionSuccess) { // Form has already been submitted successfully
            if ($scope.composerUrl) {
                window.open($scope.composerUrl, "_blank");
            }
            if ($scope.editorUrl) {
                window.open($scope.editorUrl, "_blank");
            }
            $scope.cancel()
        }
        else {
            const addToComposer = $scope.stub.status !== 'Stub' && $scope.contentName !== 'Atom';
            const addToAtomEditor = !addToComposer && $scope.contentName === 'Atom' && $scope.stub.status !== 'Stub';
            $scope.ok(addToComposer, addToAtomEditor);
        }
    };