From 9bc6fffb5475f6866cf8a356abef6b4d86ba5cb0 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Fri, 26 Jul 2024 17:48:06 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB?= =?utf8?q?=D0=B8=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=B7=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/composer.json | 2 +- erp24/views/motivation/index.php | 2 +- erp24/web/js/motivation/index.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erp24/composer.json b/erp24/composer.json index 46fe76d7..b3251528 100644 --- a/erp24/composer.json +++ b/erp24/composer.json @@ -27,7 +27,7 @@ "kartik-v/yii2-widget-fileinput": "dev-master", "yiisoft/yii2-imagine": "^2.3", "kartik-v/yii2-builder": "dev-master", - "phpoffice/phpspreadsheet": "^1.12" + "phpoffice/phpspreadsheet": "^2.2" }, "require-dev": { "yiisoft/yii2-debug": "~2.1.0", diff --git a/erp24/views/motivation/index.php b/erp24/views/motivation/index.php index 626d1f19..5a91c905 100644 --- a/erp24/views/motivation/index.php +++ b/erp24/views/motivation/index.php @@ -58,7 +58,7 @@ $this->registerJsFile('/js/motivation/index.js', ['position' => \yii\web\View::P
'btn btn-success btn-sm', - 'onclick' => 'openUploadDictionary(' . (file_exists(Yii::getAlias('@uploads') . '/template_plan.xlsx') ? 'true' : 'false'). ');'])?>
+ 'onclick' => 'openUploadDictionary();'])?>
diff --git a/erp24/web/js/motivation/index.js b/erp24/web/js/motivation/index.js index bc37ef85..568d8827 100644 --- a/erp24/web/js/motivation/index.js +++ b/erp24/web/js/motivation/index.js @@ -4,7 +4,7 @@ const param10 = $("meta[name=csrf-param]").attr("content"); const token10 = $("meta[name=csrf-token]").attr("content"); /* jshint unused: false */ -function openUploadDictionary(showDownloadLink) { +function openUploadDictionary() { 'use strict' const $mainModal = $('#mainModal'); const $modalBody = $mainModal.find('.modal-body'); @@ -12,7 +12,7 @@ function openUploadDictionary(showDownloadLink) { $mainModal.find('.close').on('click', () => { $mainModal.modal('hide'); }); $mainModal.find('.modal-title').html('Загрузка плановых значений'); $modalFooter.html(''); - $modalBody.html('
' + (!showDownloadLink ? '' : '
Скачать
') + '
'); + $modalBody.html('
Скачать шаблон
'); const browse = $modalBody.find('input[type=file]').get(0); const btn = $modalBody.find('input[type=submit]').get(0); const info = $modalBody.find('#infoModal').get(0); -- 2.39.5