prompt id always lowercase. see #12
This commit is contained in:
parent
237a325567
commit
2fe25e2e84
3 changed files with 7 additions and 3 deletions
|
|
@ -105,7 +105,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"customPrompts_form_label_ID_rules": {
|
"customPrompts_form_label_ID_rules": {
|
||||||
"message": "Must be unique and without spaces",
|
"message": "Must be unique, lowercase and without spaces",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,4 +137,8 @@ table.prompts_list td.properties{
|
||||||
.small_label{
|
.small_label{
|
||||||
font-size: small;
|
font-size: small;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
#txtIdNew, .id_output{
|
||||||
|
text-transform: lowercase;
|
||||||
}
|
}
|
||||||
|
|
@ -247,7 +247,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
tr.querySelector('.btnEditItem').style.display = 'inline'; // Edit btn
|
tr.querySelector('.btnEditItem').style.display = 'inline'; // Edit btn
|
||||||
tr.querySelector('.btnDeleteItem').style.display = 'inline'; // Delete btn
|
tr.querySelector('.btnDeleteItem').style.display = 'inline'; // Delete btn
|
||||||
// Update item data
|
// Update item data
|
||||||
tr.querySelector('.id_show').innerText = tr.querySelector('.id_output').value;
|
tr.querySelector('.id_show').innerText = String(tr.querySelector('.id_output').value).toLocaleLowerCase();
|
||||||
tr.querySelector('.name_show').innerText = tr.querySelector('.name_output').value;
|
tr.querySelector('.name_show').innerText = tr.querySelector('.name_output').value;
|
||||||
tr.querySelector('.text_show').innerText = tr.querySelector('.text_output').value;
|
tr.querySelector('.text_show').innerText = tr.querySelector('.text_output').value;
|
||||||
tr.querySelector('.type').innerText = tr.querySelector('.type_output').value;
|
tr.querySelector('.type').innerText = tr.querySelector('.type_output').value;
|
||||||
|
|
@ -326,7 +326,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let newItem = promptsList.add({
|
let newItem = promptsList.add({
|
||||||
id: txtIdNew.value.trim(),
|
id: String(txtIdNew.value.trim()).toLocaleLowerCase(),
|
||||||
name: txtNameNew.value.trim(),
|
name: txtNameNew.value.trim(),
|
||||||
text: txtTextNew.value.trim(),
|
text: txtTextNew.value.trim(),
|
||||||
type: selectTypeNew.value,
|
type: selectTypeNew.value,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue