<script src="<?= APP_URL; ?>assets/vendor/codemirror/lib/codemirror.js"></script>
<script src="<?= APP_URL; ?>assets/vendor/codemirror/mode/yaml/yaml.js"></script>
<link href="<?= APP_URL; ?>assets/vendor/codemirror/lib/codemirror.css" rel="stylesheet" type="text/css" />
<script>
    $(document).ready(function () {
        CodeMirror.fromTextArea(document.getElementById('element-build_config'), {
            mode: "yaml",
            lineWrapping: true,
            lineNumbers: true
        });
        CodeMirror.fromTextArea(document.getElementById('element-environments'), {
            mode: "yaml",
            lineWrapping: true,
            lineNumbers: true
        });

        setupProjectForm();
    });
</script>

<?php use PHPCensor\Helper\Lang; ?>
<div class="row">

    <div class="col-sm-8">
        <div class="box ">
            <div class="box-header">
                <h3 class="box-title"><?php Lang::out('project_details'); ?></h3>
            </div>

            <div class="box-body">
                <?php print $form; ?>
            </div>
        </div>
    </div>

    <?php if(!is_null($key)): ?>
    <div class="col-sm-4">
        <div class="box">
            <div class="box-body">
                <p><?php Lang::out('public_key_help'); ?></p>
                <textarea style="width: 90%; height: 150px;"><?php print $key ?></textarea>
            </div>
        </div>
    </div>
    <?php endif; ?>

</div>
