From 215b85972570dd89311e372654556d6796f82fae Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 18 Mar 2022 15:25:45 +0100 Subject: [PATCH] activity: hide delete button from asyncupload and add delete buttons from chill collection --- src/Bundle/ChillActivityBundle/Form/ActivityType.php | 1 + .../Resources/public/page/edit_activity/index.scss | 5 +++++ .../views/Activity/editAccompanyingCourse.html.twig | 1 + src/Bundle/ChillActivityBundle/chill.webpack.config.js | 2 ++ 4 files changed, 9 insertions(+) create mode 100644 src/Bundle/ChillActivityBundle/Resources/public/page/edit_activity/index.scss diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 6f935ad99..891eb8577 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -305,6 +305,7 @@ class ActivityType extends AbstractType 'label' => $activityType->getLabel('documents'), 'required' => $activityType->isRequired('documents'), 'allow_add' => true, + 'allow_delete' => true, 'button_add_label' => 'activity.Insert a document', 'button_remove_label' => 'activity.Remove a document', 'empty_collection_explain' => 'No documents', diff --git a/src/Bundle/ChillActivityBundle/Resources/public/page/edit_activity/index.scss b/src/Bundle/ChillActivityBundle/Resources/public/page/edit_activity/index.scss new file mode 100644 index 000000000..fc384742a --- /dev/null +++ b/src/Bundle/ChillActivityBundle/Resources/public/page/edit_activity/index.scss @@ -0,0 +1,5 @@ +div.chill-dropzone__below-zone { + a.btn-delete { + display: none; + } +} \ No newline at end of file diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig index b278c0300..d0359e223 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/editAccompanyingCourse.html.twig @@ -30,4 +30,5 @@ {{ parent() }} {{ encore_entry_link_tags('mod_async_upload') }} {{ encore_entry_link_tags('vue_activity') }} + {{ encore_entry_link_tags('page_edit_activity') }} {% endblock %} diff --git a/src/Bundle/ChillActivityBundle/chill.webpack.config.js b/src/Bundle/ChillActivityBundle/chill.webpack.config.js index f312e8a19..eec983920 100644 --- a/src/Bundle/ChillActivityBundle/chill.webpack.config.js +++ b/src/Bundle/ChillActivityBundle/chill.webpack.config.js @@ -7,5 +7,7 @@ module.exports = function(encore, entries) ChillActivityAssets: __dirname + '/Resources/public' }); + encore.addEntry('page_edit_activity', __dirname + '/Resources/public/page/edit_activity/index.scss'); + encore.addEntry('vue_activity', __dirname + '/Resources/public/vuejs/Activity/index.js'); };