summaryrefslogtreecommitdiffstats
path: root/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-26 15:14:58 +0100
committerSimon Rettberg2020-10-26 15:14:58 +0100
commit6d7606b2fd53a1d71f59eff5678daafe58d92a5b (patch)
tree93ff6f2afbc368de7266f2e07e8b08df982b4a24 /modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
parent[serversetup-bwlp-ipxe] stupidtable for bootentry list (diff)
downloadslx-admin-6d7606b2fd53a1d71f59eff5678daafe58d92a5b.tar.gz
slx-admin-6d7606b2fd53a1d71f59eff5678daafe58d92a5b.tar.xz
slx-admin-6d7606b2fd53a1d71f59eff5678daafe58d92a5b.zip
[serversetup-bwlp-ipxe] Empty menu item title = use bootentry title
We now leave the input box for the menu item title empty, which shows the matching bootentry's title as the placeholder. This will then also be what's displayed in the actual menu. This way, updating the boot entry's title will update the displayed menu item, if it wasn't overridden previously. Closes #3690
Diffstat (limited to 'modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html')
-rw-r--r--modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html13
1 files changed, 3 insertions, 10 deletions
diff --git a/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html b/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
index b79e6bb3..6f119515 100644
--- a/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
+++ b/modules-available/serversetup-bwlp-ipxe/templates/menu-edit.html
@@ -80,7 +80,7 @@
</td>
<td>
<input class="form-control title" name="entry[{{menuentryid}}][title]" value="{{title}}"
- maxlength="100" {{readonly}}>
+ placeholder="{{parenttitle}}" maxlength="100" {{readonly}}>
</td>
<td>
@@ -252,7 +252,7 @@
</button>
</td>
<td>
- <input class="form-control title" data-old="#new#" name="entry[%new%][title]" maxlength="100">
+ <input class="form-control title" name="entry[%new%][title]" maxlength="100">
</td>
<td>
<select class="form-control key-list no-spacer" style="display: none;" name="entry[%new%][hotkey]">
@@ -357,15 +357,8 @@
tableRow.find('.no-spacer').show();
}
var $title = tableRow.find('.title');
- var oldval = $title.data('old');
- if (oldval === '#stop#')
- return;
- if (oldval !== '#new#' && oldval !== $title.val()) {
- $title.data('old', '#stop#');
- return;
- }
var text = $('#entrydata-' + entryId.replace(':', '\\:') + ' .name').text();
- $title.val(text).data('old', text);
+ $title.prop('placeholder', text);
});
});
</script>