Esempio n. 1
0
        /// <summary>
        /// Handles the OnBeforeUnBindControl event of the wwDataBinder control.
        /// </summary>
        /// <param name="item">The wwDataBindingItem item.</param>
        protected bool wwDataBinder_BeforeUnbindControl(WebControls.wwDataBindingItem item)
        {
            // Disabled HTML items are not posted during a postback, so we don't have accurate information about their states.
            // Look for the checkboxes that cause other controls to be disabled, and assign the value of the disabled control to their
            // database setting. This allows disabled controls to retain their original value if an admin later re-enables them.
            if (!this.chkEnableSlideShow.Checked)
            {
                // When the slide show is unchecked, the slide show interval textbox is disabled via javascript.
                if (item.ControlId == this.txtSlideShowInterval.ID)
                {
                    this.txtSlideShowInterval.Text = GallerySettings.SlideshowInterval.ToString(CultureInfo.CurrentCulture);
                    return(false);
                }
            }

            if (!this.chkEnableGoZipDownload.Checked)
            {
                // When the download ZIP objects feature is unchecked, the download albums in ZIP file checkbox is disabled via javascript.
                if (item.ControlId == this.chkEnableAlbumZipDownload.ID)
                {
                    this.chkEnableAlbumZipDownload.Checked = GallerySettings.EnableAlbumZipDownload;
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 2
0
        protected bool wwDataBinder_BeforeUnbindControl(WebControls.wwDataBindingItem item)
        {
            if (!this.chkEnableSlideShow.Checked)
            {
                // When the slide show is unchecked, the slide show interval textbox is disabled via javascript. Disabled HTML items are not
                // posted during a postback, so we don't have accurate information about their states. For this control don't save
                // anything by returning false. Furthermore, to prevent these child controls from incorrectly reverting to an
                // empty or unchecked state in the UI, assign their properties to their config setting.
                if (item.ControlId == this.txtSlideShowInterval.ID)
                {
                    this.txtSlideShowInterval.Text = Core.SlideshowInterval.ToString();
                    return(false);
                }
            }

            if (!this.chkEnableMetadata.Checked)
            {
                // When the metadata feature is unchecked, the enhanced metadata checkbox is disabled via javascript. Disabled HTML items are not
                // posted during a postback, so we don't have accurate information about their states. For this control don't save
                // anything by returning false. Furthermore, to prevent these child controls from incorrectly reverting to an
                // empty or unchecked state in the UI, assign their properties to their config setting.
                if (item.ControlId == this.chkEnableWpfMetadataExtraction.ID)
                {
                    this.chkEnableWpfMetadataExtraction.Checked = Core.EnableWpfMetadataExtraction;
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 3
0
        /// <summary>
        /// Handles the OnBeforeUnBindControl event of the wwDataBinder control.
        /// </summary>
        /// <param name="item">The wwDataBindingItem item.</param>
        protected bool wwDataBinder_BeforeUnbindControl(WebControls.wwDataBindingItem item)
        {
            if (!BeforeUnbind_ProcessDisplayBehaviorControls(item))
            {
                return(false);
            }

            return(true);
        }
        protected bool wwDataBinder_ValidateControl(WebControls.wwDataBindingItem item)
        {
            if (!ValidateUsersToNotifyWhenErrorOccurs(item))
            {
                return(false);
            }

            return(true);
        }
Esempio n. 5
0
        /// <summary>
        /// Handles the OnValidateControl event of the wwDataBinder control.
        /// </summary>
        /// <param name="item">The wwDataBindingItem item.</param>
        /// <returns>Returns <c>true</c> if the item is valid; otherwise returns <c>false</c>.</returns>
        protected bool wwDataBinder_ValidateControl(WebControls.wwDataBindingItem item)
        {
            if (!ValidateUserCanEnableSelfRegistration(item))
            {
                return(false);
            }

            if (!ValidateUserAlbums(item))
            {
                return(false);
            }

            return(true);
        }
Esempio n. 6
0
 /// <summary>
 /// Handles the OnBeforeUnBindControl event of the wwDataBinder control.
 /// </summary>
 /// <param name="item">The wwDataBindingItem item.</param>
 protected bool wwDataBinder_BeforeUnbindControl(WebControls.wwDataBindingItem item)
 {
     // Disabled HTML items are not posted during a postback, so we don't have accurate information about their states.
     // Look for the checkboxes that cause other controls to be disabled, and assign the value of the disabled control to the
     // desired setting.
     if (!this.chkExtractMetadata.Checked)
     {
         // When the metadata feature is unchecked, the enhanced metadata checkbox must be false as well.
         if (item.ControlId == this.chkExtractMetadataUsingWpf.ID)
         {
             this.chkExtractMetadataUsingWpf.Checked = false;
         }
     }
     return(true);
 }
Esempio n. 7
0
 protected bool wwDataBinder_BeforeUnbindControl(WebControls.wwDataBindingItem item)
 {
     // Disabled HTML items are not posted during a postback, so we don't have accurate information about their states.
     // Look for the checkboxes that cause other controls to be disabled, and assign the value of the disabled control to their
     // database setting. This allows disabled controls to retain their original value if an admin later re-enables them.
     if (!this.chkExtractMetadata.Checked)
     {
         // When the metadata feature is unchecked, the enhanced metadata checkbox is disabled via javascript.
         if (item.ControlId == this.chkExtractMetadataUsingWpf.ID)
         {
             this.chkExtractMetadataUsingWpf.Checked = GallerySettings.ExtractMetadataUsingWpf;
             return(false);
         }
     }
     return(true);
 }
Esempio n. 8
0
        protected bool wwDataBinder_BeforeUnbindControl(WebControls.wwDataBindingItem item)
        {
            if (!BeforeUnbind_ProcessEnableSelfRegistrationControls(item))
            {
                return(false);
            }

            if (!BeforeUnbind_ProcessEnableUserAlbumsControls(item))
            {
                return(false);
            }

            if (!BeforeUnbind_ProcessUserAccountControls(item))
            {
                return(false);
            }

            return(true);
        }
Esempio n. 9
0
        protected bool wwDataBinder_ValidateControl(WebControls.wwDataBindingItem item)
        {
            if (!ValidateDefaultRolesForSelfRegisteredUser(item))
            {
                return(false);
            }

            if (!ValidateUsersToNotifyWhenAccountIsCreated(item))
            {
                return(false);
            }

            if (!ValidateUserAlbums(item))
            {
                return(false);
            }

            return(true);
        }