mirror of
https://github.com/flextype/flextype.git
synced 2025-08-17 02:24:05 +02:00
feat(admin-panel): add RTL url support #62
This commit is contained in:
@@ -214,7 +214,11 @@ class EntriesController extends Controller
|
||||
}
|
||||
|
||||
// Set new Entry ID
|
||||
$id = $parent_entry_id . '/' . $this->slugify->slugify($data['id']);
|
||||
if ($this->registry->get('plugins.admin.entries.slugify') == true) {
|
||||
$id = $parent_entry_id . '/' . $this->slugify->slugify($data['id']);
|
||||
} else {
|
||||
$id = $parent_entry_id . '/' . $data['id'];
|
||||
}
|
||||
|
||||
// Check if entry exists then try to create
|
||||
if (!$this->entries->has($id)) {
|
||||
|
@@ -7,6 +7,7 @@ route: admin
|
||||
# entries settings
|
||||
entries:
|
||||
items_view_default: list
|
||||
slugify: true
|
||||
media:
|
||||
upload_images_quality: 70
|
||||
upload_images_width: 1600
|
||||
|
@@ -1,6 +1,13 @@
|
||||
<script>
|
||||
$("#title").on("keyup change", function () {
|
||||
var slug = getSlug($("#title").val());
|
||||
$("#id").val(slug);
|
||||
});
|
||||
{% if (registry.plugins.admin.entries.slugify == false) and (is_current_path('admin.entries.add') or is_current_path('admin.entries.rename')) %}
|
||||
$("#title").on("keyup change", function () {
|
||||
var slug = $("#title").val();
|
||||
$("#id").val(slug);
|
||||
});
|
||||
{% else %}
|
||||
$("#title").on("keyup change", function () {
|
||||
var slug = getSlug($("#title").val());
|
||||
$("#id").val(slug);
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
Reference in New Issue
Block a user