Skip to content

Instantly share code, notes, and snippets.

View fmfpereira's full-sized avatar

Filipe Pereira fmfpereira

View GitHub Profile
@fmfpereira
fmfpereira / linked_field-8.x-1.x-dev.patch
Created October 28, 2019 00:32
Fix issue with destination as an array for layout builder.
diff --git a/linked_field.module b/linked_field.module
index 1bbcb82..4d513ad 100644
--- a/linked_field.module
+++ b/linked_field.module
@@ -349,6 +349,11 @@ function linked_field_entity_display_build_alter(&$build, $context) {
// Normalize the settings.
$destination = isset($settings['destination']) ? $settings['destination'] : FALSE;
+ // Fix issue with destination as an array for layout builder.
+ if (is_array($destination)) {
@fmfpereira
fmfpereira / tfa-8.x-1.0-alpha4.patch
Last active September 17, 2019 08:28
Update TFA help text to be translatable and allow to translate settings
diff --git a/config/schema/tfa.schema.yml b/config/schema/tfa.schema.yml
index 0b52d63..483335a 100644
--- a/config/schema/tfa.schema.yml
+++ b/config/schema/tfa.schema.yml
@@ -62,7 +62,7 @@ tfa.settings:
type: integer
label: 'TFA Flood Threshold'
help_text:
- type: string
+ type: label
@fmfpereira
fmfpereira / show-first-tab-on-form-error-field-group-8.x-1.0.patch
Created October 10, 2018 10:33
#DRUPAL#8#PATCH# Open first field group tab on form element error.
diff --git a/formatters/tabs/tabs.js b/formatters/tabs/tabs.js
index c2c5b5d3..3a652060 100644
--- a/formatters/tabs/tabs.js
+++ b/formatters/tabs/tabs.js
@@ -15,7 +15,7 @@
// Add required fields mark to any element containing required fields
var direction = group_info.settings.direction;
- $(context).find('[data-' + direction + '-tabs-panes] details').once('fieldgroup-effects').each(function () {
+ $($(context).find('[data-' + direction + '-tabs-panes] details').once('fieldgroup-effects').get().reverse()).each(function () {
@fmfpereira
fmfpereira / gist:4186d4e40b09b2b49f2a4c91576be78c
Created December 18, 2017 18:02
Remove uuid, _core and default_config_hash from Drupal 8.x profile install config files.
sed -i "/^uuid:/d;/^_core:/d;/^ default_config_hash:/d" *