2018-11-06 03:55:17 +01:00
|
|
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
2018-04-22 17:45:31 +02:00
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
2018-04-22 17:45:31 +02:00
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<div class="align-middle">
|
|
|
|
<div class="float-right mt-1">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
|
|
|
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
|
|
|
</div>
|
|
|
|
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); ?>
|
|
|
|
</div>
|
2018-04-22 17:45:31 +02:00
|
|
|
|
|
|
|
<!-- TABS -->
|
2018-11-06 03:55:17 +01:00
|
|
|
<nav class="mb-3">
|
|
|
|
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
|
|
|
<a class="nav-item nav-link active" id="nav-general-tab" data-toggle="tab" href="#general" role="tab" aria-controls="nav-general" aria-selected="false"><?php $L->p('General') ?></a>
|
|
|
|
<a class="nav-item nav-link" id="nav-advanced-tab" data-toggle="tab" href="#advanced" role="tab" aria-controls="nav-advanced" aria-selected="false"><?php $L->p('Advanced') ?></a>
|
|
|
|
<a class="nav-item nav-link" id="nav-seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="nav-seo" aria-selected="false"><?php $L->p('SEO') ?></a>
|
|
|
|
<a class="nav-item nav-link" id="nav-social-tab" data-toggle="tab" href="#social" role="tab" aria-controls="nav-social" aria-selected="false"><?php $L->p('Social Networks') ?></a>
|
2018-11-25 17:52:22 +01:00
|
|
|
<a class="nav-item nav-link" id="nav-images-tab" data-toggle="tab" href="#images" role="tab" aria-controls="nav-images" aria-selected="false"><?php $L->p('Images') ?></a>
|
2018-11-06 03:55:17 +01:00
|
|
|
<a class="nav-item nav-link" id="nav-language-tab" data-toggle="tab" href="#language" role="tab" aria-controls="nav-language" aria-selected="false"><?php $L->p('Language') ?></a>
|
2019-09-02 18:24:34 +02:00
|
|
|
<a class="nav-item nav-link" id="nav-custom-fields-tab" data-toggle="tab" href="#custom-fields" role="tab" aria-controls="nav-custom-fields" aria-selected="false"><?php $L->p('Custom fields') ?></a>
|
|
|
|
<a class="nav-item nav-link" id="nav-logo-tab" data-toggle="tab" href="#logo" role="tab" aria-controls="nav-logo" aria-selected="false"><?php $L->p('Logo') ?></a>
|
2018-11-06 03:55:17 +01:00
|
|
|
</div>
|
|
|
|
</nav>
|
2018-04-27 20:36:43 +02:00
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<?php
|
2018-04-27 20:36:43 +02:00
|
|
|
// Token CSRF
|
|
|
|
echo Bootstrap::formInputHidden(array(
|
|
|
|
'name'=>'tokenCSRF',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$security->getTokenCSRF()
|
2018-04-27 20:36:43 +02:00
|
|
|
));
|
2018-08-05 18:04:38 +02:00
|
|
|
|
2019-01-15 19:30:35 +01:00
|
|
|
// Page not found
|
|
|
|
echo Bootstrap::formInputHidden(array(
|
|
|
|
'name'=>'pageNotFound',
|
|
|
|
'value'=>$site->pageNotFound()
|
|
|
|
));
|
2018-04-27 20:36:43 +02:00
|
|
|
?>
|
2018-04-22 17:45:31 +02:00
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<!-- General tab -->
|
2018-04-22 17:45:31 +02:00
|
|
|
<div class="tab-pane show active" id="general" role="tabpanel" aria-labelledby="general-tab">
|
2019-09-23 23:04:34 +02:00
|
|
|
|
2018-04-22 17:45:31 +02:00
|
|
|
<?php
|
2018-11-06 03:55:17 +01:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Site')));
|
|
|
|
|
2018-04-22 17:45:31 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'title',
|
|
|
|
'label'=>$L->g('Site title'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->title(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('use-this-field-to-name-your-site')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'slogan',
|
|
|
|
'label'=>$L->g('Site slogan'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->slogan(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('use-this-field-to-add-a-catchy-phrase')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'description',
|
|
|
|
'label'=>$L->g('Site description'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->description(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('you-can-add-a-site-description-to-provide')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'footer',
|
|
|
|
'label'=>$L->g('Footer text'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->footer(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('you-can-add-a-small-text-on-the-bottom')
|
|
|
|
));
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<!-- Advanced tab -->
|
2018-04-22 17:45:31 +02:00
|
|
|
<div class="tab-pane" id="advanced" role="tabpanel" aria-labelledby="advanced-tab">
|
|
|
|
<?php
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Content')));
|
|
|
|
|
|
|
|
echo Bootstrap::formSelect(array(
|
|
|
|
'name'=>'itemsPerPage',
|
|
|
|
'label'=>$L->g('Items per page'),
|
|
|
|
'options'=>array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8', '-1'=>$L->g('All content')),
|
2018-07-17 19:13:01 +02:00
|
|
|
'selected'=>$site->itemsPerPage(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'tip'=>$L->g('Number of items to show per page')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formSelect(array(
|
|
|
|
'name'=>'orderBy',
|
|
|
|
'label'=>$L->g('Order content by'),
|
|
|
|
'options'=>array('date'=>$L->g('Date'),'position'=>$L->g('Position')),
|
2018-07-17 19:13:01 +02:00
|
|
|
'selected'=>$site->orderBy(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'tip'=>$L->g('order-the-content-by-date-to-build-a-blog')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Predefined pages')));
|
|
|
|
|
2018-08-05 18:04:38 +02:00
|
|
|
// Homepage
|
|
|
|
try {
|
|
|
|
$homeKey = $site->homepage();
|
|
|
|
$home = new Page($homeKey);
|
|
|
|
$homeValue = $home->title();
|
|
|
|
} catch (Exception $e) {
|
|
|
|
$homeValue = '';
|
|
|
|
}
|
2019-09-23 23:04:34 +02:00
|
|
|
|
|
|
|
echo Bootstrap::formSelect(array(
|
|
|
|
'name'=>'homepage',
|
2018-04-22 17:45:31 +02:00
|
|
|
'label'=>$L->g('Homepage'),
|
2019-09-23 23:04:34 +02:00
|
|
|
'options'=>array(''=>''),
|
|
|
|
'selected'=>false,
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
2018-08-05 18:04:38 +02:00
|
|
|
'placeholder'=>$L->g('Start typing a page title to see a list of suggestions.'),
|
2018-04-22 17:45:31 +02:00
|
|
|
'tip'=>$L->g('Returning page for the main page')
|
|
|
|
));
|
|
|
|
|
2019-01-15 19:30:35 +01:00
|
|
|
// Page not found 404
|
|
|
|
try {
|
|
|
|
$pageNotFoundKey = $site->pageNotFound();
|
|
|
|
$pageNotFound = new Page($pageNotFoundKey);
|
|
|
|
$pageNotFoundValue = $pageNotFound->title();
|
|
|
|
} catch (Exception $e) {
|
|
|
|
$pageNotFoundValue = '';
|
|
|
|
}
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'pageNotFoundTMP',
|
2018-04-22 17:45:31 +02:00
|
|
|
'label'=>$L->g('Page not found'),
|
2019-01-15 19:30:35 +01:00
|
|
|
'value'=>$pageNotFoundValue,
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
2019-01-15 19:30:35 +01:00
|
|
|
'placeholder'=>$L->g('Start typing a page title to see a list of suggestions.'),
|
2018-04-22 17:45:31 +02:00
|
|
|
'tip'=>$L->g('Returning page when the page doesnt exist')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Email account settings')));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'emailFrom',
|
|
|
|
'label'=>$L->g('Sender email'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->emailFrom(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('Emails will be sent from this address')
|
|
|
|
));
|
|
|
|
|
2018-07-07 12:04:34 +02:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Autosave')));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'autosaveInterval',
|
|
|
|
'label'=>$L->g('Interval'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->autosaveInterval(),
|
2018-07-07 12:04:34 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('Number in minutes for every execution of autosave')
|
|
|
|
));
|
|
|
|
|
2018-04-22 17:45:31 +02:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Site URL')));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'url',
|
2018-04-27 20:36:43 +02:00
|
|
|
'label'=>'URL',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->url(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('full-url-of-your-site'),
|
|
|
|
'placeholder'=>'https://'
|
|
|
|
));
|
|
|
|
|
2019-03-09 18:53:03 +01:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Page content')));
|
|
|
|
|
|
|
|
echo Bootstrap::formSelect(array(
|
|
|
|
'name'=>'markdownParser',
|
|
|
|
'label'=>$L->g('Markdown parser'),
|
|
|
|
'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
|
|
|
|
'selected'=>($site->markdownParser()?'true':'false'),
|
|
|
|
'class'=>'',
|
|
|
|
'tip'=>$L->g('Enable the markdown parser for the content of the page.')
|
|
|
|
));
|
|
|
|
|
2018-07-28 21:00:12 +02:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('URL Filters')));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'uriPage',
|
|
|
|
'label'=>$L->g('Pages'),
|
|
|
|
'value'=>$site->uriFilters('page'),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>DOMAIN_PAGES
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'uriTag',
|
|
|
|
'label'=>$L->g('Tags'),
|
|
|
|
'value'=>$site->uriFilters('tag'),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>DOMAIN_TAGS
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'uriCategory',
|
|
|
|
'label'=>$L->g('Category'),
|
|
|
|
'value'=>$site->uriFilters('category'),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>DOMAIN_CATEGORIES
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'uriBlog',
|
|
|
|
'label'=>$L->g('Blog'),
|
|
|
|
'value'=>$site->uriFilters('blog'),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>DOMAIN.$site->uriFilters('blog'),
|
2018-08-27 22:19:42 +02:00
|
|
|
'disabled'=>Text::isEmpty($site->uriFilters('blog'))
|
2018-07-28 21:00:12 +02:00
|
|
|
));
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<!-- SEO tab -->
|
2018-07-28 21:00:12 +02:00
|
|
|
<div class="tab-pane" id="seo" role="tabpanel" aria-labelledby="seo-tab">
|
|
|
|
<?php
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Extreme friendly URL')));
|
|
|
|
|
2018-04-22 17:45:31 +02:00
|
|
|
echo Bootstrap::formSelect(array(
|
|
|
|
'name'=>'extremeFriendly',
|
2018-08-05 17:54:20 +02:00
|
|
|
'label'=>$L->g('Allow Unicode'),
|
|
|
|
'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
|
2018-07-28 21:00:12 +02:00
|
|
|
'selected'=>($site->extremeFriendly()?'true':'false'),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
2018-08-05 17:54:20 +02:00
|
|
|
'tip'=>$L->g('Allow unicode characters in the URL and some part of the system.')
|
2018-04-22 17:45:31 +02:00
|
|
|
));
|
|
|
|
|
2018-07-13 18:30:42 +02:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Title formats')));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'titleFormatHomepage',
|
2018-08-05 17:54:20 +02:00
|
|
|
'label'=>$L->g('Homepage'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->titleFormatHomepage(),
|
2018-07-13 18:30:42 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-08-05 17:54:20 +02:00
|
|
|
'tip'=>$L->g('Variables allowed').' <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
2018-07-13 18:30:42 +02:00
|
|
|
'placeholder'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'titleFormatPages',
|
2018-08-05 17:54:20 +02:00
|
|
|
'label'=>$L->g('Pages'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->titleFormatPages(),
|
2018-07-13 18:30:42 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-08-05 17:54:20 +02:00
|
|
|
'tip'=>$L->g('Variables allowed').' <code>{{page-title}}</code> <code>{{page-description}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
2018-07-13 18:30:42 +02:00
|
|
|
'placeholder'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'titleFormatCategory',
|
2018-08-05 17:54:20 +02:00
|
|
|
'label'=>$L->g('Category'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->titleFormatCategory(),
|
2018-07-13 18:30:42 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-08-05 17:54:20 +02:00
|
|
|
'tip'=>$L->g('Variables allowed').' <code>{{category-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
2018-07-13 18:30:42 +02:00
|
|
|
'placeholder'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'titleFormatTag',
|
2018-08-05 17:54:20 +02:00
|
|
|
'label'=>$L->g('Tag'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->titleFormatTag(),
|
2018-07-13 18:30:42 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-08-05 17:54:20 +02:00
|
|
|
'tip'=>$L->g('Variables allowed').' <code>{{tag-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
2018-07-13 18:30:42 +02:00
|
|
|
'placeholder'=>''
|
|
|
|
));
|
2018-04-22 17:45:31 +02:00
|
|
|
?>
|
|
|
|
</div>
|
2018-11-06 03:55:17 +01:00
|
|
|
|
|
|
|
<!-- Social Network tab -->
|
2018-04-22 17:45:31 +02:00
|
|
|
<div class="tab-pane" id="social" role="tabpanel" aria-labelledby="social-tab">
|
|
|
|
<?php
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'twitter',
|
|
|
|
'label'=>'Twitter',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->twitter(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'facebook',
|
|
|
|
'label'=>'Facebook',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->facebook(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'codepen',
|
2018-09-15 22:52:09 +02:00
|
|
|
'label'=>'CodePen',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->codepen(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'instagram',
|
|
|
|
'label'=>'Instagram',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->instagram(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2018-06-24 13:37:45 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'gitlab',
|
2018-09-15 22:52:09 +02:00
|
|
|
'label'=>'GitLab',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->gitlab(),
|
2018-06-24 13:37:45 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
2018-04-22 17:45:31 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'github',
|
2018-09-15 22:52:09 +02:00
|
|
|
'label'=>'GitHub',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->github(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'linkedin',
|
2018-09-15 22:52:09 +02:00
|
|
|
'label'=>'LinkedIn',
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->linkedin(),
|
2018-04-22 17:45:31 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
2018-04-27 20:36:43 +02:00
|
|
|
|
2018-09-10 22:04:24 +02:00
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'mastodon',
|
|
|
|
'label'=>'Mastodon',
|
|
|
|
'value'=>$site->mastodon(),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
2019-09-02 18:24:34 +02:00
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'dribbble',
|
|
|
|
'label'=>'Dribbble',
|
|
|
|
'value'=>$site->dribbble(),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>''
|
|
|
|
));
|
2018-04-22 17:45:31 +02:00
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
2018-11-25 17:52:22 +01:00
|
|
|
<!-- Images tab -->
|
|
|
|
<div class="tab-pane" id="images" role="tabpanel" aria-labelledby="images-tab">
|
|
|
|
<?php
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Thumbnails')));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'thumbnailWidth',
|
|
|
|
'label'=>$L->g('Width'),
|
|
|
|
'value'=>$site->thumbnailWidth(),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-11-27 20:58:47 +01:00
|
|
|
'tip'=>$L->g('Thumbnail width in pixels')
|
2018-11-25 17:52:22 +01:00
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'thumbnailHeight',
|
|
|
|
'label'=>$L->g('Height'),
|
|
|
|
'value'=>$site->thumbnailHeight(),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-11-27 20:58:47 +01:00
|
|
|
'tip'=>$L->g('Thumbnail height in pixels')
|
2018-11-25 17:52:22 +01:00
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'thumbnailQuality',
|
|
|
|
'label'=>$L->g('Quality'),
|
|
|
|
'value'=>$site->thumbnailQuality(),
|
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-11-27 20:58:47 +01:00
|
|
|
'tip'=>$L->g('Thumbnail quality in percentage')
|
2018-11-25 17:52:22 +01:00
|
|
|
));
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<!-- Timezone and language tab -->
|
2018-04-22 17:45:31 +02:00
|
|
|
<div class="tab-pane" id="language" role="tabpanel" aria-labelledby="language-tab">
|
2018-04-27 20:36:43 +02:00
|
|
|
<?php
|
2018-11-06 03:55:17 +01:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Language and timezone')));
|
2018-04-27 20:36:43 +02:00
|
|
|
|
|
|
|
echo Bootstrap::formSelect(array(
|
|
|
|
'name'=>'language',
|
|
|
|
'label'=>$L->g('Language'),
|
2018-08-05 17:54:20 +02:00
|
|
|
'options'=>$L->getLanguageList(),
|
2018-07-17 19:13:01 +02:00
|
|
|
'selected'=>$site->language(),
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'tip'=>$L->g('select-your-sites-language')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formSelect(array(
|
|
|
|
'name'=>'timezone',
|
|
|
|
'label'=>$L->g('Timezone'),
|
|
|
|
'options'=>Date::timezoneList(),
|
2018-07-17 19:13:01 +02:00
|
|
|
'selected'=>$site->timezone(),
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'tip'=>$L->g('select-a-timezone-for-a-correct')
|
|
|
|
));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'locale',
|
|
|
|
'label'=>$L->g('Locale'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->locale(),
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
|
|
|
'tip'=>$L->g('with-the-locales-you-can-set-the-regional-user-interface')
|
|
|
|
));
|
2018-04-22 17:45:31 +02:00
|
|
|
|
2018-04-27 20:36:43 +02:00
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Date and time formats')));
|
|
|
|
|
|
|
|
echo Bootstrap::formInputText(array(
|
|
|
|
'name'=>'dateFormat',
|
|
|
|
'label'=>$L->g('Date format'),
|
2018-07-17 19:13:01 +02:00
|
|
|
'value'=>$site->dateFormat(),
|
2018-04-27 20:36:43 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2018-07-17 19:13:01 +02:00
|
|
|
'tip'=>$L->g('Current format').': '.Date::current($site->dateFormat())
|
2018-04-27 20:36:43 +02:00
|
|
|
));
|
|
|
|
?>
|
2018-04-22 17:45:31 +02:00
|
|
|
</div>
|
2018-05-14 00:00:10 +02:00
|
|
|
|
2019-09-02 18:24:34 +02:00
|
|
|
<!-- Custom fields -->
|
|
|
|
<div class="tab-pane" id="custom-fields" role="tabpanel" aria-labelledby="custom-fields-tab">
|
|
|
|
<?php
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Custom fields')));
|
|
|
|
|
|
|
|
echo Bootstrap::formTextarea(array(
|
|
|
|
'name'=>'customFields',
|
2019-09-23 23:04:34 +02:00
|
|
|
'label'=>'JSON Format',
|
2019-09-03 18:35:30 +02:00
|
|
|
'value'=>json_encode($site->customFields(), JSON_PRETTY_PRINT),
|
2019-09-02 18:24:34 +02:00
|
|
|
'class'=>'',
|
|
|
|
'placeholder'=>'',
|
2019-09-23 23:04:34 +02:00
|
|
|
'tip'=>$L->g('define-custom-fields-for-the-content'),
|
2019-09-02 18:24:34 +02:00
|
|
|
'rows'=>15
|
|
|
|
));
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
|
2018-12-21 19:45:53 +01:00
|
|
|
<!-- Site logo tab -->
|
|
|
|
<div class="tab-pane" id="logo" role="tabpanel" aria-labelledby="logo-tab">
|
2018-12-21 19:50:18 +01:00
|
|
|
<?php
|
|
|
|
echo Bootstrap::formTitle(array('title'=>$L->g('Site logo')));
|
|
|
|
?>
|
2019-05-10 11:35:46 +02:00
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-4 col-sm-12 p-0 pr-2">
|
|
|
|
<div class="custom-file">
|
|
|
|
<input id="jssiteLogoInputFile" class="custom-file-input" type="file" name="inputFile">
|
|
|
|
<label for="jssiteLogoInputFile" class="custom-file-label"><?php $L->p('Upload image'); ?></label>
|
|
|
|
</div>
|
2019-05-24 19:25:00 +02:00
|
|
|
<button id="jsbuttonRemoveLogo" type="button" class="btn btn-primary w-100 mt-4 mb-4"><i class="fa fa-trash"></i><?php $L->p('Remove logo') ?></button>
|
2019-05-10 11:35:46 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-lg-8 col-sm-12 p-0 text-center">
|
|
|
|
<img id="jssiteLogoPreview" class="img-fluid img-thumbnail" alt="Site logo preview" src="<?php echo ($site->logo()?DOMAIN_UPLOADS.$site->logo(false).'?version='.time():HTML_PATH_CORE_IMG.'default.svg') ?>" />
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-12-21 19:45:53 +01:00
|
|
|
</div>
|
|
|
|
<script>
|
2019-05-10 11:35:46 +02:00
|
|
|
$("#jsbuttonRemoveLogo").on("click", function() {
|
|
|
|
bluditAjax.removeLogo();
|
|
|
|
$("#jssiteLogoPreview").attr("src", "<?php echo HTML_PATH_CORE_IMG.'default.svg' ?>");
|
|
|
|
});
|
|
|
|
|
2018-12-21 19:45:53 +01:00
|
|
|
$("#jssiteLogoInputFile").on("change", function() {
|
|
|
|
var formData = new FormData();
|
|
|
|
formData.append('tokenCSRF', tokenCSRF);
|
|
|
|
formData.append('inputFile', $(this)[0].files[0]);
|
|
|
|
$.ajax({
|
2019-05-10 20:02:24 +02:00
|
|
|
url: HTML_PATH_ADMIN_ROOT+"ajax/logo-upload",
|
2018-12-21 19:45:53 +01:00
|
|
|
type: "POST",
|
|
|
|
data: formData,
|
|
|
|
cache: false,
|
|
|
|
contentType: false,
|
|
|
|
processData: false
|
2019-09-09 19:29:35 +02:00
|
|
|
}).done(function(data) {
|
|
|
|
console.log(data);
|
|
|
|
if (data.status==0) {
|
|
|
|
$("#jssiteLogoPreview").attr('src',data.absoluteURL+"?time="+Math.random());
|
|
|
|
} else {
|
|
|
|
showAlert(data.message);
|
|
|
|
}
|
2018-12-21 19:45:53 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</div>
|
|
|
|
|
2018-11-06 03:55:17 +01:00
|
|
|
<?php echo Bootstrap::formClose(); ?>
|
2019-01-15 19:30:35 +01:00
|
|
|
|
|
|
|
<script>
|
2019-09-23 23:04:34 +02:00
|
|
|
// Open current tab after refresh page
|
|
|
|
$(function() {
|
|
|
|
$('a[data-toggle="tab"]').on('click', function(e) {
|
|
|
|
window.localStorage.setItem('activeTab', $(e.target).attr('href'));
|
|
|
|
console.log($(e.target).attr('href'));
|
|
|
|
});
|
|
|
|
var activeTab = window.localStorage.getItem('activeTab');
|
|
|
|
if (activeTab) {
|
|
|
|
$('#nav-tab a[href="' + activeTab + '"]').tab('show');
|
|
|
|
window.localStorage.removeItem("activeTab");
|
|
|
|
}
|
|
|
|
});
|
2019-01-15 19:30:35 +01:00
|
|
|
</script>
|