summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-05-26 12:54:14 +0300
committerLauri Ojansivu <x@xet7.org>2020-05-26 12:54:14 +0300
commit3e4a9471ba23ce6f4b4db586c0134c9c3d5e112c (patch)
tree141cde05c80af66d6f483a8d2946fe3674742505
parent351d9d0c9577c9d543d543bc12a51388b0141324 (diff)
parent9b68aa919a9a796da6b938d0ad1725ea18ff2cdc (diff)
downloadwekan-3e4a9471ba23ce6f4b4db586c0134c9c3d5e112c.tar.gz
wekan-3e4a9471ba23ce6f4b4db586c0134c9c3d5e112c.tar.bz2
wekan-3e4a9471ba23ce6f4b4db586c0134c9c3d5e112c.zip
Merge branch 'habenamare-currency-custom-field'
-rw-r--r--client/components/cards/cardCustomFields.jade17
-rw-r--r--client/components/cards/cardCustomFields.js30
-rw-r--r--client/components/cards/minicard.jade8
-rw-r--r--client/components/cards/minicard.js14
-rw-r--r--client/components/sidebar/sidebarCustomFields.jade11
-rw-r--r--client/components/sidebar/sidebarCustomFields.js73
-rw-r--r--i18n/ar.i18n.json2
-rw-r--r--i18n/bg.i18n.json2
-rw-r--r--i18n/br.i18n.json2
-rw-r--r--i18n/ca.i18n.json2
-rw-r--r--i18n/cs.i18n.json2
-rw-r--r--i18n/da.i18n.json2
-rw-r--r--i18n/de.i18n.json2
-rw-r--r--i18n/el.i18n.json2
-rw-r--r--i18n/en-GB.i18n.json2
-rw-r--r--i18n/en.i18n.json2
-rw-r--r--i18n/eo.i18n.json2
-rw-r--r--i18n/es-AR.i18n.json2
-rw-r--r--i18n/es-CL.i18n.json2
-rw-r--r--i18n/es.i18n.json2
-rw-r--r--i18n/eu.i18n.json2
-rw-r--r--i18n/fa.i18n.json2
-rw-r--r--i18n/fi.i18n.json2
-rw-r--r--i18n/fr.i18n.json2
-rw-r--r--i18n/gl.i18n.json2
-rw-r--r--i18n/he.i18n.json2
-rw-r--r--i18n/hi.i18n.json2
-rw-r--r--i18n/hu.i18n.json2
-rw-r--r--i18n/hy.i18n.json2
-rw-r--r--i18n/id.i18n.json2
-rw-r--r--i18n/ig.i18n.json2
-rw-r--r--i18n/it.i18n.json2
-rw-r--r--i18n/ja.i18n.json2
-rw-r--r--i18n/ka.i18n.json2
-rw-r--r--i18n/km.i18n.json2
-rw-r--r--i18n/ko.i18n.json2
-rw-r--r--i18n/lv.i18n.json2
-rw-r--r--i18n/mk.i18n.json2
-rw-r--r--i18n/mn.i18n.json2
-rw-r--r--i18n/nb.i18n.json2
-rw-r--r--i18n/nl.i18n.json2
-rw-r--r--i18n/oc.i18n.json2
-rw-r--r--i18n/pl.i18n.json2
-rw-r--r--i18n/pt-BR.i18n.json2
-rw-r--r--i18n/pt.i18n.json2
-rw-r--r--i18n/ro.i18n.json2
-rw-r--r--i18n/ru.i18n.json2
-rw-r--r--i18n/sl.i18n.json2
-rw-r--r--i18n/sr.i18n.json2
-rw-r--r--i18n/sv.i18n.json2
-rw-r--r--i18n/sw.i18n.json2
-rw-r--r--i18n/ta.i18n.json2
-rw-r--r--i18n/th.i18n.json2
-rw-r--r--i18n/tr.i18n.json2
-rw-r--r--i18n/uk.i18n.json2
-rw-r--r--i18n/vi.i18n.json2
-rw-r--r--i18n/zh-CN.i18n.json2
-rw-r--r--i18n/zh-HK.i18n.json2
-rw-r--r--i18n/zh-TW.i18n.json2
-rw-r--r--models/customFields.js6
60 files changed, 261 insertions, 4 deletions
diff --git a/client/components/cards/cardCustomFields.jade b/client/components/cards/cardCustomFields.jade
index 0a4d26e5..c0e14d08 100644
--- a/client/components/cards/cardCustomFields.jade
+++ b/client/components/cards/cardCustomFields.jade
@@ -53,6 +53,23 @@ template(name="cardCustomField-number")
if value
= value
+template(name="cardCustomField-currency")
+ if canModifyCard
+ +inlinedForm(classNames="js-card-customfield-currency")
+ input(type="text" value=data.value)
+ .edit-controls.clearfix
+ button.primary(type="submit") {{_ 'save'}}
+ a.fa.fa-times-thin.js-close-inlined-form
+ else
+ a.js-open-inlined-form
+ if value
+ = formattedValue
+ else
+ | {{_ 'edit'}}
+ else
+ if value
+ = formattedValue
+
template(name="cardCustomField-date")
if canModifyCard
a.js-edit-date(title="{{showTitle}}" class="{{classes}}")
diff --git a/client/components/cards/cardCustomFields.js b/client/components/cards/cardCustomFields.js
index d0b9c72d..45f20762 100644
--- a/client/components/cards/cardCustomFields.js
+++ b/client/components/cards/cardCustomFields.js
@@ -80,6 +80,36 @@ CardCustomField.register('cardCustomField');
}
}.register('cardCustomField-number'));
+// cardCustomField-currency
+(class extends CardCustomField {
+ onCreated() {
+ super.onCreated();
+
+ this.currencyCode = this.data().definition.settings.currencyCode;
+ }
+
+ formattedValue() {
+ const locale = TAPi18n.getLanguage();
+
+ return new Intl.NumberFormat(locale, {
+ style: 'currency',
+ currency: this.currencyCode,
+ }).format(this.data().value);
+ }
+
+ events() {
+ return [
+ {
+ 'submit .js-card-customfield-currency'(event) {
+ event.preventDefault();
+ const value = Number(this.find('input').value, 10);
+ this.card.setCustomField(this.customFieldId, value);
+ },
+ },
+ ];
+ }
+}.register('cardCustomField-currency'));
+
// cardCustomField-date
(class extends CardCustomField {
onCreated() {
diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade
index 79dd9127..8afe1976 100644
--- a/client/components/cards/minicard.jade
+++ b/client/components/cards/minicard.jade
@@ -74,8 +74,12 @@ template(name="minicard")
+viewer
= definition.name
.minicard-custom-field-item
- +viewer
- = trueValue
+ if $eq definition.type "currency"
+ +viewer
+ = formattedCurrencyCustomFieldValue(definition)
+ else
+ +viewer
+ = trueValue
if getAssignees
.minicard-assignees.js-minicard-assignees
diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js
index da36b87f..2eb6131c 100644
--- a/client/components/cards/minicard.js
+++ b/client/components/cards/minicard.js
@@ -9,6 +9,20 @@ BlazeComponent.extendComponent({
return 'minicard';
},
+ formattedCurrencyCustomFieldValue(definition) {
+ const customField = this.data()
+ .customFieldsWD()
+ .find(f => f._id === definition._id);
+ const customFieldTrueValue =
+ customField && customField.trueValue ? customField.trueValue : '';
+
+ const locale = TAPi18n.getLanguage();
+ return new Intl.NumberFormat(locale, {
+ style: 'currency',
+ currency: definition.settings.currencyCode,
+ }).format(customFieldTrueValue);
+ },
+
events() {
return [
{
diff --git a/client/components/sidebar/sidebarCustomFields.jade b/client/components/sidebar/sidebarCustomFields.jade
index 4d023f45..ffb8d2d1 100644
--- a/client/components/sidebar/sidebarCustomFields.jade
+++ b/client/components/sidebar/sidebarCustomFields.jade
@@ -33,6 +33,17 @@ template(name="createCustomFieldPopup")
option(value=value selected="selected") {{name}}
else
option(value=value) {{name}}
+
+ div.js-field-settings.js-field-settings-currency(class="{{#if isTypeNotSelected 'currency'}}hide{{/if}}")
+ label
+ | {{_ 'custom-field-currency-option'}}
+ select.js-field-currency
+ each getCurrencyCodes
+ if selected
+ option(value=value selected="selected") {{name}}
+ else
+ option(value=value) {{name}}
+
div.js-field-settings.js-field-settings-dropdown(class="{{#if isTypeNotSelected 'dropdown'}}hide{{/if}}")
label
| {{_ 'custom-field-dropdown-options'}}
diff --git a/client/components/sidebar/sidebarCustomFields.js b/client/components/sidebar/sidebarCustomFields.js
index 92e93641..bd2ebdef 100644
--- a/client/components/sidebar/sidebarCustomFields.js
+++ b/client/components/sidebar/sidebarCustomFields.js
@@ -16,12 +16,62 @@ BlazeComponent.extendComponent({
}).register('customFieldsSidebar');
const CreateCustomFieldPopup = BlazeComponent.extendComponent({
- _types: ['text', 'number', 'date', 'dropdown'],
+ _types: ['text', 'number', 'date', 'dropdown', 'currency'],
+
+ _currencyList: [
+ {
+ name: 'US Dollar',
+ code: 'USD',
+ },
+ {
+ name: 'Euro',
+ code: 'EUR',
+ },
+ {
+ name: 'Yen',
+ code: 'JPY',
+ },
+ {
+ name: 'Pound Sterling',
+ code: 'GBP',
+ },
+ {
+ name: 'Australian Dollar',
+ code: 'AUD',
+ },
+ {
+ name: 'Canadian Dollar',
+ code: 'CAD',
+ },
+ {
+ name: 'Swiss Franc',
+ code: 'CHF',
+ },
+ {
+ name: 'Yuan Renminbi',
+ code: 'CNY',
+ },
+ {
+ name: 'Hong Kong Dollar',
+ code: 'HKD',
+ },
+ {
+ name: 'New Zealand Dollar',
+ code: 'NZD',
+ },
+ ],
onCreated() {
this.type = new ReactiveVar(
this.data().type ? this.data().type : this._types[0],
);
+
+ this.currencyCode = new ReactiveVar(
+ this.data().settings && this.data().settings.currencyCode
+ ? this.data().settings.currencyCode
+ : this._currencyList[0].code,
+ );
+
this.dropdownItems = new ReactiveVar(
this.data().settings && this.data().settings.dropdownItems
? this.data().settings.dropdownItems
@@ -44,6 +94,18 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
return this.type.get() !== type;
},
+ getCurrencyCodes() {
+ const currentCode = this.currencyCode.get();
+
+ return this._currencyList.map(({ name, code }) => {
+ return {
+ name: `${code} - ${name}`,
+ value: code,
+ selected: code === currentCode,
+ };
+ });
+ },
+
getDropdownItems() {
const items = this.dropdownItems.get();
Array.from(this.findAll('.js-field-settings-dropdown input')).forEach(
@@ -62,6 +124,11 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
getSettings() {
const settings = {};
switch (this.type.get()) {
+ case 'currency': {
+ const currencyCode = this.currencyCode.get();
+ settings.currencyCode = currencyCode;
+ break;
+ }
case 'dropdown': {
const dropdownItems = this.getDropdownItems().filter(
item => !!item.name.trim(),
@@ -80,6 +147,10 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
const value = evt.target.value;
this.type.set(value);
},
+ 'change .js-field-currency'(evt) {
+ const value = evt.target.value;
+ this.currencyCode.set(value);
+ },
'keydown .js-dropdown-item.last'(evt) {
if (evt.target.value.trim() && evt.keyCode === 13) {
const items = this.getDropdownItems();
diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json
index b6c6b005..4441143f 100644
--- a/i18n/ar.i18n.json
+++ b/i18n/ar.i18n.json
@@ -256,6 +256,8 @@
"current": "الحالي",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "تاريخ",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/bg.i18n.json b/i18n/bg.i18n.json
index ef9f3db2..b9699b8f 100644
--- a/i18n/bg.i18n.json
+++ b/i18n/bg.i18n.json
@@ -256,6 +256,8 @@
"current": "сегашен",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Чекбокс",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Дата",
"custom-field-dropdown": "Падащо меню",
"custom-field-dropdown-none": "(няма)",
diff --git a/i18n/br.i18n.json b/i18n/br.i18n.json
index 3bedebec..67217ab9 100644
--- a/i18n/br.i18n.json
+++ b/i18n/br.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json
index 847ebfe2..33e88763 100644
--- a/i18n/ca.i18n.json
+++ b/i18n/ca.i18n.json
@@ -256,6 +256,8 @@
"current": "Actual",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/cs.i18n.json b/i18n/cs.i18n.json
index 8a8e96ae..1ff7cfda 100644
--- a/i18n/cs.i18n.json
+++ b/i18n/cs.i18n.json
@@ -256,6 +256,8 @@
"current": "Aktuální",
"custom-field-delete-pop": "Nelze vrátit zpět. Toto odebere toto vlastní pole ze všech karet a zničí jeho historii.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Datum",
"custom-field-dropdown": "Rozbalovací seznam",
"custom-field-dropdown-none": "(prázdné)",
diff --git a/i18n/da.i18n.json b/i18n/da.i18n.json
index 4dd3a183..a78e76ef 100644
--- a/i18n/da.i18n.json
+++ b/i18n/da.i18n.json
@@ -256,6 +256,8 @@
"current": "nuværende",
"custom-field-delete-pop": "Du kan ikke fortryde handlingen. Dette vil fjerne dette brugerdefinerede felt fra alle kort og tilintetgøre dens historik.",
"custom-field-checkbox": "Afkrydsningsfelt",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Dato",
"custom-field-dropdown": "Rullegardinliste",
"custom-field-dropdown-none": "(ingen)",
diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json
index f0ee0f16..067aba5e 100644
--- a/i18n/de.i18n.json
+++ b/i18n/de.i18n.json
@@ -256,6 +256,8 @@
"current": "aktuell",
"custom-field-delete-pop": "Dies wird das Feld aus allen Karten entfernen und den dazugehörigen Verlauf löschen. Die Aktion kann nicht rückgängig gemacht werden.",
"custom-field-checkbox": "Kontrollkästchen",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Datum",
"custom-field-dropdown": "Dropdownliste",
"custom-field-dropdown-none": "(keiner)",
diff --git a/i18n/el.i18n.json b/i18n/el.i18n.json
index e73aa0bb..e6024f40 100644
--- a/i18n/el.i18n.json
+++ b/i18n/el.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Ημερομηνία",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/en-GB.i18n.json b/i18n/en-GB.i18n.json
index 9049f7bf..0795c509 100644
--- a/i18n/en-GB.i18n.json
+++ b/i18n/en-GB.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index 991ea7c1..96862e47 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/eo.i18n.json b/i18n/eo.i18n.json
index dd5104a2..c83e3f96 100644
--- a/i18n/eo.i18n.json
+++ b/i18n/eo.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Dato",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/es-AR.i18n.json b/i18n/es-AR.i18n.json
index 836d57cb..0c60079a 100644
--- a/i18n/es-AR.i18n.json
+++ b/i18n/es-AR.i18n.json
@@ -256,6 +256,8 @@
"current": "actual",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Fecha",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(ninguno)",
diff --git a/i18n/es-CL.i18n.json b/i18n/es-CL.i18n.json
index 2df918fe..06e9781b 100644
--- a/i18n/es-CL.i18n.json
+++ b/i18n/es-CL.i18n.json
@@ -256,6 +256,8 @@
"current": "actual",
"custom-field-delete-pop": "Se eliminará este campo personalizado de todas las tarjetas y se destruirá su historial. Esta acción no puede deshacerse.",
"custom-field-checkbox": "Casilla de verificación",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Fecha",
"custom-field-dropdown": "Lista desplegable",
"custom-field-dropdown-none": "(nada)",
diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json
index eb6a04dd..7063d4a2 100644
--- a/i18n/es.i18n.json
+++ b/i18n/es.i18n.json
@@ -256,6 +256,8 @@
"current": "actual",
"custom-field-delete-pop": "Se eliminará este campo personalizado de todas las tarjetas y se destruirá su historial. Esta acción no puede deshacerse.",
"custom-field-checkbox": "Casilla de verificación",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Fecha",
"custom-field-dropdown": "Lista desplegable",
"custom-field-dropdown-none": "(nada)",
diff --git a/i18n/eu.i18n.json b/i18n/eu.i18n.json
index bbb21665..b96705ce 100644
--- a/i18n/eu.i18n.json
+++ b/i18n/eu.i18n.json
@@ -256,6 +256,8 @@
"current": "unekoa",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/fa.i18n.json b/i18n/fa.i18n.json
index 861cff8d..eb2b581b 100644
--- a/i18n/fa.i18n.json
+++ b/i18n/fa.i18n.json
@@ -256,6 +256,8 @@
"current": "جاری",
"custom-field-delete-pop": "این اقدام فیلدشخصی را بهمراه تمامی تاریخچه آن از کارت ها پاک می کند و برگشت پذیر نمی باشد",
"custom-field-checkbox": "جعبه انتخابی",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "تاریخ",
"custom-field-dropdown": "لیست افتادنی",
"custom-field-dropdown-none": "(هیچ)",
diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json
index 1ebab3a0..bb58a6a2 100644
--- a/i18n/fi.i18n.json
+++ b/i18n/fi.i18n.json
@@ -256,6 +256,8 @@
"current": "nykyinen",
"custom-field-delete-pop": "Tätä ei voi peruuttaa. Tämä poistaa tämän mukautetun kentän kaikista korteista ja poistaa sen historian.",
"custom-field-checkbox": "Valintaruutu",
+ "custom-field-currency": "Valuutta",
+ "custom-field-currency-option": "Valuutta koodi",
"custom-field-date": "Päivämäärä",
"custom-field-dropdown": "Pudotusvalikko",
"custom-field-dropdown-none": "(ei mitään)",
diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json
index ecc1c1d2..b804427c 100644
--- a/i18n/fr.i18n.json
+++ b/i18n/fr.i18n.json
@@ -256,6 +256,8 @@
"current": "actuel",
"custom-field-delete-pop": "Cette action n'est pas réversible. Elle supprimera ce champ personnalisé de toutes les cartes et détruira son historique.",
"custom-field-checkbox": "Case à cocher",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Liste de choix",
"custom-field-dropdown-none": "(aucun)",
diff --git a/i18n/gl.i18n.json b/i18n/gl.i18n.json
index c6f52477..266bcc26 100644
--- a/i18n/gl.i18n.json
+++ b/i18n/gl.i18n.json
@@ -256,6 +256,8 @@
"current": "actual",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/he.i18n.json b/i18n/he.i18n.json
index 37d59107..e576b407 100644
--- a/i18n/he.i18n.json
+++ b/i18n/he.i18n.json
@@ -256,6 +256,8 @@
"current": "נוכחי",
"custom-field-delete-pop": "אין אפשרות לבטל את הפעולה. הפעולה תסיר את השדה שהותאם אישית מכל הכרטיסים ותשמיד את ההיסטוריה שלו.",
"custom-field-checkbox": "תיבת סימון",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "תאריך",
"custom-field-dropdown": "רשימה נגללת",
"custom-field-dropdown-none": "(ללא)",
diff --git a/i18n/hi.i18n.json b/i18n/hi.i18n.json
index 9cf12fdf..7733ad59 100644
--- a/i18n/hi.i18n.json
+++ b/i18n/hi.i18n.json
@@ -256,6 +256,8 @@
"current": "वर्तमान",
"custom-field-delete-pop": "कोई पूर्ववत् नहीं है । यह सभी कार्ड से इस कस्टम क्षेत्र को हटा दें और इसके इतिहास को नष्ट कर देगा ।",
"custom-field-checkbox": "निशानबक्से",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "दिनांक",
"custom-field-dropdown": "ड्रॉपडाउन सूची",
"custom-field-dropdown-none": "(कोई नहीं)",
diff --git a/i18n/hu.i18n.json b/i18n/hu.i18n.json
index 8cbe2fb8..e2450aa8 100644
--- a/i18n/hu.i18n.json
+++ b/i18n/hu.i18n.json
@@ -256,6 +256,8 @@
"current": "jelenlegi",
"custom-field-delete-pop": "Nincs visszavonás. Ez el fogja távolítani az egyéni mezőt az összes kártyáról, és megsemmisíti az előzményeit.",
"custom-field-checkbox": "Jelölőnégyzet",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Dátum",
"custom-field-dropdown": "Legördülő lista",
"custom-field-dropdown-none": "(nincs)",
diff --git a/i18n/hy.i18n.json b/i18n/hy.i18n.json
index 54f856bd..ead8eb6c 100644
--- a/i18n/hy.i18n.json
+++ b/i18n/hy.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/id.i18n.json b/i18n/id.i18n.json
index 82f0d536..de036359 100644
--- a/i18n/id.i18n.json
+++ b/i18n/id.i18n.json
@@ -256,6 +256,8 @@
"current": "sekarang",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Tanggal",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/ig.i18n.json b/i18n/ig.i18n.json
index 6bbc2e2f..c81e041e 100644
--- a/i18n/ig.i18n.json
+++ b/i18n/ig.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json
index 2ede410d..b3ddf3d7 100644
--- a/i18n/it.i18n.json
+++ b/i18n/it.i18n.json
@@ -256,6 +256,8 @@
"current": "corrente",
"custom-field-delete-pop": "Non potrai tornare indietro. Questa azione rimuoverà questo campo personalizzato da tutte le schede ed eliminerà ogni sua traccia.",
"custom-field-checkbox": "Casella di scelta",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Lista a discesa",
"custom-field-dropdown-none": "(niente)",
diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json
index 984e3ba1..6aa47915 100644
--- a/i18n/ja.i18n.json
+++ b/i18n/ja.i18n.json
@@ -256,6 +256,8 @@
"current": "現在",
"custom-field-delete-pop": "この操作は取り消しできません。このカスタムフィールドはすべてのカードから外され履歴からも見えなくなります。",
"custom-field-checkbox": "チェックボックス",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "日付",
"custom-field-dropdown": "ドロップダウンリスト",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/ka.i18n.json b/i18n/ka.i18n.json
index 900f5bbe..c3190afb 100644
--- a/i18n/ka.i18n.json
+++ b/i18n/ka.i18n.json
@@ -256,6 +256,8 @@
"current": "მიმდინარე",
"custom-field-delete-pop": "ქმედება გამოიწვევს მომხმარებლის ველის წაშლას ყველა ბარათიდან და გაანადგურებს მის ისტორიას, რის შემდეგაც შეუძლებელი იქნება მისი უკან დაბრუნება. ",
"custom-field-checkbox": "მოსანიშნი გრაფა",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "თარიღი",
"custom-field-dropdown": "ჩამოსაშლელი სია",
"custom-field-dropdown-none": "(ცარიელი)",
diff --git a/i18n/km.i18n.json b/i18n/km.i18n.json
index 5e4c5117..b9ec2c2f 100644
--- a/i18n/km.i18n.json
+++ b/i18n/km.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json
index 6eba07be..5b838835 100644
--- a/i18n/ko.i18n.json
+++ b/i18n/ko.i18n.json
@@ -256,6 +256,8 @@
"current": "경향",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "날짜",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/lv.i18n.json b/i18n/lv.i18n.json
index 71e7ea3b..77e28271 100644
--- a/i18n/lv.i18n.json
+++ b/i18n/lv.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/mk.i18n.json b/i18n/mk.i18n.json
index 314b4229..51236fd8 100644
--- a/i18n/mk.i18n.json
+++ b/i18n/mk.i18n.json
@@ -256,6 +256,8 @@
"current": "сегашен",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Чекбокс",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Дата",
"custom-field-dropdown": "Падащо меню",
"custom-field-dropdown-none": "(няма)",
diff --git a/i18n/mn.i18n.json b/i18n/mn.i18n.json
index 02fe75c6..57e9573c 100644
--- a/i18n/mn.i18n.json
+++ b/i18n/mn.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/nb.i18n.json b/i18n/nb.i18n.json
index 616fe50b..ddae9171 100644
--- a/i18n/nb.i18n.json
+++ b/i18n/nb.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Dato",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/nl.i18n.json b/i18n/nl.i18n.json
index cb26edb1..9720b885 100644
--- a/i18n/nl.i18n.json
+++ b/i18n/nl.i18n.json
@@ -256,6 +256,8 @@
"current": "Huidige",
"custom-field-delete-pop": "Er is geen herstelmogelijkheid. Deze actie zal dit maatwerkveld van alle kaarten verwijderen en de bijbehorende historie wissen.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Datum",
"custom-field-dropdown": "Dropdown Lijst",
"custom-field-dropdown-none": "(geen)",
diff --git a/i18n/oc.i18n.json b/i18n/oc.i18n.json
index c03c0746..bcd1b039 100644
--- a/i18n/oc.i18n.json
+++ b/i18n/oc.i18n.json
@@ -256,6 +256,8 @@
"current": "actual",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Casa de croiar",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Tièra de causidas",
"custom-field-dropdown-none": "(pas res)",
diff --git a/i18n/pl.i18n.json b/i18n/pl.i18n.json
index e76a2d83..32e30ca2 100644
--- a/i18n/pl.i18n.json
+++ b/i18n/pl.i18n.json
@@ -256,6 +256,8 @@
"current": "obecny",
"custom-field-delete-pop": "Nie ma możliwości wycofania tej operacji. To usunie te niestandardowe pole ze wszystkich kart oraz usunie ich całą historię.",
"custom-field-checkbox": "Pole wyboru",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Lista rozwijana",
"custom-field-dropdown-none": "(puste)",
diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json
index f0f0d86d..a55bc3e7 100644
--- a/i18n/pt-BR.i18n.json
+++ b/i18n/pt-BR.i18n.json
@@ -256,6 +256,8 @@
"current": "atual",
"custom-field-delete-pop": "Não existe desfazer. Isso irá excluir o campo customizado de todos os cartões e destruir seu histórico",
"custom-field-checkbox": "Caixa de seleção",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Lista suspensa",
"custom-field-dropdown-none": "(nada)",
diff --git a/i18n/pt.i18n.json b/i18n/pt.i18n.json
index 5045759b..002044ee 100644
--- a/i18n/pt.i18n.json
+++ b/i18n/pt.i18n.json
@@ -256,6 +256,8 @@
"current": "actual",
"custom-field-delete-pop": "Não existe desfazer. Isto irá remover este campo personalizado de todos os cartões e destruir o seu histórico",
"custom-field-checkbox": "Caixa de selecção",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Data",
"custom-field-dropdown": "Lista Suspensa",
"custom-field-dropdown-none": "(nada)",
diff --git a/i18n/ro.i18n.json b/i18n/ro.i18n.json
index 7a15976f..927fb451 100644
--- a/i18n/ro.i18n.json
+++ b/i18n/ro.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json
index 2b5627c3..c6264cf4 100644
--- a/i18n/ru.i18n.json
+++ b/i18n/ru.i18n.json
@@ -256,6 +256,8 @@
"current": "текущий",
"custom-field-delete-pop": "Отменить нельзя. Это удалит настраиваемое поле со всех карт и уничтожит его историю.",
"custom-field-checkbox": "Галочка",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Дата",
"custom-field-dropdown": "Выпадающий список",
"custom-field-dropdown-none": "(нет)",
diff --git a/i18n/sl.i18n.json b/i18n/sl.i18n.json
index bbd3ce1c..f14d60b6 100644
--- a/i18n/sl.i18n.json
+++ b/i18n/sl.i18n.json
@@ -256,6 +256,8 @@
"current": "trenutno",
"custom-field-delete-pop": "Razveljavitve ni. To bo odstranilo to poljubno polje iz vseh kartic in izbrisalo njegovo zgodovino.",
"custom-field-checkbox": "Potrditveno polje",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Datum",
"custom-field-dropdown": "Spustni seznam",
"custom-field-dropdown-none": "(nobeno)",
diff --git a/i18n/sr.i18n.json b/i18n/sr.i18n.json
index cc8694ee..66068920 100644
--- a/i18n/sr.i18n.json
+++ b/i18n/sr.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Datum",
"custom-field-dropdown": "Padajuća lista",
"custom-field-dropdown-none": "(ništa)",
diff --git a/i18n/sv.i18n.json b/i18n/sv.i18n.json
index fec61ca7..bf2d3ff4 100644
--- a/i18n/sv.i18n.json
+++ b/i18n/sv.i18n.json
@@ -256,6 +256,8 @@
"current": "aktuell",
"custom-field-delete-pop": "Det går inte att ångra. Detta tar bort det här anpassade fältet från alla kort och förstör dess historia.",
"custom-field-checkbox": "Kryssruta",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Datum",
"custom-field-dropdown": "Rullgardingsmeny",
"custom-field-dropdown-none": "(inga)",
diff --git a/i18n/sw.i18n.json b/i18n/sw.i18n.json
index 80046204..d908b12f 100644
--- a/i18n/sw.i18n.json
+++ b/i18n/sw.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/ta.i18n.json b/i18n/ta.i18n.json
index f56e9a91..089b65c2 100644
--- a/i18n/ta.i18n.json
+++ b/i18n/ta.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "நாள் ",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/th.i18n.json b/i18n/th.i18n.json
index fc48f428..bca08fe2 100644
--- a/i18n/th.i18n.json
+++ b/i18n/th.i18n.json
@@ -256,6 +256,8 @@
"current": "ปัจจุบัน",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "วันที่",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json
index b30a9a11..ee3bd9c1 100644
--- a/i18n/tr.i18n.json
+++ b/i18n/tr.i18n.json
@@ -256,6 +256,8 @@
"current": "mevcut",
"custom-field-delete-pop": "Bunun geri dönüşü yoktur. Bu özel alan tüm kartlardan kaldırılıp tarihçesi yokedilecektir.",
"custom-field-checkbox": "İşaret kutusu",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Tarih",
"custom-field-dropdown": "Açılır liste",
"custom-field-dropdown-none": "(hiçbiri)",
diff --git a/i18n/uk.i18n.json b/i18n/uk.i18n.json
index 514a2dde..2f675da4 100644
--- a/i18n/uk.i18n.json
+++ b/i18n/uk.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/vi.i18n.json b/i18n/vi.i18n.json
index daa090f3..c0d0c815 100644
--- a/i18n/vi.i18n.json
+++ b/i18n/vi.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json
index f4449bb1..a6300a23 100644
--- a/i18n/zh-CN.i18n.json
+++ b/i18n/zh-CN.i18n.json
@@ -256,6 +256,8 @@
"current": "当前",
"custom-field-delete-pop": "没有撤销,此动作将从所有卡片中移除自定义字段并销毁历史。",
"custom-field-checkbox": "选择框",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "日期",
"custom-field-dropdown": "下拉列表",
"custom-field-dropdown-none": "(无)",
diff --git a/i18n/zh-HK.i18n.json b/i18n/zh-HK.i18n.json
index 2324c3f0..0a01b931 100644
--- a/i18n/zh-HK.i18n.json
+++ b/i18n/zh-HK.i18n.json
@@ -256,6 +256,8 @@
"current": "current",
"custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
"custom-field-checkbox": "Checkbox",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "Date",
"custom-field-dropdown": "Dropdown List",
"custom-field-dropdown-none": "(none)",
diff --git a/i18n/zh-TW.i18n.json b/i18n/zh-TW.i18n.json
index c4b155dc..945d71f3 100644
--- a/i18n/zh-TW.i18n.json
+++ b/i18n/zh-TW.i18n.json
@@ -256,6 +256,8 @@
"current": "目前",
"custom-field-delete-pop": "此操作將會從所有卡片中移除自訂欄位以及銷毀歷史紀錄,並且無法撤消。",
"custom-field-checkbox": "複選框",
+ "custom-field-currency": "Currency",
+ "custom-field-currency-option": "Currency Code",
"custom-field-date": "日期",
"custom-field-dropdown": "下拉式選單",
"custom-field-dropdown-none": "(無)",
diff --git a/models/customFields.js b/models/customFields.js
index cc798b16..9df635ba 100644
--- a/models/customFields.js
+++ b/models/customFields.js
@@ -22,7 +22,7 @@ CustomFields.attachSchema(
* type of the custom field
*/
type: String,
- allowedValues: ['text', 'number', 'date', 'dropdown'],
+ allowedValues: ['text', 'number', 'date', 'dropdown', 'currency'],
},
settings: {
/**
@@ -30,6 +30,10 @@ CustomFields.attachSchema(
*/
type: Object,
},
+ 'settings.currencyCode': {
+ type: String,
+ optional: true,
+ },
'settings.dropdownItems': {
/**
* list of drop down items objects