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;
|
||||
|
||||
namespace Orchard.Projections.FilterEditors.Forms {
|
||||
|
||||
public class StringFilterForm : IFormProvider {
|
||||
public const string FormName = "StringFilter";
|
||||
|
||||
@@ -20,9 +19,7 @@ namespace Orchard.Projections.FilterEditors.Forms {
|
||||
}
|
||||
|
||||
public void Describe(DescribeContext context) {
|
||||
Func<IShapeFactory, object> form =
|
||||
shape => {
|
||||
|
||||
object form(IShapeFactory shape) {
|
||||
var f = Shape.Form(
|
||||
Id: "StringFilter",
|
||||
_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 });
|
||||
|
||||
return f;
|
||||
};
|
||||
}
|
||||
|
||||
context.Form(FormName, form);
|
||||
context.Form(FormName, (Func<IShapeFactory, object>)form);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user