Merge pull request #8609 from umbraco/v8/feature/block_list_rename_postFormSubmitting
renamedpostFormSubmitting
This commit is contained in:
@@ -331,7 +331,7 @@
|
||||
this.isolatedScope.blockObjects = {};
|
||||
|
||||
this.__watchers.push(this.isolatedScope.$on("$destroy", this.destroy.bind(this)));
|
||||
this.__watchers.push(propertyEditorScope.$on("postFormSubmitting", this.sync.bind(this)));
|
||||
this.__watchers.push(propertyEditorScope.$on("formSubmittingFinalPhase", this.sync.bind(this)));
|
||||
|
||||
};
|
||||
|
||||
@@ -356,7 +356,7 @@
|
||||
// re-create the watchers
|
||||
this.__watchers = [];
|
||||
this.__watchers.push(this.isolatedScope.$on("$destroy", this.destroy.bind(this)));
|
||||
this.__watchers.push(propertyEditorScope.$on("postFormSubmitting", this.sync.bind(this)));
|
||||
this.__watchers.push(propertyEditorScope.$on("formSubmittingFinalPhase", this.sync.bind(this)));
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,10 +17,10 @@ function formHelper(angularHelper, serverValidationManager, notificationsService
|
||||
* @function
|
||||
*
|
||||
* @description
|
||||
* Called by controllers when submitting a form - this ensures that all client validation is checked,
|
||||
* Called by controllers when submitting a form - this ensures that all client validation is checked,
|
||||
* server validation is cleared, that the correct events execute and status messages are displayed.
|
||||
* This returns true if the form is valid, otherwise false if form submission cannot continue.
|
||||
*
|
||||
*
|
||||
* @param {object} args An object containing arguments for form submission
|
||||
*/
|
||||
submitForm: function (args) {
|
||||
@@ -45,7 +45,7 @@ function formHelper(angularHelper, serverValidationManager, notificationsService
|
||||
args.scope.$broadcast("formSubmitting", { scope: args.scope, action: args.action });
|
||||
|
||||
// Some property editors need to perform an action after all property editors have reacted to the formSubmitting.
|
||||
args.scope.$broadcast("postFormSubmitting", { scope: args.scope, action: args.action });
|
||||
args.scope.$broadcast("formSubmittingFinalPhase", { scope: args.scope, action: args.action });
|
||||
|
||||
//then check if the form is valid
|
||||
if (!args.skipValidation) {
|
||||
@@ -73,7 +73,7 @@ function formHelper(angularHelper, serverValidationManager, notificationsService
|
||||
*
|
||||
* @description
|
||||
* Called by controllers when a form has been successfully submitted, this ensures the correct events are raised.
|
||||
*
|
||||
*
|
||||
* @param {object} args An object containing arguments for form submission
|
||||
*/
|
||||
resetForm: function (args) {
|
||||
@@ -109,7 +109,7 @@ function formHelper(angularHelper, serverValidationManager, notificationsService
|
||||
* @description
|
||||
* Needs to be called when a form submission fails, this will wire up all server validation errors in ModelState and
|
||||
* add the correct messages to the notifications. If a server error has occurred this will show a ysod.
|
||||
*
|
||||
*
|
||||
* @param {object} err The error object returned from the http promise
|
||||
*/
|
||||
handleError: function (err) {
|
||||
@@ -148,7 +148,7 @@ function formHelper(angularHelper, serverValidationManager, notificationsService
|
||||
*
|
||||
* @description
|
||||
* This wires up all of the server validation model state so that valServer and valServerField directives work
|
||||
*
|
||||
*
|
||||
* @param {object} err The error object returned from the http promise
|
||||
*/
|
||||
handleServerValidation: function (modelState) {
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
// boardcast the formSubmitting event to trigger syncronization or none-live property-editors
|
||||
$scope.$broadcast("formSubmitting", { scope: $scope });
|
||||
// Some property editors need to performe an action after all property editors have reacted to the formSubmitting.
|
||||
$scope.$broadcast("postFormSubmitting", { scope: $scope });
|
||||
|
||||
$scope.$broadcast("formSubmittingFinalPhase", { scope: $scope });
|
||||
|
||||
block.active = false;
|
||||
} else {
|
||||
$scope.api.activateBlock(block);
|
||||
|
||||
Reference in New Issue
Block a user