<?php

class SchematicOptionsView {

    function renderView() {
        ?>
        <div class="row5">
            <div class="row5">Scraper Mode </div>
            <label>
                <input <?php echo($this->getOptionsChecked('json_format')) ?> id="json_format" name="_schematic_options[json_format]" type="checkbox" value="true" type="checkbox" /> JSON-LD Format
            </label>
            <label>
                <input <?php echo($this->getOptionsChecked('microdata_format')) ?> id="microdata_format" name="_schematic_options[microdata_format]" type="checkbox" value="true" type="checkbox" /> MICRODATA Format
            </label>
        </div>

        <div class="row5">
            <label>
                <input <?php echo($this->getOptionsChecked('confirmation_deleting_node')) ?> id="confirmation_deleting_node" name="_schematic_options[confirmation_deleting_node]" type="checkbox" value="true" /> Require confirmation before deleting a Node
            </label>
        </div>

        <div class="row5">
            <label>
                <input <?php echo($this->getOptionsChecked('auto_collapse_group_nodes')) ?> id="auto_collapse_group_nodes" name="_schematic_options[auto_collapse_group_nodes]" type="checkbox" value="true" /> Auto collapse Group Nodes
            </label>
        </div>

        <div class="row5">
            <label>
                <input <?php echo($this->getOptionsChecked('highlight_nodes')) ?> id="highlight_nodes" name="_schematic_options[highlight_nodes]" type="checkbox" value="true" /> Highlight Nodes on mouseover
            </label>
        </div>
        <div class="row5">
            <label>
                <input <?php echo($this->getOptionsChecked('enable_php_functions')) ?> id="enable_php_functions" name="_schematic_options[enable_php_functions]" type="checkbox" value="true" /> Enable PHP functions
            </label>
        </div>
        <div class="row5">
            <label>
                <input <?php echo($this->getOptionsChecked('compatability_mode')) ?> id="compatability_mode" name="_schematic_options[compatability_mode]" type="checkbox" value="true" /> Enable Compatability Mode (helps solve hosting issues)
            </label>
        </div>
        <?php
    }

    private function getOptionsChecked($option) {

        if (isSchematicOptionChecked($option) ) {
            return ' checked="checked" ';
        }
    }

}
