diff --git a/web/modules/custom/book_settings_changes/book_settings_changes.info.yml b/web/modules/custom/book_settings_changes/book_settings_changes.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..0dfab3f26adb3e46d20e77f9d8fa11ef2be2369a --- /dev/null +++ b/web/modules/custom/book_settings_changes/book_settings_changes.info.yml @@ -0,0 +1,8 @@ +name: Book Settings Changes +description: 'Validates node and changes Book outline settings' +core: 8.x +type: module +package: ASC Tech + +libraries: + - 'book_settings_changes/global-styling' diff --git a/web/modules/custom/book_settings_changes/book_settings_changes.libraries.yml b/web/modules/custom/book_settings_changes/book_settings_changes.libraries.yml new file mode 100644 index 0000000000000000000000000000000000000000..ca9aa810e95ded04a3dd9904c891a559b16b69ab --- /dev/null +++ b/web/modules/custom/book_settings_changes/book_settings_changes.libraries.yml @@ -0,0 +1,6 @@ +# book_settings_changes.libraries.yml +custom_css: + version: 1.x + css: + theme: + css/styles.css: {} diff --git a/web/modules/custom/book_settings_changes/book_settings_changes.module b/web/modules/custom/book_settings_changes/book_settings_changes.module new file mode 100644 index 0000000000000000000000000000000000000000..225b5951f14c2c94860a47fa61bf6171da2bd062 --- /dev/null +++ b/web/modules/custom/book_settings_changes/book_settings_changes.module @@ -0,0 +1,13 @@ +<?php +function book_settings_changes_form_alter(&$form, &$form_state, $form_id) { + $form['book']['#title'] = t('Newsletter outline'); + $form['book']['bid']['#title'] = t('Newsletter'); + $form['book']['bid']['#description'] = t('Your page will be a part of the selected newsletter.'); + $form['book']['parent_depth_limit']['#value'] = 2; + //$form['book']['pid']['#prefix'] = '<div id="edit-book-plid-wrapper"><em>' . t('No newsletter selected.') . '</em></div>'; + $form['book']['bid']['#options']['new'] = t('- Create a new newsletter -'); +} + +function book_settings_changes_page_attachments(array &$page) { + $page['#attached']['library'][] = 'book_settings_changes/custom_css'; +} diff --git a/web/modules/custom/book_settings_changes/css/styles.css b/web/modules/custom/book_settings_changes/css/styles.css new file mode 100644 index 0000000000000000000000000000000000000000..2a5f6847003cdbd54f744ff43122951d6f1ca9fb --- /dev/null +++ b/web/modules/custom/book_settings_changes/css/styles.css @@ -0,0 +1,8 @@ +/* Hides unneeded descriptive text */ +#edit-book-plid-wrapper em { + display: none; +} + +#edit-book-plid-wrapper .description { + display: none; +}