Add Crispy Forms integration to QuestionForm and update question_form template for improved layout and usability
This commit is contained in:
+7
-6
@@ -334,6 +334,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
//}
|
||||
// fallback to any table on the page that looks like it has selection
|
||||
var any = document.querySelector('table.js-row-selectable') //|| Array.from(document.querySelectorAll('table')).find(function(t){ return t.querySelector && (t.querySelector('input[name="selection"]') || t.querySelector('input[type="checkbox"]')); });
|
||||
console.log('findTableForControl fallback', any);
|
||||
return any || null;
|
||||
}
|
||||
|
||||
@@ -374,12 +375,12 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
container.parentNode.insertBefore(wrapper, container);
|
||||
}
|
||||
|
||||
// Create controls for any table that looks selectable but lacks a control block
|
||||
Array.from(document.querySelectorAll('table')).forEach(function(t){
|
||||
if (t.querySelector && (t.querySelector('input[name="selection"]') || t.querySelector('input[type="checkbox"]'))) {
|
||||
ensureControlsForTable(t);
|
||||
}
|
||||
});
|
||||
//// Create controls for any table that looks selectable but lacks a control block
|
||||
//Array.from(document.querySelectorAll('table')).forEach(function(t){
|
||||
// if (t.querySelector && (t.querySelector('input[name="selection"]') || t.querySelector('input[type="checkbox"]'))) {
|
||||
// ensureControlsForTable(t);
|
||||
// }
|
||||
//});
|
||||
|
||||
// For every toggle button (supports both unsuffixed and suffixed IDs)
|
||||
document.querySelectorAll('button[id^="toggle-row-selection"]').forEach(function(toggleBtn) {
|
||||
|
||||
Reference in New Issue
Block a user