mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
improve new user error message
This commit is contained in:
parent
a1b70df3cc
commit
4be5fe0d0e
2 changed files with 13 additions and 4 deletions
|
@ -107,15 +107,24 @@
|
||||||
Dashboard.navigate("useredit.html?userId=" + user.Id);
|
Dashboard.navigate("useredit.html?userId=" + user.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
}, function () {
|
}, function (response) {
|
||||||
|
|
||||||
|
if (response.status == 400) {
|
||||||
|
|
||||||
|
Dashboard.alert({
|
||||||
|
message: page.querySelector('.labelNewUserNameHelp').innerHTML
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Dashboard.alert(Globalize.translate('DefaultErrorMessage'));
|
||||||
|
}
|
||||||
|
|
||||||
Dashboard.alert(Globalize.translate('DefaultErrorMessage'));
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
var page = $(this).parents('.page');
|
var page = $(this).parents('.page')[0];
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<li id="fldUserName">
|
<li id="fldUserName">
|
||||||
<label for="txtUserName">${LabelName}</label>
|
<label for="txtUserName">${LabelName}</label>
|
||||||
<input id="txtUserName" required="required" type="text" />
|
<input id="txtUserName" required="required" type="text" />
|
||||||
<div class="fieldDescription">${LabelNewUserNameHelp}</div>
|
<div class="fieldDescription labelNewUserNameHelp">${LabelNewUserNameHelp}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue