Browse Source

Show error message on portal page if no parameter given

svn path=/trunk/; revision=24180
tags/stw2018
otto 7 years ago
parent
commit
b2a7d89407
1 changed files with 13 additions and 9 deletions
  1. 13
    9
      tools/xsltsl/static-elements.xsl

+ 13
- 9
tools/xsltsl/static-elements.xsl View File

@@ -118,15 +118,19 @@
}
$(document).ready(function() {
var secret = window.location.search.slice(1);
$.getJSON('portal-backend?'+secret, function(data) {
$("#support_portal_loading").hide();
$("#support_portal").show();
if (data.error) {
$("#support_portal").html(data.error);
} else {
map_json_to_html(data);
}
});
if (secret.length == 32) {
$.getJSON('portal-backend?'+secret, function(data) {
$("#support_portal_loading").hide();
$("#support_portal").show();
if (data.error) {
$("#support_portal").html(data.error);
} else {
map_json_to_html(data);
}
});
} else {
$("#support_portal_loading").html("Expected parameter not found, nothing to show here.");
}
});
/* ]]> */
</script>

Loading…
Cancel
Save