Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 protected override string GetWizardRowDescription(GetWizardRow wizardRow)
 {
     return string.Empty;
 }
Ejemplo n.º 3
0
 protected virtual string GetWizardRowName(GetWizardRow wizardRow)
 {
     return wizardRow.name;
 }
Ejemplo n.º 4
0
 protected virtual string GetWizardRowDescription(GetWizardRow wizardRow)
 {
     return wizardRow.description;
 }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
        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">&nbsp;</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();
        }
Ejemplo n.º 7
0
 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();
 }