Skip to content

Commit

Permalink
Resolved conflict, Set cancel btn class and added hook_update to set …
Browse files Browse the repository at this point in the history
…custom module to weight.
  • Loading branch information
gurjinder12 committed Nov 29, 2023
1 parent 438a840 commit 65107b6
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"bcgov/bcbb": "1.0.x@dev",
"bcgov/bcbb_theme": "1.0.x@dev",
"composer/installers": "^2.0",
"drupal/cancel_button": "^1.4",
"drupal/ckeditor_codemirror": "^3.0@beta",
"drupal/clipboardjs": "dev-2.0.x#adb3f68",
"drupal/core-composer-scaffold": "^10.1",
Expand Down
60 changes: 58 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions config/sync/cancel_button.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
_core:
default_config_hash: K_LddvA0aVOWbF6aw7aoX1n_BmWah6y3HWE1Ya7QmUc
entity_type_cancel_destination:
default:
path: /
enabled: true
comment:
path: /
enabled: false
block:
path: /admin/structure/block
enabled: true
block_content_type:
path: /admin/structure/block/block-content/types
enabled: true
comment_type:
path: /admin/structure/comment
enabled: true
contact_form:
path: /admin/structure/contact
enabled: true
editor:
path: /
enabled: false
field_storage_config:
path: /
enabled: false
field_config:
path: /
enabled: true
file:
path: /
enabled: false
filter_format:
path: /admin/config/content/formats
enabled: true
image_style:
path: /admin/config/media/image-styles
enabled: true
node_type:
path: /admin/structure/types
enabled: true
node:
path: /
enabled: true
shortcut_set:
path: /
enabled: false
shortcut:
path: /
enabled: false
action:
path: /
enabled: false
menu:
path: /
enabled: false
taxonomy_term:
path: /
enabled: false
taxonomy_vocabulary:
path: /admin/structure/taxonomy
enabled: true
tour:
path: /
enabled: false
user_role:
path: /admin/people/roles
enabled: true
user:
path: /
enabled: true
menu_link_content:
path: /
enabled: false
view:
path: /
enabled: false
base_field_override:
path: /
enabled: false
date_format:
path: /
enabled: false
entity_view_mode:
path: /admin/structure/display-modes/view
enabled: true
entity_form_display:
path: /
enabled: false
entity_view_display:
path: /
enabled: false
entity_form_mode:
path: /admin/structure/display-modes/form
enabled: true
1 change: 1 addition & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module:
block_content: 0
book: 0
breakpoint: 0
cancel_button: 0
ckeditor5: 0
ckeditor5_fullscreen: 0
ckeditor_codemirror: 0
Expand Down
1 change: 1 addition & 0 deletions html/modules/custom/bc_dc/bc_dc.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- bcbb:bcbb_book
- bcbb:bcbb_other
- bcbb:bcbb_search
- cancel_button:cancel_button
- ckeditor5_fullscreen:ckeditor5_fullscreen
- ckeditor_codemirror:ckeditor_codemirror
- clipboardjs:clipboardjs
Expand Down
7 changes: 7 additions & 0 deletions html/modules/custom/bc_dc/bc_dc.install
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ function bc_dc_requirements(string $phase): array {

return $requirements;
}

/**
* Set bc_dc module weight .
*/
function bc_dc_update_8001() {
module_set_weight('bc_dc', 100);
}
3 changes: 3 additions & 0 deletions html/modules/custom/bc_dc/bc_dc.module
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ function bc_dc_form_node_data_set_edit_form_alter(array &$form, FormStateInterfa
if (!isset($form['#validate'])) {
$form['#validate'] = [];
}
if (isset($form['actions']['cancel'])) {
$form['actions']['cancel']['#attributes']['class'][] = 'btn btn-danger';
}
array_unshift($form['#validate'], '_bc_dc_form_node_data_set_edit_form_submit');
}

Expand Down

0 comments on commit 65107b6

Please sign in to comment.