nodebb-plugin-equipment-calendar 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/library.js
CHANGED
|
@@ -786,6 +786,8 @@ async function renderAdminPage(req, res) {
|
|
|
786
786
|
res.render('admin/plugins/equipment-calendar', {
|
|
787
787
|
title: 'Equipment Calendar',
|
|
788
788
|
settings,
|
|
789
|
+
view_itemsSourceManual: String(settings.itemsSource || 'manual') !== 'helloasso',
|
|
790
|
+
view_itemsSourceHelloasso: String(settings.itemsSource || 'manual') === 'helloasso',
|
|
789
791
|
saved: req.query && String(req.query.saved || '') === '1',
|
|
790
792
|
purged: req.query && parseInt(req.query.purged, 10) || 0,
|
|
791
793
|
view_dayGridMonth: (settings.defaultView || 'dayGridMonth') === 'dayGridMonth',
|
|
@@ -1333,6 +1335,10 @@ async function handleAdminSave(req, res) {
|
|
|
1333
1335
|
approverGroup: String(req.body.approverGroup || DEFAULT_SETTINGS.approverGroup),
|
|
1334
1336
|
notifyGroup: String(req.body.notifyGroup || DEFAULT_SETTINGS.notifyGroup),
|
|
1335
1337
|
itemsJson: String(req.body.itemsJson || DEFAULT_SETTINGS.itemsJson),
|
|
1338
|
+
itemsSource: String(req.body.itemsSource || DEFAULT_SETTINGS.itemsSource),
|
|
1339
|
+
ha_itemsFormType: String(req.body.ha_itemsFormType || DEFAULT_SETTINGS.ha_itemsFormType),
|
|
1340
|
+
ha_itemsFormSlug: String(req.body.ha_itemsFormSlug || DEFAULT_SETTINGS.ha_itemsFormSlug),
|
|
1341
|
+
ha_locationMapJson: String(req.body.ha_locationMapJson || DEFAULT_SETTINGS.ha_locationMapJson),
|
|
1336
1342
|
ha_clientId: String(req.body.ha_clientId || ''),
|
|
1337
1343
|
ha_clientSecret: String(req.body.ha_clientSecret || ''),
|
|
1338
1344
|
ha_organizationSlug: String(req.body.ha_organizationSlug || ''),
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
<div class="mb-3">
|
|
59
59
|
<label class="form-label">Source</label>
|
|
60
60
|
<select class="form-select" name="itemsSource">
|
|
61
|
-
<option value="manual">Manuel (JSON)</option>
|
|
62
|
-
<option value="helloasso">HelloAsso (articles d’un formulaire)</option>
|
|
61
|
+
<option value="manual" {{{ if view_itemsSourceManual }}}selected{{{ end }}}>Manuel (JSON)</option>
|
|
62
|
+
<option value="helloasso" {{{ if view_itemsSourceHelloasso }}}selected{{{ end }}}>HelloAsso (articles d’un formulaire)</option>
|
|
63
63
|
</select>
|
|
64
64
|
<div class="form-text">Si HelloAsso est choisi, la liste du matériel est récupérée via l’API HelloAsso (items d’un formulaire).</div>
|
|
65
65
|
</div>
|