protected virtual void WriteDisabledSelector(HtmlTextWriter writer, GetWizardRow wizardRow) { //<select disabled style="width:250px" name="Select'.$condition['type'].'"> writer.AddAttribute(HtmlTextWriterAttribute.Disabled, "disabled"); writer.AddAttribute(HtmlTextWriterAttribute.Style, "width:250px"); writer.AddAttribute(HtmlTextWriterAttribute.Name, String.Format("Select{0}", wizardRow.type)); writer.RenderBeginTag(HtmlTextWriterTag.Select); WriteDisabledSelectorOption(writer, wizardRow); //</select> writer.RenderEndTag(); }
protected override string GetWizardRowDescription(GetWizardRow wizardRow) { return string.Empty; }
protected virtual string GetWizardRowName(GetWizardRow wizardRow) { return wizardRow.name; }
protected virtual string GetWizardRowDescription(GetWizardRow wizardRow) { return wizardRow.description; }
protected virtual void WriteWizardRow(HtmlTextWriter writer, GetWizardRow wizardRow) { writer.AddAttribute(HtmlTextWriterAttribute.Width, "60%"); if(!wizardRow.automatic) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "guayaquil_SelectedRow"); } writer.RenderBeginTag(HtmlTextWriterTag.Tr); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.Write(GetWizardRowName(wizardRow)); writer.RenderEndTag(); writer.RenderBeginTag(HtmlTextWriterTag.Td); if(wizardRow.determined) { WriteDisabledSelector(writer, wizardRow); } else { WriteSelector(writer, wizardRow); } writer.RenderEndTag(); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.Write(GetWizardRowDescription(wizardRow)); writer.RenderEndTag(); writer.RenderEndTag(); }
protected virtual void WriteSelector(HtmlTextWriter writer, GetWizardRow wizardRow) { //<select style="width:250px" name="Select'.$condition['type'].'" onChange="openWizard(this.options[this.selectedIndex].value); return false;"> writer.AddAttribute(HtmlTextWriterAttribute.Style, "width:250px"); writer.AddAttribute(HtmlTextWriterAttribute.Name, String.Format("Select{0}", wizardRow.type)); writer.AddAttribute(HtmlTextWriterAttribute.Onchange, "openWizard(this.options[this.selectedIndex].value); return false;"); writer.RenderBeginTag(HtmlTextWriterTag.Select); //<option value="null"> </option> writer.AddAttribute(HtmlTextWriterAttribute.Value, "null"); writer.RenderBeginTag(HtmlTextWriterTag.Option); writer.Write(HtmlTextWriter.SpaceChar.ToString()); writer.RenderEndTag(); foreach (GetWizardRowRow optionRow in wizardRow.options) { WriteSelectorOption(writer, optionRow); } //</select> writer.RenderEndTag(); }
protected virtual void WriteDisabledSelectorOption(HtmlTextWriter writer, GetWizardRow wizardRow) { //<option disabled selected value="null">'.$condition['value'].'</option> writer.AddAttribute(HtmlTextWriterAttribute.Disabled, "disabled"); writer.AddAttribute(HtmlTextWriterAttribute.Selected, "selected"); writer.AddAttribute(HtmlTextWriterAttribute.Value, "null"); writer.RenderBeginTag(HtmlTextWriterTag.Option); writer.Write(wizardRow.value); writer.RenderEndTag(); }