private static void TranslateHtmlInputReset(HtmlInputReset obj) { if (obj != null) { obj.Value = TagReplace(obj.Value); } }
private void AddFormFooter(Panel p) { using (var htmlTable = new HtmlTable()) { using (var row = new HtmlTableRow()) { using (var labelCell = new HtmlTableCell()) { labelCell.Attributes.Add("class", "label-cell"); row.Cells.Add(labelCell); } using (var controlCell = new HtmlTableCell()) { this.saveButton = new Button(); this.saveButton.ID = "SaveButton"; this.saveButton.Text = ScrudResource.Save; this.saveButton.OnClientClick = "adjustSpinnerSize();"; this.saveButton.Click += this.SaveButton_Click; this.saveButton.CssClass = this.GetButtonCssClass(); controlCell.Controls.Add(this.saveButton); this.cancelButton = new Button(); this.cancelButton.ID = "CancelButton"; this.cancelButton.Text = ScrudResource.Cancel; this.cancelButton.CausesValidation = false; this.cancelButton.OnClientClick = "$('#FormPanel').hide(500); $('#GridPanel').show(500);"; this.cancelButton.Click += this.CancelButton_Click; this.cancelButton.CssClass = this.GetButtonCssClass(); controlCell.Controls.Add(this.cancelButton); using (var resetButton = new HtmlInputReset()) { resetButton.Value = ScrudResource.Reset; resetButton.Attributes.Add("class", this.GetButtonCssClass()); controlCell.Controls.Add(resetButton); } row.Cells.Add(controlCell); htmlTable.Rows.Add(row); p.Controls.Add(htmlTable); } } } }
private void AddFormFooter(Panel p) { HtmlTable table = new HtmlTable(); HtmlTableRow row = new HtmlTableRow(); HtmlTableCell labelCell = new HtmlTableCell(); labelCell.Attributes.Add("class", "label-cell"); row.Cells.Add(labelCell); HtmlTableCell controlCell = new HtmlTableCell(); saveButton = new Button(); saveButton.ID = "SaveButton"; saveButton.Text = Resources.ScrudResource.Save; saveButton.OnClientClick = "adjustSpinnerSize();"; saveButton.Click += SaveButton_Click; saveButton.CssClass = this.GetButtonCssClass(); controlCell.Controls.Add(saveButton); cancelButton = new Button(); cancelButton.ID = "CancelButton"; cancelButton.Text = Resources.ScrudResource.Cancel; cancelButton.CausesValidation = false; cancelButton.OnClientClick = "$('#FormPanel').hide(500); $('#GridPanel').show(500);"; cancelButton.Click += CancelButton_Click; cancelButton.CssClass = this.GetButtonCssClass(); controlCell.Controls.Add(cancelButton); HtmlInputReset resetButton = new HtmlInputReset(); resetButton.Value = Resources.ScrudResource.Reset; resetButton.Attributes.Add("class", this.GetButtonCssClass()); controlCell.Controls.Add(resetButton); row.Cells.Add(controlCell); table.Rows.Add(row); p.Controls.Add(table); }
private void AddFormFooter(Panel p) { using (HtmlTable htmlTable = new HtmlTable()) { using (HtmlTableRow row = new HtmlTableRow()) { using (HtmlTableCell labelCell = new HtmlTableCell()) { labelCell.Attributes.Add("class", "label-cell"); row.Cells.Add(labelCell); } using (HtmlTableCell controlCell = new HtmlTableCell()) { controlCell.Attributes.Add("class", "control-cell"); if (this.IsModal()) { this.useButton = new Button(); this.useButton.ID = "UseButton"; this.useButton.Text = Titles.Use; this.useButton.OnClientClick = "scrudDispalyLoading();"; this.useButton.Click += this.UseButton_Click; this.useButton.CssClass = this.GetButtonCssClass(); controlCell.Controls.Add(this.useButton); } this.saveButton = new Button(); this.saveButton.ID = "SaveButton"; this.saveButton.Text = Titles.Save; this.saveButton.OnClientClick = "return(scrudClientValidation());"; this.saveButton.Click += this.SaveButton_Click; this.saveButton.CssClass = this.GetSaveButtonCssClass(); controlCell.Controls.Add(this.saveButton); this.cancelButton = new Button(); this.cancelButton.ID = "CancelButton"; this.cancelButton.Text = Titles.Cancel; this.cancelButton.CausesValidation = false; this.cancelButton.OnClientClick = "$('#FormPanel').hide(500); $('#GridPanel').show(500);"; this.cancelButton.Click += this.CancelButton_Click; this.cancelButton.CssClass = this.GetButtonCssClass(); controlCell.Controls.Add(this.cancelButton); using (HtmlInputReset resetButton = new HtmlInputReset()) { resetButton.Value = Titles.Reset; resetButton.Attributes.Add("class", this.GetButtonCssClass()); controlCell.Controls.Add(resetButton); } row.Cells.Add(controlCell); htmlTable.Rows.Add(row); p.Controls.Add(htmlTable); } } } }