nodebb-plugin-poll 4.0.9 → 4.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-poll",
3
- "version": "4.0.9",
3
+ "version": "4.0.10",
4
4
  "description": "NodeBB Poll Plugin",
5
5
  "main": "library.js",
6
6
  "scripts": {
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div class="mb-3">
7
7
  <label class="form-label" for="pollInputTitle">[[poll:poll_title]]</label>
8
- <input type="text" name="title" id="pollInputTitle" value="{escape(poll.title)}" placeholder="[[poll:poll_title_placeholder]]" class="form-control">
8
+ <input type="text" name="title" id="pollInputTitle" value="{poll.title}" placeholder="[[poll:poll_title_placeholder]]" class="form-control">
9
9
  </div>
10
10
 
11
11
  <div class="mb-3 d-flex flex-column gap-1">
@@ -6,7 +6,7 @@
6
6
  <div component="post/poll/item" data-poll-id="{./pollId}" class="bg-body d-flex align-items-center justify-content-between mb-3 p-1 border rounded-1">
7
7
  <div class="d-flex align-items-center gap-1">
8
8
  <a href="#" component="sort/handle" class="btn btn-ghost btn-sm align-self-start" style="cursor:grab;"><i class="fa fa-arrows-up-down text-muted"></i></a>
9
- <div class="text-nowrap flex-grow-1">{escape(./title)}</div>
9
+ <div class="text-nowrap flex-grow-1">{./title}</div>
10
10
  </div>
11
11
 
12
12
  <div class="d-flex align-items-center gap-1">
@@ -1,6 +1,6 @@
1
1
  <div component="post/poll/option/item" data-option-id="{./id}" class="bg-body d-flex align-items-center justify-content-between gap-2 p-1 rounded-1">
2
2
  <a href="#" component="sort/handle" class="btn btn-ghost btn-sm" style="cursor:grab;"><i class="fa fa-arrows-up-down text-muted"></i></a>
3
- <input type="text" name="options" id="pollInputOptions" value="{escape(./title)}" class="form-control"/>
3
+ <input type="text" name="options" id="pollInputOptions" value="{./title}" class="form-control"/>
4
4
  <input type="hidden" name="id" value="{./id}"/>
5
5
  <button class="btn btn-ghost btn-sm" data-action="remove-option" data-option-id="{./id}"><i class="fa fa-trash text-danger"></i></button>
6
6
  </div>
@@ -1,7 +1,7 @@
1
1
  <!-- BEGIN poll.options -->
2
2
  <div class="poll-result" data-poll-option-id="{poll.options.id}">
3
3
  <div class="d-flex justify-content-between mb-1">
4
- <strong>{escape(poll.options.title)}</strong>
4
+ <strong>{poll.options.title}</strong>
5
5
  <a class="poll-result-votecount small" href="#">
6
6
  <span>[[poll:x-votes, {poll.options.voteCount}]]</span>
7
7
  </a>
@@ -1,16 +1,16 @@
1
- <form role="form" class="poll-voting-form mb-3 d-flex flex-column gap-3">
2
- <!-- BEGIN poll.options -->
3
- <div class="poll-view-option {poll.optionType}" data-poll-option-id="{poll.options.id}">
4
- <div class="form-check">
5
- <input class="form-check-input" type="{poll.optionType}" name="pollVoteSelection" value="{poll.options.id}" id="poll-{poll.info.pollId}-option-id-{poll.options.id}">
6
- <label class="form-check-label" for="poll-{poll.info.pollId}-option-id-{poll.options.id}">{escape(poll.options.title)}</label>
7
- </div>
8
- </div>
9
- <!-- END poll.options -->
10
- </form>
11
-
12
- <!-- IF poll.settings.disallowVoteUpdate -->
13
- <div class="alert alert-warning" role="alert">
14
- [[poll:vote_is_final]]
15
- </div>
16
- <!-- ENDIF poll.settings.disallowVoteUpdate -->
1
+ <form role="form" class="poll-voting-form mb-3 d-flex flex-column gap-3">
2
+ <!-- BEGIN poll.options -->
3
+ <div class="poll-view-option {poll.optionType}" data-poll-option-id="{poll.options.id}">
4
+ <div class="form-check">
5
+ <input class="form-check-input" type="{poll.optionType}" name="pollVoteSelection" value="{poll.options.id}" id="poll-{poll.info.pollId}-option-id-{poll.options.id}">
6
+ <label class="form-check-label" for="poll-{poll.info.pollId}-option-id-{poll.options.id}">{poll.options.title}</label>
7
+ </div>
8
+ </div>
9
+ <!-- END poll.options -->
10
+ </form>
11
+
12
+ <!-- IF poll.settings.disallowVoteUpdate -->
13
+ <div class="alert alert-warning" role="alert">
14
+ [[poll:vote_is_final]]
15
+ </div>
16
+ <!-- ENDIF poll.settings.disallowVoteUpdate -->
@@ -3,9 +3,9 @@
3
3
  <div class="card-header border-0 d-flex justify-content-between align-items-center flex-wrap">
4
4
  <h5 class="card-title mb-0 {{{ if poll.isWidget }}}fs-6{{{ end }}}">
5
5
  {{{ if poll.isWidget }}}
6
- <a class="text-reset text-break" href="{config.relative_path}/post/{poll.info.pid}">{escape(poll.info.title)}</a>
6
+ <a class="text-reset text-break" href="{config.relative_path}/post/{poll.info.pid}">{poll.info.title}</a>
7
7
  {{{ else }}}
8
- {escape(poll.info.title)}
8
+ {poll.info.title}
9
9
  {{{ end }}}
10
10
  </h5>
11
11
  {{{ if (isAdmin && !poll.isWidget) }}}