91 lines
3.7 KiB
PHP
91 lines
3.7 KiB
PHP
<?php
|
|
|
|
$admin_page = $b->ls_get_key("admin_page");
|
|
$pages = $b->admin_pages_list;
|
|
$current_page = $pages[$admin_page];
|
|
|
|
?>
|
|
<div class="datatype-edit-wrapper">
|
|
<div class="page_wrapper">
|
|
<h1 class="page_name">
|
|
<?= $current_page["title"]; ?>
|
|
<?php $b->template_load("bive-admin-panel/template/menu/favorite_star.php"); ?>
|
|
</h1>
|
|
</div>
|
|
|
|
<?php $b->alerts_view("admin_item"); ?>
|
|
<?php $b->alerts_view("file"); ?>
|
|
|
|
<form class="admin-data-form" method="post" enctype="multipart/form-data">
|
|
<?php $b->event_form("settings_save"); ?>
|
|
<?php $b->router_params_to_form($_GET); ?>
|
|
<div class="admin-left-column">
|
|
<div class="admin-block mb-1">
|
|
<?php foreach ($variables["settings_list"] as $key => $value) { ?>
|
|
<?php if($b->setting_get_field($value) == "separator") { ?>
|
|
<div class="input-separator">
|
|
<?= $b->setting_get_title($value); ?>
|
|
</div>
|
|
<?php } else { ?>
|
|
<div class="input-group">
|
|
<div class="input-label">
|
|
<p class="input-label__inner"><?= $b->setting_get_title($value); ?></p>
|
|
<p class="input-label__background"><?= $value; ?></p>
|
|
</div>
|
|
<div class="input-edit">
|
|
<?php $b->field_render_edit($b->setting_get_field($value), $value, $b->setting_get($value)); ?>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="admin-floating-wrapper">
|
|
<div class="admin-floating-block">
|
|
<div class="admin-block admin-floating-row">
|
|
<div class="datatype-buttons">
|
|
<button class="btn btn-primary mr-1" type="submit">Сохранить</button>
|
|
</div>
|
|
<span class="admin-floating-status status-block">Без изменений</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<script>
|
|
const form = document.querySelector('.admin-data-form');
|
|
|
|
form.addEventListener('submit', () => {
|
|
localStorage.setItem('pagePosition', window.pageYOffset);
|
|
});
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
const pagePosition = localStorage.getItem('pagePosition');
|
|
if (pagePosition !== null) {
|
|
window.scrollTo(0, pagePosition);
|
|
localStorage.removeItem('pagePosition');
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<script type="module">
|
|
// tinymce.init({
|
|
// selector: '.bive-textarea__content',
|
|
// plugins: [
|
|
// 'a11ychecker','advlist','advcode','advtable','autolink','checklist','export',
|
|
// 'lists','link','image','charmap','preview','anchor','searchreplace','visualblocks',
|
|
// 'powerpaste','fullscreen','formatpainter','insertdatetime','media','table','help','wordcount', 'autoresize'
|
|
// ],
|
|
// toolbar: 'undo redo | formatpainter casechange blocks | bold italic backcolor | ' +
|
|
// 'alignleft aligncenter alignright alignjustify | ' +
|
|
// 'bullist numlist checklist outdent indent | removeformat | a11ycheck code table help',
|
|
// init_instance_callback : function(editor) {
|
|
// var freeTiny = document.querySelectorAll('.tox .tox-notification--in');
|
|
// freeTiny.forEach((item) => item.style.display = 'none')
|
|
// },
|
|
// autoresize_bottom_margin: 0,
|
|
// autoresize_max_height: '100%'
|
|
// });
|
|
</script>
|