webapp.template.test.request.script.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of broker-admin Show documentation
Show all versions of broker-admin Show documentation
Administration frontend for the AKTIN broker and aggregator
// executed a single time the template form has been injected
function initializeForm(){
$('#new_request input[name="text"]').val('test');
}
// build request XML from form data. use the given requestId
function compileForm(requestId){
return $('#new_request input[name="text"]').val();
}
function getFormMediaType(){
return 'text/plain+x.test.request';
}
// executed to validate the form (e.g. when submit button is pressed)
function validateForm(){
// validate request syntax
var text = $('#new_request input[name="text"]').val();
if( text == '' ){
return false;
}
return true;
}
function fillForm(data, contentType, id){
$('#new_request input[name="text"]').val(data);
}