-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SD-345] Implement Ability to Remove Quick Exit from Specific Site Sections #524
Open
sharmasahil
wants to merge
10
commits into
develop
Choose a base branch
from
feature/SD-345-quick-exit
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
327a97f
SD-345 Site specific quick exit change
8b54ea3
Reverted previous update hook
9177200
Merge branch 'develop' into feature/SD-345-quick-exit
MdNadimHossain a8f6867
Fixed review comments
12410bd
updated link (#521)
yeniatencio 2c29afd
[SD-418] add validation delete bulk approver (#527)
yeniatencio ea5bf42
Fix parent field name
5287bda
Changes in field label
de51133
Null check for editing fields
551b1e0
Behat test update
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
config/install/field.field.taxonomy_term.sites.field_show_exit_site_specific.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- field.storage.taxonomy_term.field_show_exit_site_specific | ||
- taxonomy.vocabulary.sites | ||
module: | ||
- options | ||
id: taxonomy_term.sites.field_show_exit_site_specific | ||
field_name: field_show_exit_site_specific | ||
entity_type: taxonomy_term | ||
bundle: sites | ||
label: 'Show Exit Site Specific?' | ||
description: '' | ||
required: false | ||
translatable: false | ||
default_value: { } | ||
default_value_callback: '' | ||
settings: { } | ||
field_type: list_string |
26 changes: 26 additions & 0 deletions
26
config/install/field.storage.taxonomy_term.field_show_exit_site_specific.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- options | ||
- taxonomy | ||
id: taxonomy_term.field_show_exit_site_specific | ||
field_name: field_show_exit_site_specific | ||
entity_type: taxonomy_term | ||
type: list_string | ||
settings: | ||
allowed_values: | ||
- | ||
value: 'yes' | ||
label: 'Yes' | ||
- | ||
value: 'no' | ||
label: 'No' | ||
allowed_values_function: '' | ||
module: options | ||
locked: false | ||
cardinality: 1 | ||
translatable: true | ||
indexes: { } | ||
persist_with_no_fields: false | ||
custom_storage: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(function ($, Drupal) { | ||
|
||
'use strict'; | ||
|
||
Drupal.behaviors.siteQuickExitFields = { | ||
attach: function (context, settings) { | ||
var parent = ($('.taxonomy-term-sites-form #edit-parent')); | ||
var parentVal = parent.val(); | ||
if (parentVal == 0) { | ||
$('.field--name-field-show-exit-site-specific').hide(); | ||
} | ||
else { | ||
$('.field--name-field-site-show-exit-site').hide(); | ||
} | ||
$(parent).change(function() { | ||
var selectedValue = $(this).val(); | ||
if (selectedValue == 0) { | ||
$('#edit-field-show-exit-site-specific option:selected').prop('selected', false); | ||
$('#edit-field-show-exit-site-specific').val('_none'); | ||
$('.field--name-field-show-exit-site-specific').hide(); | ||
$('.field--name-field-site-show-exit-site').show(); | ||
} | ||
else { | ||
$('#edit-field-site-show-exit-site-value').prop('checked', false); | ||
$('.field--name-field-site-show-exit-site').hide(); | ||
$('.field--name-field-show-exit-site-specific').show(); | ||
} | ||
}); | ||
} | ||
}; | ||
})(jQuery, Drupal); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using parent, which is a common jQuery method, use a more descriptive variable name like parentField to avoid confusion.