From a5607fbb6b4433ce4a3e912caf6db349d8a1613c Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 18 Jan 2021 10:16:36 +0800 Subject: [PATCH 1/9] * Finish task #8988. --- module/programplan/view/create.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/programplan/view/create.html.php b/module/programplan/view/create.html.php index 800a615567..a15435a642 100644 --- a/module/programplan/view/create.html.php +++ b/module/programplan/view/create.html.php @@ -36,7 +36,7 @@
| group->name;?> | -name, "class='form-control'");?> | +name, "class='form-control'");?> | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| group->desc;?> | From 8d77e71634ac6c952d48d0ca091b4b662525aa36 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 18 Jan 2021 14:39:16 +0800 Subject: [PATCH 7/9] * Finish task #8957. --- module/custom/control.php | 1 + module/custom/js/set.js | 22 ++++++++++++++++++++++ module/custom/lang/de.php | 7 ++++--- module/custom/lang/en.php | 7 ++++--- module/custom/lang/fr.php | 7 ++++--- module/custom/lang/vi.php | 7 ++++--- module/custom/lang/zh-cn.php | 7 ++++--- module/custom/lang/zh-tw.php | 7 ++++--- module/custom/view/set.html.php | 6 ++---- 9 files changed, 49 insertions(+), 22 deletions(-) diff --git a/module/custom/control.php b/module/custom/control.php index 3161e5d2d2..2014491aab 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -94,6 +94,7 @@ class custom extends control { $data = fixer::input('post')->join('unitList', ',')->get(); if(empty($data->unitList)) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->currencyNotEmpty)); + if(empty($data->mainCurrency)) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->mainCurrencyNotEmpty)); $this->loadModel('setting')->setItems("system.$module", $data); } elseif($module == 'story' and $field == 'review') diff --git a/module/custom/js/set.js b/module/custom/js/set.js index 07c2c22a12..29772b3968 100644 --- a/module/custom/js/set.js +++ b/module/custom/js/set.js @@ -13,3 +13,25 @@ $(function() $('#' + module + 'Tab').addClass('btn-active-text'); $('#' + field + 'Tab').addClass('active'); }) + +$('[name*=unitList]').change(function() +{ + var mainCurrency = $('#mainCurrency').val(); + $('#mainCurrency').empty().append(''); + $('[name*=unitList]').each(function() + { + if($(this).prop('checked')) + { + var text = $(this).parent().html(); + var firstStr = $(this).val() + '">'; + + text = text.substring(text.lastIndexOf(firstStr) + firstStr.length, text.lastIndexOf('<')); + $('#mainCurrency').append("'); + } + }); + + $('#mainCurrency').val(mainCurrency); + $("#mainCurrency").trigger("chosen:updated"); +}); + +$('[name*=unitList]').change(); diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 3b3c536f8a..15f2910b13 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -67,9 +67,10 @@ $lang->custom->tipCostList['CV'] = 'Cost Variance(CV%)'; $lang->custom->tipRangeList[0] = 'No'; $lang->custom->tipRangeList[1] = 'Yes'; -$lang->custom->regionMustNumber = 'The interval must be a number!'; -$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; -$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->regionMustNumber = 'The interval must be a number!'; +$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; +$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->mainCurrencyNotEmpty = 'The main currency can not bu empty'; $lang->custom->numberError = 'The interval must be greater than zero!'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index e0803f82fd..f88bbfaf6f 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -67,9 +67,10 @@ $lang->custom->tipCostList['CV'] = 'Cost Variance(CV%)'; $lang->custom->tipRangeList[0] = 'No'; $lang->custom->tipRangeList[1] = 'Yes'; -$lang->custom->regionMustNumber = 'The interval must be a number!'; -$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; -$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->regionMustNumber = 'The interval must be a number!'; +$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; +$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->mainCurrencyNotEmpty = 'The main currency can not bu empty'; $lang->custom->numberError = 'The interval must be greater than zero!'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 3ed4a4ca13..1836208efa 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -67,9 +67,10 @@ $lang->custom->tipCostList['CV'] = 'Cost Variance(CV%)'; $lang->custom->tipRangeList[0] = 'No'; $lang->custom->tipRangeList[1] = 'Yes'; -$lang->custom->regionMustNumber = 'The interval must be a number!'; -$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; -$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->regionMustNumber = 'The interval must be a number!'; +$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; +$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->mainCurrencyNotEmpty = 'The main currency can not bu empty'; $lang->custom->numberError = 'The interval must be greater than zero!'; diff --git a/module/custom/lang/vi.php b/module/custom/lang/vi.php index 80bd937ed3..ca2426f9fe 100644 --- a/module/custom/lang/vi.php +++ b/module/custom/lang/vi.php @@ -67,9 +67,10 @@ $lang->custom->tipCostList['CV'] = 'Cost Variance(CV%)'; $lang->custom->tipRangeList[0] = 'No'; $lang->custom->tipRangeList[1] = 'Yes'; -$lang->custom->regionMustNumber = 'The interval must be a number!'; -$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; -$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->regionMustNumber = 'The interval must be a number!'; +$lang->custom->tipNotEmpty = 'The prompt can not be empty!'; +$lang->custom->currencyNotEmpty = 'You have to select one currency at least.'; +$lang->custom->mainCurrencyNotEmpty = 'The main currency can not bu empty'; $lang->custom->numberError = 'The interval must be greater than zero!'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 051296dc9c..fd3533323d 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -67,9 +67,10 @@ $lang->custom->tipCostList['CV'] = '成本偏差率(CV%)'; $lang->custom->tipRangeList[0] = '否'; $lang->custom->tipRangeList[1] = '是'; -$lang->custom->regionMustNumber = '区间必须是数字'; -$lang->custom->tipNotEmpty = '提示语不能为空'; -$lang->custom->currencyNotEmpty = '至少选择一种货币'; +$lang->custom->regionMustNumber = '区间必须是数字'; +$lang->custom->tipNotEmpty = '提示语不能为空'; +$lang->custom->currencyNotEmpty = '至少选择一种货币'; +$lang->custom->mainCurrencyNotEmpty = '主要货币不能为空'; $lang->custom->numberError = '区间必须大于零'; diff --git a/module/custom/lang/zh-tw.php b/module/custom/lang/zh-tw.php index 50f3dea456..2f7d281ffd 100644 --- a/module/custom/lang/zh-tw.php +++ b/module/custom/lang/zh-tw.php @@ -64,9 +64,10 @@ $lang->custom->tipCostList['CV'] = '成本偏差率(CV%)'; $lang->custom->tipRangeList[0] = '否'; $lang->custom->tipRangeList[1] = '是'; -$lang->custom->regionMustNumber = '區間必須是數字'; -$lang->custom->tipNotEmpty = '提示語不能為空'; -$lang->custom->currencyNotEmpty = '至少選擇一種貨幣'; +$lang->custom->regionMustNumber = '區間必須是數字'; +$lang->custom->tipNotEmpty = '提示語不能為空'; +$lang->custom->currencyNotEmpty = '至少選擇一種貨幣'; +$lang->custom->mainCurrencyNotEmpty = '主要貨幣不能為空'; $lang->custom->numberError = '區間必須大於零'; diff --git a/module/custom/view/set.html.php b/module/custom/view/set.html.php index ca93102386..5b439cdf05 100644 --- a/module/custom/view/set.html.php +++ b/module/custom/view/set.html.php @@ -57,16 +57,14 @@ EOT;|||||||||||||||||||
| custom->program->currencySetting;?> | +text-left'>custom->program->currencySetting;?> | |||||||
|---|---|---|---|---|---|---|---|---|
| program->unitList, $unitList);?> | +program->unitList, $unitList);?> | |||||||
| custom->program->mainCurrency;?> | program->unitList, $mainCurrency, "class='form-control chosen' required");?> | -- | ||||||
| From 9c8fb2c131a60558f7b05dd9963fcdc00d98a53b Mon Sep 17 00:00:00 2001 From: qiyu-xie | ||||||||