Files
CouchLog/WatchLog/Components/Pages/GlobalEntities.razor
Henry Trumme c385ee0628 Save
2025-05-10 16:35:40 +02:00

38 lines
1.1 KiB
Plaintext

@rendermode InteractiveServer
@page "/GlobalEntities"
@using Microsoft.EntityFrameworkCore
@using WatchLog.Data
@inject IDbContextFactory<WatchLogDataContext> WatchLogDataContextFactory;
<PageTitle>GlobalEntities</PageTitle>
@if (ShowCreate)
{
<h3>Add a New GlobalEntity</h3>
<div class="row">
<label for="Title" class="col-4 col-form-label">Name</label>
<div class="col-8">
<input id="Title" name="Title" type="text" class="form-control" @bind="@NewGlobalEntity.Title" />
</div>
</div>
<div class="row">
<label for="Password" class="col-4 col-form-label">Password</label>
<div class="col-8">
<input id="Password" name="Password" type="text" class="form-control"/>
</div>
</div>
<div class="form-group row">
<div class="offset-4 col-8">
<button name="submit" type="submit" class="btn btn-primary" @onclick="CreateNewGlobalEntity">Submit</button>
</div>
</div>
}
else
{
<div class="form-group row">
<div class="offset-4 col-8">
<button name="submit" type="submit" class="btn btn-primary" @onclick="ShowCreateForm">Add a new Global Entity</button>
</div>
</div>
<p>SHOW THE LIST</p>
}