<fieldset id="edit_page_basics" class="row">
    <div id="div_row_for_data[page][title]" class="row">
        <label for="data[page][title]">Title</label>
        <input type="hidden" name="data[page][id]" id="data[page][id]" value="" />
        <input type="text" name="data[page][title]" id="data[page][title]" value="" />
        <div id="page_title_alert" class="alert hint el" style="display:none"><i class="icon fa fa-exclamation-circle"></i><div class="text">Field cannot be left empty!</div></div>
    </div>
    <div class="row">
        <label>
            URL
        </label>
        <span id="page_url_link">#</span>
        <?php
        if (CMS_ALLOW_CLIENT_TO_EDIT_SLUGS === true || $_SESSION['content_manager']['is_mtcadmin'] === true) {
            ?>
            <a href="#" class="toggle-slug-field-btn"><i class="fa fa-pencil iconLineHeightAlign"></i></a>
            <?php
        }
        ?>
        <input type="text" name="data[page][slug]" id="data[page][slug]" value="" style="display:none" class="hide halfLengthField" />
        <a href="#" class="goToPageLink" target="_blank"><i class="iconLineHeightAlign fa fa-external-link-square"></i></a>
        <div id="page_slug_alert" class="yellowAlert hint el">
            <i class="icon fa fa-exclamation-triangle"></i>
            <div class="text">The slug provided is already taken and shall be appended with a number!</div>
        </div>
    </div>
    <?php
    $class = "";
    if (
        $post['preview_page']['type'] == "history" ||
        $post['preview_page']['type'] == "temp" ||
        $post['type'] == "temp" ||
        defined("CMS_PAGE_VERSIONING") && CMS_PAGE_VERSIONING === true
    ) {
        if ( $_SESSION['content_manager']['is_mtcadmin'] == false && $_SESSION['content_manager']['is_publisher'] == false) {
            $class = "hide";
        }
    }
    ?>
    <div class="row <?=$class?>">
        <label for="data[page][published]">
            Status
        </label>
        <?php
        if ($post['preview_page']['type'] == "history" || $post['preview_page']['type'] == "temp") {
            if ( $_SESSION['content_manager']['is_mtcadmin'] == true || $_SESSION['content_manager']['is_publisher'] == true) {
                ?>
                <select id="data[page][published]" name="data[page][published]">
                <option value="0" selected="selected">Not Public</option>
                <option value="1">Public</option>
            </select>
                <?php
            } else {
                ?>
                <select id="data[page][published]" name="data[page][published]">
                    <option value="0" selected="selected">Not Public</option>
                    <option value="1">Public</option>
                </select>
                <?php
            }
        } else {
            ?>
            <select id="data[page][published]" name="data[page][published]">
                <option value="0" selected="selected">Not Public</option>
                <option value="1">Public</option>
            </select>
            <?php
        }
        ?>
    </div>
</fieldset>
