mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Code styling in StringFilterForm
This commit is contained in:
@@ -7,7 +7,6 @@ using Orchard.Forms.Services;
|
|||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
|
|
||||||
namespace Orchard.Projections.FilterEditors.Forms {
|
namespace Orchard.Projections.FilterEditors.Forms {
|
||||||
|
|
||||||
public class StringFilterForm : IFormProvider {
|
public class StringFilterForm : IFormProvider {
|
||||||
public const string FormName = "StringFilter";
|
public const string FormName = "StringFilter";
|
||||||
|
|
||||||
@@ -20,9 +19,7 @@ namespace Orchard.Projections.FilterEditors.Forms {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Describe(DescribeContext context) {
|
public void Describe(DescribeContext context) {
|
||||||
Func<IShapeFactory, object> form =
|
object form(IShapeFactory shape) {
|
||||||
shape => {
|
|
||||||
|
|
||||||
var f = Shape.Form(
|
var f = Shape.Form(
|
||||||
Id: "StringFilter",
|
Id: "StringFilter",
|
||||||
_Operator: Shape.SelectList(
|
_Operator: Shape.SelectList(
|
||||||
@@ -57,9 +54,9 @@ namespace Orchard.Projections.FilterEditors.Forms {
|
|||||||
f._Operator.Add(new SelectListItem { Value = Convert.ToString(StringOperator.NotContains), Text = T("Does not contain").Text });
|
f._Operator.Add(new SelectListItem { Value = Convert.ToString(StringOperator.NotContains), Text = T("Does not contain").Text });
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
};
|
}
|
||||||
|
|
||||||
context.Form(FormName, form);
|
context.Form(FormName, (Func<IShapeFactory, object>)form);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user