mirror of
https://github.com/flextype/flextype.git
synced 2025-08-23 21:33:01 +02:00
@@ -88,12 +88,12 @@ class SettingsController extends Controller
|
||||
'whoops_editor' => $whoops_editor,
|
||||
'menu_item' => 'settings',
|
||||
'links' => [
|
||||
'settings' => [
|
||||
'link' => $this->router->pathFor('admin.settings.index'),
|
||||
'title' => __('admin_settings'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
],
|
||||
'settings' => [
|
||||
'link' => $this->router->pathFor('admin.settings.index'),
|
||||
'title' => __('admin_settings'),
|
||||
'attributes' => ['class' => 'navbar-item active']
|
||||
]
|
||||
],
|
||||
'buttons' => [
|
||||
'save' => [
|
||||
'link' => 'javascript:;',
|
||||
@@ -123,6 +123,10 @@ class SettingsController extends Controller
|
||||
|
||||
Arr::set($data, 'errors.display', ($data['errors']['display'] == '1' ? true : false));
|
||||
Arr::set($data, 'cache.enabled', ($data['cache']['enabled'] == '1' ? true : false));
|
||||
Arr::set($data, 'slugify.lowercase_after_regexp', ($data['slugify']['lowercase_after_regexp'] == '1' ? true : false));
|
||||
Arr::set($data, 'slugify.strip_tags', ($data['slugify']['strip_tags'] == '1' ? true : false));
|
||||
Arr::set($data, 'slugify.trim', ($data['slugify']['trim'] == '1' ? true : false));
|
||||
Arr::set($data, 'slugify.lowercase', ($data['slugify']['lowercase'] == '1' ? true : false));
|
||||
Arr::set($data, 'cache.lifetime', (int) $data['cache']['lifetime']);
|
||||
Arr::set($data, 'entries.media.upload_images_quality', (int) $data['entries']['media']['upload_images_quality']);
|
||||
Arr::set($data, 'entries.media.upload_images_width', (int) $data['entries']['media']['upload_images_width']);
|
||||
@@ -137,20 +141,4 @@ class SettingsController extends Controller
|
||||
return $response->withRedirect($this->router->pathFor('admin.settings.index'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear cache process
|
||||
*
|
||||
* @param Request $request PSR7 request
|
||||
* @param Response $response PSR7 response
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function clearCacheProcess(/** @scrutinizer ignore-unused */ Request $request, Response $response) : Response
|
||||
{
|
||||
$this->cache->clear();
|
||||
Filesystem::has(PATH['cache'] . '/twig') and Filesystem::deleteDir(PATH['cache'] . '/twig');
|
||||
|
||||
$this->flash->addMessage('success', __('admin_message_cache_files_deleted'));
|
||||
return $response->withRedirect($this->router->pathFor('admin.settings.index'));
|
||||
}
|
||||
}
|
||||
|
@@ -232,5 +232,6 @@
|
||||
"admin_active_theme": "Active Theme",
|
||||
"admin_get_more_themes": "Get More Themes",
|
||||
"admin_images": "Images",
|
||||
"admin_data": "Data"
|
||||
"admin_data": "Data",
|
||||
"admin_slugify": "Slug"
|
||||
}
|
||||
|
@@ -341,6 +341,61 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<br>
|
||||
<h3 class="h3">{{ tr('admin_slug') }}</h3>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="slugify[separator]">{{ tr('admin_slugify_separator') }}</label>
|
||||
<input type="text" id="systemSettingsSlugifySeparator" name="slugify[separator]" value="{{ registry.settings.slugify.separator }}" class="form-control" required="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="slugify[lowercase]">{{ tr('admin_slugify_lowercase') }}</label>
|
||||
<select id="systemSettingsSlugifyLowercase" name="slugify[lowercase]" class="form-control" required="required">
|
||||
<option value="0" {% if registry.settings.slugify.lowercase == 0 %}selected{% endif %}>{{ tr('admin_disabled') }}</option>
|
||||
<option value="1" {% if registry.settings.slugify.lowercase == 1 %}selected{% endif %}>{{ tr('admin_enabled') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="slugify[trim]">{{ tr('admin_slugify_trim') }}</label>
|
||||
<select id="systemSettingsSlugifyTrim" name="slugify[trim]" class="form-control" required="required">
|
||||
<option value="0" {% if registry.settings.slugify.trim == 0 %}selected{% endif %}>{{ tr('admin_disabled') }}</option>
|
||||
<option value="1" {% if registry.settings.slugify.trim == 1 %}selected{% endif %}>{{ tr('admin_enabled') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="slugify[strip_tags]">{{ tr('admin_slugify_strip_tags') }}</label>
|
||||
<select id="systemSettingsSlugifyStripTags" name="slugify[strip_tags]" class="form-control" required="required">
|
||||
<option value="0" {% if registry.settings.slugify.strip_tags == 0 %}selected{% endif %}>{{ tr('admin_disabled') }}</option>
|
||||
<option value="1" {% if registry.settings.slugify.strip_tags == 1 %}selected{% endif %}>{{ tr('admin_enabled') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="slugify[lowercase_after_regexp]">{{ tr('admin_slugify_lowercase_after_regexp') }}</label>
|
||||
<select id="systemSettingsSlugifyLowercaseAfterRegexp" name="slugify[lowercase_after_regexp]" class="form-control" required="required">
|
||||
<option value="0" {% if registry.settings.slugify.lowercase_after_regexp == 0 %}selected{% endif %}>{{ tr('admin_disabled') }}</option>
|
||||
<option value="1" {% if registry.settings.slugify.lowercase_after_regexp == 1 %}selected{% endif %}>{{ tr('admin_enabled') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="slugify[regexp]">{{ tr('admin_slugify_regexp') }}</label>
|
||||
<input type="text" id="systemSettingsSlugifyRegexp" name="slugify[regexp]" value="{{ registry.settings.slugify.regexp }}" class="form-control" required="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<br>
|
||||
<h3 class="h3">{{ tr('admin_admin_panel') }}</h3>
|
||||
|
Reference in New Issue
Block a user