Orchard.Forms: Fixing that local variable name in the Textarea shape did not reflect its content

This commit is contained in:
Lombiq 2018-09-28 16:25:18 +02:00 committed by Benedek Farkas
parent c3b11fca44
commit 1d22f27bf0

View File

@ -235,24 +235,24 @@ namespace Orchard.Forms.Shapes {
TextWriter Output, TextWriter Output,
dynamic Display, dynamic Display,
dynamic Shape, string Name, string Value, int Size = 0, int Rows = 0) { dynamic Shape, string Name, string Value, int Size = 0, int Rows = 0) {
var select = (TagBuilder)_tagBuilderFactory.Create(Shape, "textarea"); var textarea = (TagBuilder)_tagBuilderFactory.Create(Shape, "textarea");
select.AddCssClass("text"); textarea.AddCssClass("text");
if (Name != null) { if (Name != null) {
select.MergeAttribute("name", Name, false); textarea.MergeAttribute("name", Name, false);
} }
if (Size > 0) { if (Size > 0) {
select.MergeAttribute("size", Size.ToString(), false); textarea.MergeAttribute("size", Size.ToString(), false);
} }
if (Rows > 0) { if (Rows > 0) {
select.MergeAttribute("rows", Rows.ToString(), false); textarea.MergeAttribute("rows", Rows.ToString(), false);
} }
Output.Write(select.ToString(TagRenderMode.StartTag)); Output.Write(textarea.ToString(TagRenderMode.StartTag));
Output.Write(Value); Output.Write(Value);
Output.WriteLine(select.ToString(TagRenderMode.EndTag)); Output.WriteLine(textarea.ToString(TagRenderMode.EndTag));
} }
[Shape] [Shape]