Skip to content

Commit

Permalink
revert method changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Modest-as committed Nov 17, 2021
1 parent 7595798 commit c1be381
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 113 deletions.
82 changes: 0 additions & 82 deletions Crude.Demo.Wasm/Pages/Example06.razor

This file was deleted.

3 changes: 0 additions & 3 deletions Crude.Demo.Wasm/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
<li class="pure-menu-item">
<NavLink href="example-style" class="pure-menu-link">Style</NavLink>
</li>
<li class="pure-menu-item">
<NavLink href="example-login-form-with-actions" class="pure-menu-link">Login with Actions</NavLink>
</li>
</ul>
</li>
<li class="pure-menu-item">
Expand Down
10 changes: 2 additions & 8 deletions Crude/Core/LayoutFragments/CrudeTreeFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ public RenderFragment Render(RenderContext context) => builder =>
builder.OpenComponent<EditForm>(seq++);
builder.AddAttribute(seq++, "EditContext", context.EditContext);

if (!string.IsNullOrWhiteSpace(context.Action) && !string.IsNullOrWhiteSpace(context.Method))
{
builder.AddAttribute(seq++, "action", context.Action);
builder.AddAttribute(seq++, "method", context.Method);
}

var onSubmit = GetOnSubmitButton(context);

if (onSubmit != null)
Expand Down Expand Up @@ -79,9 +73,9 @@ private static RenderFragment<EditContext> RenderFormContents(RenderContext cont

if (onSubmit != null)
{
builder.OpenElement(seq++, "button");
builder.OpenElement(seq++, "input");
builder.AddAttribute(seq++, "type", "submit");
builder.AddContent(seq++, onSubmit.Name);
builder.AddAttribute(seq++, "value", onSubmit.Name);
builder.CloseElement();
}

Expand Down
6 changes: 0 additions & 6 deletions Crude/Core/RenderOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ internal class RenderContext

public Action StateHasChanged { get; }

public string Action { get; }

public string Method { get; }

public RenderContext(
ComponentBase receiver,
Action stateHasChanged,
Expand All @@ -36,8 +32,6 @@ public RenderContext(
ViewModel = viewModel;

Formatter = userOptions.Formatter;
Action = userOptions.Action;
Method = userOptions.Method;

EditContext = new EditContext(viewModel);
}
Expand Down
14 changes: 0 additions & 14 deletions Crude/CrudeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ public class CrudeOptions
{
internal BaseRenderFormatter Formatter { get; }

internal string Action { get; set; } = string.Empty;

internal string Method { get; set; } = string.Empty;

public CrudeOptions(BaseRenderFormatter formatter)
{
Formatter = formatter;
Expand All @@ -20,15 +16,5 @@ public CrudeOptions(CultureInfo culture)
{
Formatter = new DefaultRenderFormatter(culture);
}

public CrudeOptions(
CultureInfo culture,
string action,
string method)
{
Formatter = new DefaultRenderFormatter(culture);
Action = action;
Method = method;
}
}
}

0 comments on commit c1be381

Please sign in to comment.