Skip to content

Commit

Permalink
Move notify user checkbox outside the form
Browse files Browse the repository at this point in the history
On manage user page, the "notify user" checkbox is not part of the user
data, and is only used to trigger a notification if the form is saved.
Move the item outside the form, next to the update button to better
match the context of the action.

Fixes: #21695
  • Loading branch information
cproensa authored and atrol committed Sep 3, 2017
1 parent 141020b commit fa9d727
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lang/strings_english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ $s_account_deleted_msg = 'Account deleted...';
$s_delete_account_sure_msg = 'Are you sure you wish to delete this account?';

# manage_user_edit_page.php
$s_notify_user = 'Notify User';
$s_notify_user = 'Notify user of this change';

# manage_user_prune.php
$s_accounts_pruned_msg = 'All accounts that have never logged in and are older than 1 week have been removed';
Expand Down
20 changes: 8 additions & 12 deletions manage_user_edit_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,6 @@
</label>
</td>
</tr>
<?php
if( config_get( 'enable_email_notification' ) == ON ) { ?>
<tr>
<td class="category"> <?php echo lang_get( 'notify_user' ) ?> </td>
<td>
<label>
<input type="checkbox" class="ace" id="send-email" name="send_email_notification" checked="checked" ?>
<span class="lbl"></span>
</label>
</td>
</tr>
<?php } ?>

<?php event_signal( 'EVENT_MANAGE_USER_UPDATE_FORM', array( $t_user['id'] ) ); ?>

Expand All @@ -219,6 +207,14 @@

<div class="widget-toolbox padding-8 clearfix">
<input type="submit" class="btn btn-primary btn-white btn-round" value="<?php echo lang_get( 'update_user_button' ) ?>" />
<?php
if( config_get( 'enable_email_notification' ) == ON ) { ?>
&nbsp;
<label class="inline">
<input type="checkbox" class="ace" id="send-email" name="send_email_notification" checked="checked">
<span class="lbl"> <?php echo lang_get( 'notify_user' ) ?></span>
</label>
<?php } ?>
</div>
</div>
</div>
Expand Down

0 comments on commit fa9d727

Please sign in to comment.