Skip to content
Snippets Groups Projects
Commit 4f6c4013 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1426698 by droplet: Fixed book.js: fix vertical tabs summary & clean up.

parent 7500befb
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
(function ($) {
Drupal.behaviors.bookFieldsetSummaries = {
attach: function (context) {
$('fieldset.book-form', context).drupalSetSummary(function (context) {
var val = $('.form-item-book-bid select').val();
$('fieldset.book-outline-form', context).drupalSetSummary(function (context) {
var $select = $('.form-item-book-bid select');
var val = $select.val();
if (val === '0') {
return Drupal.t('Not in book');
......@@ -13,7 +13,7 @@ Drupal.behaviors.bookFieldsetSummaries = {
return Drupal.t('New book');
}
else {
return Drupal.checkPlain($('.form-item-book-bid select :selected').text());
return Drupal.checkPlain($select.find(':selected').text());
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment