mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Orchard.Forms: Fixing that local variable name in the Textarea shape did not reflect its content
This commit is contained in:
parent
c3b11fca44
commit
1d22f27bf0
@ -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]
|
||||||
|
Loading…
Reference in New Issue
Block a user