summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorDarren Embry <dse@webonastick.com>2012-05-17 18:33:21 -0400
committerDarren Embry <dse@webonastick.com>2012-05-17 18:33:21 -0400
commita0edece98b120926a5af6d4502e1a2c4c835e52c (patch)
treec53f9c1b8d8c44f4093185ad6ac46b178dda4391 /usr/local/www/interfaces.php
parent8dcca9b51bf413509adfd8c36ec3c05b1e1b4ea9 (diff)
downloadpfsense-a0edece98b120926a5af6d4502e1a2c4c835e52c.zip
pfsense-a0edece98b120926a5af6d4502e1a2c4c835e52c.tar.gz
report errors adding a gateway through ajax calls
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-xusr/local/www/interfaces.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 9c136af..208e088 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -2760,12 +2760,20 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
selectbox.prop('selectedIndex',selectbox.children().length-1);
jQuery('#noteboxv6').html("<p/><strong><?=gettext("NOTE:"); ?></strong> <?=gettext("You can manage Gateways"); ?> <a target='_new' href='system_gateways.php'><?=gettext("here"); ?></a>.");
}
- function report_failure() {
- alert("Sorry, we could not create your IPv4 gateway at this time.");
+ function report_failure(request, textStatus, errorThrown) {
+ if (textStatus === "error" && request.getResponseHeader("Content-Type") === "text/plain") {
+ alert(request.responseText);
+ } else {
+ alert("Sorry, we could not create your IPv4 gateway at this time.");
+ }
hide_add_gateway();
}
- function report_failure_v6() {
- alert("Sorry, we could not create your IPv6 gateway at this time.");
+ function report_failure_v6(request, textStatus, errorThrown) {
+ if (textStatus === "error" && request.getResponseHeader("Content-Type") === "text/plain") {
+ alert(request.responseText);
+ } else {
+ alert("Sorry, we could not create your IPv6 gateway at this time.");
+ }
hide_add_gateway_v6();
}
function save_callback(transport) {
OpenPOWER on IntegriCloud