Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7cdfc18
Removed unused Health Metrics js
jlamanskygitt Jan 22, 2026
a7d765c
Merge branch 'DiscipleTools:develop' into develop
jlamanskygitt Feb 9, 2026
80b8f75
Merge branch 'DiscipleTools:develop' into develop
jlamanskygitt Feb 18, 2026
7410e4a
replaced user management fields w/ dt web components
brady-lamansky-gtt May 21, 2026
788fb0e
Merge branch 'develop' into user-management-fields
brady-lamansky-gtt May 21, 2026
d835dff
fixed lint
brady-lamansky-gtt May 21, 2026
86b423a
fixed gender display
brady-lamansky-gtt May 21, 2026
3b1136f
fixed saving, removed old structure
brady-lamansky-gtt May 28, 2026
b35d413
fixed spacing
brady-lamansky-gtt May 28, 2026
59ff294
fixed loading/saved icons, spacing
brady-lamansky-gtt Jun 4, 2026
0b2f20d
missed prettier
brady-lamansky-gtt Jun 4, 2026
7ee7256
Merge branch 'develop' of https://github.com/DiscipleTools/disciple-t…
brady-lamansky-gtt Jun 12, 2026
894d074
fix: gender blank bug, styling, subassigned dt-connection
brady-lamansky-gtt Jun 12, 2026
07a71f7
reset user mgmt fields before setting new value
cairocoder01 Jun 16, 2026
7f9526c
fixed Contact upgrade
brady-lamansky-gtt Jun 18, 2026
365c92a
prettier
brady-lamansky-gtt Jun 18, 2026
ebd6b8d
fixed optional, password hiding, etc
brady-lamansky-gtt Jun 18, 2026
7add601
Merge branch 'develop' of https://github.com/DiscipleTools/disciple-t…
brady-lamansky-gtt Jun 18, 2026
33a13db
fix: unlinked
brady-lamansky-gtt Jun 22, 2026
fc46300
Fix styling of dt-text with type attribute (override foundation)
cairocoder01 Jun 25, 2026
a7c791e
allow empty workload_status
cairocoder01 Jun 25, 2026
02e5ca3
resolve claude review comments
cairocoder01 Jun 25, 2026
611e02f
fix: Removing a selected contact does not clear window.contact_record…
cairocoder01 Jun 25, 2026
cea3dd3
conditional rendering of optional attributes
cairocoder01 Jun 25, 2026
875d571
remove legacy toggle code
cairocoder01 Jun 25, 2026
3d60f6f
fix: user_modal componentService using prev user_id
brady-lamansky-gtt Jun 25, 2026
b4b7edb
Merge branch 'user-management-fields' of https://github.com/brady-lam…
brady-lamansky-gtt Jun 25, 2026
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
1 change: 1 addition & 0 deletions dt-core/utilities/dt-components.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public static function shared_attributes( $field_key, $fields, $post, $params =
$shared_attributes = '
id="' . esc_attr( $display_field_id ) . '"
name="' . esc_attr( $field_key ) . '"
placeholder="' . esc_attr( $params['placeholder'] ?? '' ) . '"
' . $class . '
' . $label_attr . '
' . esc_html( $post_type ?? '' ) . '
Expand Down
188 changes: 107 additions & 81 deletions dt-users/template-new-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,36 +90,60 @@

<div class="grid-x row gutter-small">
<div class="cell medium-6">
<dl>
<dt><label for="subassigned[query]"><?php esc_html_e( 'Contact to make a user (optional)', 'disciple_tools' ); ?></label></dt>
<dd>
<div class="subassigned details">
<var id="subassigned-result-container" class="result-container subassigned-result-container"></var>
<div id="subassigned_t" name="form-subassigned" class="scrollable-typeahead">
<div class="typeahead__container">
<div class="typeahead__field">
<span class="typeahead__query">
<input id="subassigned[query]" class="js-typeahead-subassigned input-height"
name="subassigned[query]" placeholder="<?php esc_html_e( 'Search multipliers and contacts', 'disciple_tools' ); ?>"
autocomplete="off">
</span>
</div>
<dt-label for="subassigned[query]"><?php esc_html_e( 'Contact to make a user (optional)', 'disciple_tools' ); ?></dt-label>
<div class="subassigned details" style="margin-bottom: 16px;">
<var id="subassigned-result-container" class="result-container subassigned-result-container"></var>
<div id="subassigned_t" name="form-subassigned" class="scrollable-typeahead">
<div class="typeahead__container">
<div class="typeahead__field">
<span class="typeahead__query">
<input id="subassigned[query]" class="js-typeahead-subassigned input-height"
name="subassigned[query]" placeholder="<?php esc_html_e( 'Search multipliers and contacts', 'disciple_tools' ); ?>"
autocomplete="off">
</span>
Comment thread
brady-lamansky-gtt marked this conversation as resolved.
Outdated
</div>
</div>
</div>
</dd>
</dl>
</div>
<div id="contact-result"></div>
<dl>
<dt><label for="eman"><?php esc_html_e( 'Display Name', 'disciple_tools' ); ?></label></dt>
<dd><input type="text" class="input" id="eman" placeholder="<?php esc_html_e( 'Nickname (Display Name)', 'disciple_tools' ); ?>" required autocomplete="off" /> </dd>
<dt><label for="liame"><?php esc_html_e( 'Email', 'disciple_tools' ); ?></label></dt>
<dd><input type="email" class="input" id="liame" placeholder="<?php esc_html_e( 'Email', 'disciple_tools' ); ?>" required autocomplete="off" /> </dd>
<div style="margin-bottom: 16px;">
Comment thread
brady-lamansky-gtt marked this conversation as resolved.
Outdated
<?php DT_Components::render_text( 'emankcin', [
'emankcin' => [
'name' => __( 'Display Name', 'disciple_tools' ),
'type' => 'text',
'default' => '',
]
], [], [ 'placeholder' => __( 'Nickname (Display Name)', 'disciple_tools' ) ] ) ?>
</div>
<div style="margin-bottom: 16px;">
<?php DT_Components::render_text( 'liame', [
'liame' => [
'name' => __( 'Email', 'disciple_tools' ),
'type' => 'text',
'default' => '',
'required' => true,
]
], [], [ 'placeholder' => __( 'Email', 'disciple_tools' ) ] ) ?>
</div>
<div class="hidden-fields" style="display:none">
<dt><label for="emanresu"><?php esc_html_e( 'Username', 'disciple_tools' ); ?></label></dt>
<dd><input type="text" class="input" id="emanresu" placeholder="<?php esc_html_e( 'Username', 'disciple_tools' ); ?>" autocomplete="off" /> </dd>
<dt><label for="drowssap"><?php esc_html_e( 'Password', 'disciple_tools' ); ?></label></dt>
<dd><input type="password" class="input" id="drowssap" placeholder="<?php esc_html_e( 'Password', 'disciple_tools' ); ?>" autocomplete="off" /> </dd>
<div style="margin-bottom: 16px;">
<?php DT_Components::render_text( 'emanresu', [
'emanresu' => [
'name' => __( 'Username', 'disciple_tools' ),
'type' => 'text',
'default' => '',
]
], [], [ 'placeholder' => __( 'Username', 'disciple_tools' ) ] ) ?>
</div>
<div style="margin-bottom: 16px;">
<?php DT_Components::render_text( 'ddrowssap', [
'ddrowssap' => [
'name' => __( 'Password', 'disciple_tools' ),
'type' => 'text',
'default' => '',
]
], [], [ 'placeholder' => __( 'Password', 'disciple_tools' ) ] ) ?>
</div>
</div>
<?php if ( $current_user_can_manage_users ) : ?>
<div id="show-shield-banner" style="text-align: center; background-color:rgb(236, 245, 252);margin: 3px -15px 15px -15px;">
Expand All @@ -131,11 +155,10 @@
</a>
</div>
<?php endif; ?>
<dt><label for="new-user-language-dropdown"><?php esc_html_e( 'Language', 'disciple_tools' ); ?></label></dt>
<dd id="new-user-language-dropdown"></dd>
<dt-label for="new-user-language-dropdown"><?php esc_html_e( 'Language', 'disciple_tools' ); ?></dt-label>
<div id="new-user-language-dropdown" style="margin-bottom: 16px;"></div>
<?php if ( $current_user_can_manage_users ): ?>
<dt><?php esc_html_e( 'Role', 'disciple_tools' ); ?></dt>
<dd>
<dt-label><?php esc_html_e( 'Role', 'disciple_tools' ); ?></dt-label>
<?php
$user_roles = [ 'multiplier' ];
$roles = dt_list_roles( false );
Expand Down Expand Up @@ -167,64 +190,67 @@
<?php endforeach; ?>
</ul>
<p> <a href="https://disciple.tools/docs/roles-introduction/" target="_blank"><?php esc_html_e( 'Click here to see roles documentation', 'disciple_tools' ); ?></a> </p>
</dd>
<?php endif; ?>
</dl>
<button type="submit" class="submit button loader" id="create-user"><?php esc_html_e( 'Create User', 'disciple_tools' ); ?></button>
</div>

<div id="optional-fields" class="cell medium-6 show-for-medium">
<dl>
<dt><label for="first_name"><?php esc_html_e( 'First Name', 'disciple_tools' )?> (<?php esc_html_e( 'optional', 'disciple_tools' )?>)</label></dt>
<dd><input class="input" type="text" class="input" id="first_name" data-optional
name="first_name" placeholder="<?php esc_html_e( 'First Name', 'disciple_tools' )?>" />
</dd>
<dt><label for="last_name"><?php esc_html_e( 'Last Name', 'disciple_tools' )?> (<?php esc_html_e( 'optional', 'disciple_tools' )?>)</label></dt>
<dd><input class="input" type="text" class="input" id="last_name" data-optional name="last_name" placeholder="<?php esc_html_e( 'Last Name', 'disciple_tools' )?>"/></dd>
<dt><label for="gender">
<?php esc_html_e( 'Gender', 'disciple_tools' ) ?> (<?php esc_html_e( 'optional', 'disciple_tools' )?>)
</label></dt>
<dd>
<select class="select-field" id="gender" style="width:auto; display: block" data-optional>
<?php foreach ( $gender_fields['default'] as $option_key => $option_value ): ?>
<option value="<?php echo esc_html( $option_key )?>">
<?php echo esc_html( $option_value['label'] ) ?>
</option>
<?php endforeach; ?>
</select>
</dd>

<?php // site defined fields
foreach ( $dt_user_fields as $dt_field ) {
if ( empty( $dt_field['enabled'] ) ){
continue;
}
?>
<dt>
<label for="<?php echo esc_attr( $dt_field['key'] ) ?>"><?php echo esc_html( $dt_field['label'] ) ?> (<?php esc_html_e( 'optional', 'disciple_tools' )?>)</label>
</dt>
<dd><input type="text"
data-optional
class="input"
id="<?php echo esc_attr( $dt_field['key'] ) ?>"
name="<?php echo esc_attr( $dt_field['key'] ) ?>"
placeholder="<?php echo esc_html( $dt_field['label'] ) ?>"
value=""/>
</dd>
<?php
} // end foreach
<div style="margin-bottom: 16px;">
<?php DT_Components::render_text( 'first_name', [
'first_name' => [
'name' => __( 'First Name (optional)', 'disciple_tools' ),
'type' => 'text',
'default' => '',
]
], [], [ 'placeholder' => __( 'First Name', 'disciple_tools' ) ] ) ?>
</div>
<div style="margin-bottom: 16px;">
<?php DT_Components::render_text( 'last_name', [
'last_name' => [
'name' => __( 'Last Name (optional)', 'disciple_tools' ),
'type' => 'text',
'default' => '',
]
], [], [ 'placeholder' => __( 'Last Name', 'disciple_tools' ) ] ) ?>
</div>
<div style="margin-bottom: 16px;">
<?php DT_Components::render_key_select( 'gender', [
'gender' => [
'name' => __( 'Gender (optional)', 'disciple_tools' ),
'type' => 'key_select',
'default' => $gender_fields['default'],
'select_cannot_be_empty' => true,
]
], [ 'gender' => [ 'key' => 'male' ] ], [] ) ?>
</div>

<?php // site defined fields
foreach ( $dt_user_fields as $dt_field ) {
if ( empty( $dt_field['enabled'] ) ){
continue;
}
?>

<dt><label for="description"><?php esc_html_e( 'Biography', 'disciple_tools' )?> (<?php esc_html_e( 'optional', 'disciple_tools' )?>)</label></dt>
<dd><textarea
type="text" class="input" id="description"
name="description"
placeholder="<?php esc_html_e( 'Biography', 'disciple_tools' )?>"
rows="5"
data-optional
></textarea>
</dd>
</dl>
<div style="margin-bottom: 16px;">
<?php DT_Components::render_text( $dt_field['key'], [
$dt_field['key'] => [
'name' => $dt_field['label'],
'type' => 'text',
'default' => '',
]
], [], [ 'placeholder' => $dt_field['label'], 'data-optional' => true ] ) ?>
</div>
<?php
} // end foreach
?>

<dt-textarea
class="input" id="description"
label="<?php esc_html_e( 'Biography', 'disciple_tools' )?>"
name="description"
placeholder="<?php esc_html_e( 'Biography', 'disciple_tools' )?>"
rows="5"
data-optional
></textarea>
Comment thread
brady-lamansky-gtt marked this conversation as resolved.
Outdated
</div>

</div>
Expand Down
Loading
Loading