Skip to content
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

Next #2094

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from
Draft

Next #2094

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1b405c1
Integrate Web Components (#2032)
cairocoder01 Apr 13, 2023
6a6728e
implements dt-single-select and dt-date (#2044)
micahmills Apr 25, 2023
144e825
Merge 1.40.0 into next (#2060)
cairocoder01 May 5, 2023
623a6ad
implement dt-tags (#2059)
cairocoder01 May 5, 2023
77b3320
Implement dt-connection (#2061)
cairocoder01 May 8, 2023
ff7fc79
implements dt_multi_select (#2065)
micahmills May 15, 2023
f87febc
Merge branch 'master' into next
corsacca Aug 29, 2023
b940bdf
Update components to 0.5.1
corsacca Aug 30, 2023
fd0b612
Missing files.
corsacca Aug 30, 2023
480420a
Merge branch 'master' into next
corsacca Nov 15, 2023
21e14b0
Merge branch 'master' into next
corsacca Dec 13, 2023
1a0b3e6
Merge branch 'master' into next
corsacca Jan 12, 2024
ab21565
Merge branch 'develop' into next
corsacca Mar 25, 2024
dcfa4a9
Merge branch 'refs/heads/develop' into next
corsacca May 22, 2024
d0bbd48
Run prettier and ignore components
corsacca May 22, 2024
868e24d
Web components integration into new contact form (#2450)
Ashima-Arora May 23, 2024
af0d9b4
moves component services to header
micahmills May 28, 2024
06d3fe2
phpcbf fixes
micahmills Jun 5, 2024
f590336
Merge branch 'upstream-develop' into next
micahmills Jun 5, 2024
949d0b8
Edit page components integration fixing (#2510)
Ashima-Arora Jun 21, 2024
f6f3325
Dt-Modal Integration in Dt-Theme on Edit Contact Page (#2528)
Vijenderrr Jul 17, 2024
812231f
Duplicates detected button integration (#2543)
Vijenderrr Jul 26, 2024
22699c0
Integrations of Dt-multiselect-button-group into DT Theme (#2524)
Ashima-Arora Jul 26, 2024
04d01ef
Make button label translatable
micahmills Jul 29, 2024
5f28dbb
Favorite and Follow Button conversion to DT-Button (#2565)
Ashima-Arora Sep 11, 2024
a87507d
Dt dropdown and duplicates detected template integration on edit page…
Vijenderrr Sep 13, 2024
d3c7e0e
Dt users connection integration on edit page (#2570)
Vijenderrr Sep 13, 2024
0f4d0c4
Dt dropdown list item template integration (#2576)
Vijenderrr Sep 25, 2024
8ef881f
New Contact Page - help button field (#2577)
Ashima-Arora Sep 25, 2024
e3aebf7
web components version bump
micahmills Oct 1, 2024
17810d2
web component bump to 0.6.4
micahmills Oct 1, 2024
dd79410
Merge branch 'upstream-develop' into next
micahmills Oct 3, 2024
14e1a86
update web components
micahmills Oct 3, 2024
5299454
hide the duplicate detected button unless there is a duplicate
micahmills Oct 3, 2024
1857ab4
updating web components package
micahmills Oct 4, 2024
13f6e48
DT-List Integration in DT-Theme Contacts List (#2571)
Ashima-Arora Oct 9, 2024
b1aed35
dt-modal integration in DT-Multiselect-Button-Group (#2589)
Vijenderrr Oct 9, 2024
c112e92
Revert "DT-List Integration in DT-Theme Contacts List (#2571)" (#2590)
micahmills Oct 16, 2024
b7bb847
dt-list integration in theme. (#2593)
Vijenderrr Oct 28, 2024
eb243c1
eslint fix
micahmills Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
implements dt_multi_select (#2065)
* Fixes undefined index errors as well as fixes a variable name

* Implemented multi-select

* User IDs were being sent as an integer instead of a string like contact ids when requesting a compact.

Sent same change in PR #2066 for further testing on main branch
  • Loading branch information
micahmills authored May 15, 2023
commit ff7fc7978d37848589df0df13961355dc9000c07
2 changes: 1 addition & 1 deletion dt-contacts/access-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ public function dt_render_field_for_display_template( $post, $field_type, $field
<?php echo esc_html( $icon ) ?>
options="<?php echo esc_attr( json_encode( $options_array ) ) ?>"
value="<?php echo esc_attr( $post[$field_key] ? $post[$field_key]['key'] : '' ) ?>">
<?php dt_render_icon_slot( $fields[$field_key] ) ?>
<?php dt_render_icon_slot( $contact_fields[$field_key] ) ?>
</dt-single-select>

<p>
Expand Down
37 changes: 18 additions & 19 deletions dt-core/global-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ function render_field_for_display( $field_key, $fields, $post, $show_extra_contr
' . esc_html( $disabled ) . '
' . ( $is_private ? 'private privateLabel=' . esc_attr( _x( "Private Field: Only I can see it\'s content", 'disciple_tools' ) ) : null ) . '
';
$supported_web_components = [ 'text', 'key_select', 'date', 'tags', 'connection' ];
$supported_web_components = [ 'text', 'key_select', 'date', 'tags', 'connection', 'multi_select' ];

?>
<?php if ( !in_array( $field_type, $supported_web_components ) ): ?>
Expand Down Expand Up @@ -641,7 +641,7 @@ class="add-link__option"
<dt-single-select
<?php echo wp_kses_post( $shared_attributes ) ?>
options="<?php echo esc_attr( json_encode( $options_array ) ) ?>"
value="<?php echo esc_attr( $post[$field_key] ? $post[$field_key]['key'] : '' ) ?>">
value="<?php echo esc_attr( isset( $post[$field_key] ) ? $post[$field_key]['key'] : '' ) ?>">
<?php dt_render_icon_slot( $fields[$field_key] ) ?>
</dt-single-select>
<?php elseif ( $field_type === 'tags' ) : ?>
Expand All @@ -661,24 +661,23 @@ class="add-link__option"
<?php dt_render_icon_slot( $fields[$field_key] ) ?>
</dt-tags>
<?php elseif ( $field_type === 'multi_select' ) :
if ( isset( $fields[$field_key]['display'] ) && $fields[$field_key]['display'] === 'typeahead' ){
if ( isset( $fields[$field_key]['display'] ) && $fields[$field_key]['display'] === 'typeahead' ){ ?>
<?php
$options_array = $fields[$field_key]['default'];
$options_array = array_map( function( $key, $value ) {
return [
'id' => $key,
'label' => $value['label'],
'color' => $value['color'] ?? null,
];
}, array_keys( $options_array ), $options_array );
?>
<div class="multi_select" id="<?php echo esc_html( $display_field_id ); ?>" >
<var id="<?php echo esc_html( $display_field_id ); ?>-result-container" class="result-container"></var>
<div id="<?php echo esc_html( $display_field_id ); ?>_t" name="form-multi_select" class="scrollable-typeahead typeahead-margin-when-active">
<div class="typeahead__container">
<div class="typeahead__field">
<span class="typeahead__query">
<input class="js-typeahead-<?php echo esc_html( $display_field_id ); ?> input-height"
data-field="<?php echo esc_html( $field_key );?>"
name="<?php echo esc_html( $display_field_id ); ?>[query]"
placeholder="<?php echo esc_html( sprintf( _x( 'Search %s', "Search 'something'", 'disciple_tools' ), $fields[$field_key]['name'] ) )?>"
autocomplete="off" <?php echo esc_html( $disabled ); ?>>
</span>
</div>
</div>
</div>
</div>
<dt-multi-select <?php echo wp_kses_post( $shared_attributes ) ?>
options="<?php echo esc_attr( json_encode( $options_array ) ) ?>"
value="<?php echo esc_attr( isset( $post[$field_key] ) ? json_encode( $post[$field_key] ) : '' ) ?>"
>
<?php dt_render_icon_slot( $fields[$field_key] ) ?>
</dt-multi-select>
<?php } else { ?>
<div class="small button-group" style="display: inline-block">
<?php foreach ( $fields[$field_key]['default'] as $option_key => $option_value ): ?>
Expand Down
6 changes: 3 additions & 3 deletions dt-posts/dt-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ function( $post ) {
continue;
}
$compact[] = [
'ID' => $post->ID,
'ID' => (string) $post->ID,
'name' => wp_specialchars_decode( $post->post_title )
];
}
Expand All @@ -1244,7 +1244,7 @@ function( $post ) {
if ( !in_array( $post_id, $post_ids, true ) ) {
$post_ids[] = $post_id;
$compact[] = [
'ID' => $post_id,
'ID' => (string) $post_id,
'name' => $user['name'],
'user' => true
];
Expand Down Expand Up @@ -1308,7 +1308,7 @@ function( $post ) {
foreach ( $compact as $index => &$p ){
if ( $compact[ $index ]['ID'] === $post->ID ) {
$compact[ $index ] = [
'ID' => $post->ID,
'ID' => (string) $post->ID,
'name' => $post->post_title,
'label' => $label
];
Expand Down