/// <summary>
        /// Performs update of master page details given submitted form data.
        /// </summary>
        /// <param name="form">Form containing updated master page zones data.</param>
        /// <returns>Result of form post.</returns>
        private FormResult UpdateMasterPage(Form form)
        {
            // Get identifier of master page that is being updated
            string[] parts        = form.Context.Split('|');
            long     masterPageId = Convert.ToInt64(parts[1]);

            // Get master page details
            long       tenantId   = _authenticationService.TenantId;
            MasterPage masterPage = JsonConvert.DeserializeObject <MasterPage>(form.Data);

            masterPage.TenantId     = tenantId;
            masterPage.MasterPageId = masterPageId;

            // Do the update
            _masterPageService.Update(masterPage);

            // Return form result with no errors
            return(_formHelperService.GetFormResult());
        }