From 2a38eaf43198def259ecdf5264451ecdf07eb25d Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Sun, 30 Oct 2016 00:12:01 +0200 Subject: interfaces, show error message if adding duplicate gateway (cherry picked from commit e8517c7c16b8a845333c7d0e91f552144e6b5560) --- src/usr/local/www/interfaces.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/usr/local/www/interfaces.php') diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 710b42e..de8f776 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -3396,7 +3396,8 @@ events.push(function() { } function report_failure(request, textStatus, errorThrown) { - if (textStatus === "error" && request.getResponseHeader("Content-Type") === "text/plain") { + contenttype = ";"+request.getResponseHeader("Content-Type")+";"; + if (textStatus === "error" && contenttype.indexOf(";text/plain;") !== -1) { alert(request.responseText); } else { alert("The IPv4 gateway could not be created."); -- cgit v1.1