<?php $pageTitle='Create a PDB deposition';
/** @noinspection PhpUnhandledExceptionInspection */
$sharedProject=project::getByName(baseproject::SHARED);
if(!$sharedProject){
	throw new NotFoundException('Could not read shared project');
}
$sharedProjectId=$sharedProject['id'];
include realpath(__DIR__).'/../../core/_common/header.php'; ?>
<script type="text/javascript">

window.addEventListener('DOMContentLoaded',function(){
	let grid=ui.grid();
	let detailsBox=grid.box({
		classes:'r1 c1 h3 w1',
		title:'Details'
	});

	let frm=detailsBox.form({
		action:'/api/pdbdeposition/',
		method:'post',
	});
	frm.hiddenField('projectid',<?php echo $sharedProjectId; ?>);
	frm.textField({ label:"Name", name:'name', value:'' });
	frm.createButton();
	
});
</script>
<?php include realpath(__DIR__).'/../../core/_common/footer.php';