SUGGESTION: Change the GlobalRadioButton.cs

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
Hello,

One thing I noticed rather early in using nopCommerce is that the radio buttons don't have a label, it's just a text next to it.

I made a very simple fix by adding the following code to the end of RenderInputTag:


            if (!string.IsNullOrEmpty(Text))
            {
                htw.WriteBeginTag("Label");
                htw.WriteAttribute("for", ClientID);
                htw.Write(HtmlTextWriter.TagRightChar);
                htw.Write(Text);
                htw.WriteEndTag("Label");
            }


This way it supports to add a 'Text' attribute directly in the tag and then you can select by just clicking the text
13 年 前
Thanks for suggestion
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.