Fix screen force-delete submission
This commit is contained in:
1 parent
f0601f823d
commit
40f0892262
4 files changed
+10
-1
No files matched your search
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## 2.15.3 - 2026-10-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- Preserved the force-delete flag when submitting a screen with onboarding-device bindings.
|
||||
|
||||
### Changed
|
||||
|
||||
- Replaced the canvas-size duplicate action with reversible disable/enable controls. Disabled sizes remain assigned to existing templates and playlists but cannot be selected for new ones.
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (form.hasAttribute('data-native-submit')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var actionPath = '';
|
||||
try {
|
||||
actionPath = new URL(form.action, window.location.href).pathname;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</form>
|
||||
{{#if screen.canForceDelete}}
|
||||
<form id="screen-force-delete-form" method="post" action="{{forceDeleteUrl}}" data-confirm-message="Force delete this screen group and unlink its onboarding devices?">
|
||||
<form id="screen-force-delete-form" method="post" action="{{forceDeleteUrl}}" data-confirm-message="Force delete this screen group and unlink its onboarding devices?" data-native-submit>
|
||||
<input type="hidden" name="force_delete" value="1" />
|
||||
</form>
|
||||
{{/if}}
|
||||
|
||||
@@ -269,6 +269,7 @@ test('screen edit page offers force delete for disconnected onboarding bindings'
|
||||
|
||||
assert.match(html, /Force delete/);
|
||||
assert.match(html, /name="force_delete" value="1"/);
|
||||
assert.match(html, /data-native-submit/);
|
||||
assert.match(html, /Force delete this screen group and unlink its onboarding devices\?/);
|
||||
assert.ok(html.indexOf('form="screen-force-delete-form"') < html.indexOf('class="btn-group save-action-group"'));
|
||||
assert.match(html, /class="ms-auto">\s*<div class="btn-group save-action-group"/);
|
||||
|
||||
Reference in new issue
Block a user