Optimized ArticleEditor Page

This commit is contained in:
Mia Rose Winter 2024-01-17 20:07:34 +01:00
parent 8726e00f73
commit af15e065b6
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
2 changed files with 12 additions and 34 deletions

View file

@ -26,42 +26,20 @@
<DataAnnotationsValidator /> <DataAnnotationsValidator />
<input type="hidden" @bind-value="@Model.Id"/> <input type="hidden" @bind-value="@Model.Id"/>
<label class="form-control w-full"> <InputLabelComponent LabelText="@Localizer["Title_Label"]" For="() => Model.Title">
<div class="label"> <InputText class="input input-bordered w-full" maxlength="256" required aria-required disabled="@CannotEdit"
<span class="label-text">@Localizer["Title_Label"]</span>
</div>
<InputText class="input input-bordered w-full" maxlength="256" aria-required disabled="@CannotEdit"
@bind-Value="@Model.Title" placeholder="@Localizer["Title_Placeholder"]" /> @bind-Value="@Model.Title" placeholder="@Localizer["Title_Placeholder"]" />
<div class="label"> </InputLabelComponent>
<span class="label-text-alt text-error">
<ValidationMessage For="() => Model.Title" /> <InputLabelComponent LabelText="@Localizer["PublishDate_Label"]" For="() => Model.PublishDate">
</span>
</div>
</label>
<label class="form-control w-full">
<div class="label">
<span class="label-text">@Localizer["PublishDate_Label"]</span>
</div>
<InputDate class="input input-bordered w-full" disabled="@CannotEdit" Type="InputDateType.DateTimeLocal" <InputDate class="input input-bordered w-full" disabled="@CannotEdit" Type="InputDateType.DateTimeLocal"
@bind-Value="@Model.PublishDate" placeholder="@Localizer["PublishDate_Placeholder"]" /> @bind-Value="@Model.PublishDate" placeholder="@Localizer["PublishDate_Placeholder"]" />
<div class="label"> </InputLabelComponent>
<span class="label-text-alt text-error">
<ValidationMessage For="() => Model.PublishDate" /> <InputLabelComponent LabelText="@Localizer["Body_Label"]" For="() => Model.Body">
</span> <InputTextArea class="textarea textarea-bordered w-full h-96" required aria-required disabled="@CannotEdit"
</div>
</label>
<label class="form-control w-full">
<div class="label">
<span class="label-text">@Localizer["Body_Label"]</span>
</div>
<InputTextArea class="textarea textarea-bordered w-full" rows="10" aria-required disabled="@CannotEdit"
@bind-Value="@Model.Body" placeholder="@Localizer["Body_Placeholder"]" /> @bind-Value="@Model.Body" placeholder="@Localizer["Body_Placeholder"]" />
<div class="label"> </InputLabelComponent>
<span class="label-text-alt text-error">
<ValidationMessage For="() => Model.Body" />
</span>
</div>
</label>
<button type="submit" class="btn btn-primary btn-wide" disabled="@CannotEdit"> <button type="submit" class="btn btn-primary btn-wide" disabled="@CannotEdit">
@Localizer["EditorSubmit"] @Localizer["EditorSubmit"]

File diff suppressed because one or more lines are too long