Release 2.0.13 (#3955)

- added missing escape to prevent HTML injection
- added missing color attribute
- upgrade theme
  - use dropdown submenu if title is set, otherwise dropdown tends to get too long
  - allow to use card-table instead of card-body
  - added `required` attribute to username and password field
- fix pagination back to page 1
- prevent tag name too long
- re-add missing user preferences link
This commit is contained in:
Kevin Papst
2023-03-30 01:08:15 +02:00
committed by GitHub
parent 7164ec126f
commit 01226a1243
23 changed files with 102 additions and 153 deletions

View File

@@ -115,18 +115,24 @@ export default class KimaiFormSelect extends KimaiFormPlugin {
if (node.dataset['renderer'] !== undefined && node.dataset['renderer'] === 'color') {
options.render = {...render, ...{
option: function(data, escape) {
let color = data.value;
let item = '<div class="list-group-item border-0 p-1 ps-2 text-nowrap">';
if (data.color !== undefined) {
color = data.color;
item += '<span style="background-color:' + data.color + '" class="color-choice-item">&nbsp;</span>';
} else {
item += '<span class="color-choice-item">&nbsp;</span>';
}
return '<div class="list-group-item border-0 p-1 ps-2 text-nowrap"><span style="background-color:' + color + '" class="color-choice-item">&nbsp;</span>' + escape(data.text) + '</div>';
item += escape(data.text) + '</div>';
return item;
},
item: function(data, escape) {
let color = data.value;
let item = '<div class="text-nowrap">';
if (data.color !== undefined) {
color = data.color;
item += '<span style="background-color:' + data.color + '" class="color-choice-item">&nbsp;</span>';
} else {
item += '<span class="color-choice-item">&nbsp;</span>';
}
return '<div class="text-nowrap"><span style="background-color:' + color + '" class="color-choice-item">&nbsp;</span>' + escape(data.text) + '</div>';
item += escape(data.text) + '</div>';
return item;
}
}};
} else {