mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Show failure message if domain was invalid
This commit is contained in:
+2
-1
@@ -85,7 +85,8 @@ function add() {
|
||||
method: "post",
|
||||
data: {"domain":domain.val(), "list":list_type, "token":token},
|
||||
success: function(response) {
|
||||
if (response.indexOf("not a valid argument")>=0) {
|
||||
if (response.indexOf("not a valid argument") >= 0 ||
|
||||
response.indexOf("is not a valid domain") >= 0) {
|
||||
alFailure.show();
|
||||
alFailure.delay(1000).fadeOut(2000, function() {
|
||||
alFailure.hide();
|
||||
|
||||
Reference in New Issue
Block a user