Example #1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            PhoneticNameRowIndicator.ImageUrl = ImageServerConstants.ImageURLs.PhoneticName;
            IdeographyNameIndicator.ImageUrl = ImageServerConstants.ImageURLs.IdeographyName;
            var script =
                new ScriptTemplate(typeof(PersonNameInputPanel).Assembly,
                                   "ClearCanvas.ImageServer.Web.Application.Controls.PersonNameInputPanel.js");
            script.Replace("@@CLIENTID@@", ClientID);
            script.Replace("@@PHONETIC_ROW_CLIENTID@@", PhoneticRow.ClientID);
            script.Replace("@@IDEOGRAPHY_ROW_CLIENTID@@", IdeographicRow.ClientID);


            ShowOtherNameFormatButton.OnClientClick = ClientID + "_ShowOtherNameFormats(); return false;";

            Page.ClientScript.RegisterClientScriptBlock(GetType(), ClientID, script.Script, true);

            PersonGivenNameValidator.IgnoreEmptyValue = !Required;
            PersonLastNameValidator.IgnoreEmptyValue = !Required;

            //Dynamically set all of the Validation Groups
            PersonTitle.ValidationGroup = ValidationGroup;
            PersonTitleValidator.ValidationGroup = ValidationGroup;
            PersonGivenName.ValidationGroup = ValidationGroup;
            PersonGivenNameValidator.ValidationGroup = ValidationGroup;
            PersonMiddleName.ValidationGroup = ValidationGroup;
            PersonMiddleNameValidator.ValidationGroup = ValidationGroup;
            PersonLastName.ValidationGroup = ValidationGroup;
            PersonLastNameValidator.ValidationGroup = ValidationGroup;
            PersonSuffix.ValidationGroup = ValidationGroup;
            PersonSuffixValidator.ValidationGroup = ValidationGroup;
            PhoneticTitle.ValidationGroup = ValidationGroup;
            PhoneticGivenName.ValidationGroup = ValidationGroup;
            PhoneticMiddleName.ValidationGroup = ValidationGroup;
            PhoneticLastName.ValidationGroup = ValidationGroup;
            PhoneticSuffix.ValidationGroup = ValidationGroup;
            IdeographicTitle.ValidationGroup = ValidationGroup;
            IdeographicGivenName.ValidationGroup = ValidationGroup;
            IdeographicMiddleName.ValidationGroup = ValidationGroup;
            IdeographicLastName.ValidationGroup = ValidationGroup;
            IdeographicSuffix.ValidationGroup = ValidationGroup;
        }
        private void RegisterClientSideScripts()
        {
            ScriptTemplate template = new ScriptTemplate(typeof(AddFilesystemDialog).Assembly, "ClearCanvas.ImageServer.Web.Application.Pages.Admin.Configure.FileSystems.Filesystem.js");
            template.Replace("@@HW_PERCENTAGE_INPUT_CLIENTID@@", HighWatermarkTextBox.ClientID);
            template.Replace("@@HW_SIZE_CLIENTID@@", HighWatermarkSize.ClientID);
            template.Replace("@@LW_PERCENTAGE_INPUT_CLIENTID@@", LowWatermarkTextBox.ClientID);
            template.Replace("@@LW_SIZE_CLIENTID@@", LowWaterMarkSize.ClientID);
            template.Replace("@@PATH_INPUT_CLIENTID@@", PathTextBox.ClientID);
            template.Replace("@@TOTAL_SIZE_INDICATOR_CLIENTID@@", TotalSizeIndicator.ClientID);
            template.Replace("@@USED_SIZE_INDICATOR_CLIENTID@@", UsedSizeIndicator.ClientID);
            template.Replace("@@TOTAL_SIZE_CLIENTID@@", TotalSize.ClientID);
            template.Replace("@@USED_SIZE_CLIENTID@@", AvailableSize.ClientID);

            Page.ClientScript.RegisterClientScriptBlock(GetType(), ClientID+"_scripts", template.Script, true);
        }