ID
PARENT_ID
TYPE
DESC
OPIS
path
default_db__x3A__CRM_PROCES:PROCES
default_db__x3A__CRM_PROCES:PROCES_INIT/*
default_db__x3A__CRM_PROCES:PROCES_INIT/**
default_db__x3A__CRM_WSKAZNIK:CRM_WSKAZNIK/*
ID
1003
ID
608
";
echo '...';
UI::startContainer();
echo UI::h('textarea', [ 'id' => 'wfsRequestBody', 'style' => "width:100%; height:300px" ], htmlspecialchars($exampleWfsRequestBody));
echo UI::h('button', [ 'class' => "btn btn-primary", 'onClick' => "return sendWfsRequest(this)" ], "Wyslij");
echo UI::h('pre', [ 'id' => 'wfsResponse' ], 'loading...');
UI::endContainer();
echo UI::h('script', [], "
function sendWfsRequest() {
document.getElementById('wfsResponse').innerHTML = 'loading...'
var postBody = document.getElementById('wfsRequestBody').value.replace(/</g, '<').replace(/>/g, '>')
console.log('wfsRequestBody:', postBody)
p5WFS_GetFeature('default_db__x3A__CRM_PROCES:PROCES', {
'ogc:Filter': postBody,
}).then(function (features) {
console.log('features', features)
document.getElementById('wfsResponse').innerHTML = JSON.stringify(features, null, 2)
}).catch(function (e) {
console.warn(e)
document.getElementById('wfsResponse').innerHTML = JSON.stringify(e, null, 2)
p5UI__notifyAjaxCallback({ type: 'error', msg: e })
})
return false
}
(function () {
console.log('p5WFS_GetFeature(default_db__x3A__CRM_PROCES:PROCES, ...)')
sendWfsRequest()
})()
");
} catch (Exception $e) {
UI::alert('danger', $e);
}
UI::dol();
}
}