diff --git a/frontend/views/layouts/admin.php b/frontend/views/layouts/admin.php
index 1789928..ca3b3fb 100755
--- a/frontend/views/layouts/admin.php
+++ b/frontend/views/layouts/admin.php
@@ -1,13 +1,16 @@
beginContent('@app/views/layouts/main.php');
?>
-
@@ -48,28 +51,34 @@ $this->beginContent('@app/views/layouts/main.php');
[
'label' => 'Команда',
'url' => ['accounts/team'],
+ 'active' => preg_match('/^team.*$/', $this->context->action->id)?true:false,
],
[
'label' => 'Вакансии',
'url' => ['accounts/vacancy'],
+ 'active' => preg_match('/^vacancy.*$/', $this->context->action->id)?true:false,
],
[
'label' => 'Ваши проекты',
'url' => ['accounts/projects'],
+ 'active' => preg_match('/^projects.*$/', $this->context->action->id)?true:false,
],
[
'label' => 'Портфолио',
'url' => ['accounts/portfolio'],
+ 'active' => preg_match('/^portfolio.*$/', $this->context->action->id)?true:false,
],
[
'label' => 'Блог',
'url' => ['accounts/blog'],
+ 'active' => preg_match('/^blog.*$/', $this->context->action->id)?true:false,
],
[
'label' => 'Галерея Изображения',
'url' => ['accounts/gallery'],
+ 'active' => preg_match('/^gallery(?!-video).*$/', $this->context->action->id)?true:false,
],
[
'label' => 'Галерея Видео',
diff --git a/frontend/web/js/fieldWidget.js b/frontend/web/js/fieldWidget.js
index 83d2067..3d860ef 100755
--- a/frontend/web/js/fieldWidget.js
+++ b/frontend/web/js/fieldWidget.js
@@ -1,5 +1,11 @@
$(function(){
-
+ $.each($('.delete-field-item'), function(index, value) {
+ var container = $(value).parents('.field_list').first();
+ var count = $(container).find('.form-group').length;
+ if(count <= 1) {
+ $(container).find('.delete-field-item').addClass('hidden');
+ }
+ });
$(document).on('click', '.delete-field-item', function(){
var container = $(this).parents('.field_list').first();
$(this).parent('.form-group').remove();
--
libgit2 0.21.4