<?php $pageTitle='Create a sequence';
include realpath(__DIR__).'/../../core/_common/header.php'; ?>
<script type="text/javascript">

window.addEventListener('DOMContentLoaded',function(){
    const grid = ui.grid();
    const detailsBox = grid.box({
        classes: 'r1 c1 h3 w1',
        title: 'Details'
    });
    const frm = detailsBox.form({
        action: '/api/sequence/',
        method: 'post',
    });
    frm.textField({ label:"Name", name:'name', value:'' });
	frm.textField({ label:"DNA Sequence", name:'dnasequence', value:'' });
	frm.roleField({ 
		label:"Construct",
		name:'constructid', 
		otherType:'construct',
		//constraint:{ 'owner':userId },
		labelField:'name',
		headers:['Name','Project'],
		cellTemplates:['{{name}}','{{projectname}}']
	});
	frm.createButton();

    grid.box({
        classes:'r1 c2 h1 w2',
        content:'This is only for testing and development. Go to the project page for a better way to work with proteins, constructs and sequences.'
    });


});
</script>
<?php include realpath(__DIR__).'/../../core/_common/footer.php'; ?>
