Merge branch '2.4' of github.com:MISP/MISP into decaying

pull/5032/head
mokaddem 2019-07-25 11:32:52 +02:00
commit eba3f98ed3
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 5 additions and 1 deletions

View File

@ -138,9 +138,13 @@ function removeRestClientHistoryItem(id) {
if (selected_template !== '' && allValidApis[selected_template] !== undefined) {
$('#template_description').show();
$('#ServerMethod').val('POST');
var server_url_changed = $('#ServerUrl').val() != allValidApis[selected_template].url;
$('#ServerUrl').val(allValidApis[selected_template].url);
$('#ServerUrl').data('urlWithoutParam', selected_template);
$('#ServerBody').val(allValidApis[selected_template].body);
var body_value = $('#ServerBody').val();
if (body_value === '' || server_url_changed) {
$('#ServerBody').val(allValidApis[selected_template].body);
}
setApiInfoBox(false);
updateQueryTool(selected_template, true);
}