mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-19 22:41:55 +00:00
Fixed user settings error message when no changes made
This commit is contained in:
@@ -64,4 +64,7 @@
|
||||
<data name="Error contacting server" xml:space="preserve">
|
||||
<value>Fehler bei der Kommunikation mit dem Server</value>
|
||||
</data>
|
||||
<data name="There are no changes to be saved." xml:space="preserve">
|
||||
<value>Es wurden keine Änderungen gemacht.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
@inject IConfiguration Configuration
|
||||
@{
|
||||
ViewData["Title"] = T["User settings"];
|
||||
string barcodeType = Configuration["BarcodeType"] ?? "EAN13";
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +81,11 @@
|
||||
showToast('@T["Password must be at least 8 characters long and include upper, lower, number, and special character"]', 'danger');
|
||||
return;
|
||||
}
|
||||
const photo = updateForm.querySelector('#updatePhotoFile').value;
|
||||
if (password.length == 0 && photo.length == 0) {
|
||||
showToast('@T["There are no changes to be saved."]', 'danger');
|
||||
return;
|
||||
}
|
||||
const url = `/Settings/User`;
|
||||
const dataFromEntries = Object.fromEntries(new FormData(updateForm).entries());
|
||||
var data = unflatten(dataFromEntries);
|
||||
|
||||
Reference in New Issue
Block a user