fix: save button not submitting — form id + form= attribute on submit button; migrator connection string in dev compose
- _EditorLayout renders FormActions section outside <form> in the DOM - Added id='templateForm' to form, form='templateForm' to submit button (HTML5 form association) - Added migrator env override in docker-compose.Development.yml so connection string is not read from \ Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
ViewData["EditorTitle"] = Model.PageTitle;
|
ViewData["EditorTitle"] = Model.PageTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
<form asp-action="Save" asp-controller="AdminTemplates" method="post">
|
<form id="templateForm" asp-action="Save" asp-controller="AdminTemplates" method="post">
|
||||||
@Html.AntiForgeryToken()
|
@Html.AntiForgeryToken()
|
||||||
<input asp-for="Id" type="hidden" />
|
<input asp-for="Id" type="hidden" />
|
||||||
<input type="hidden" name="IsNew" value="@Model.IsNew" />
|
<input type="hidden" name="IsNew" value="@Model.IsNew" />
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@section FormActions {
|
@section FormActions {
|
||||||
<button type="submit" class="btn btn-primary">💾 Save</button>
|
<button type="submit" form="templateForm" class="btn btn-primary">💾 Save</button>
|
||||||
<a href="/admin/templates" class="btn btn-secondary">✖ Cancel</a>
|
<a href="/admin/templates" class="btn btn-secondary">✖ Cancel</a>
|
||||||
}
|
}
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
|
migrator:
|
||||||
|
environment:
|
||||||
|
- App__ConnectionString=Host=db;Port=5432;Database=notification_service;Username=postgres;Password=postgres
|
||||||
|
|
||||||
api:
|
api:
|
||||||
environment:
|
environment:
|
||||||
- ASPNETCORE_ENVIRONMENT=Development
|
- ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
|||||||
Reference in New Issue
Block a user