Skip to content

Commit

Permalink
[NF] Add config option IXP_FE_USER_HIDE_MOBILE (inex#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
listerr authored Dec 22, 2022
1 parent 131ccc3 commit b75bb8b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions config/ixp_fe.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,17 @@
'default_graph_period' => env( 'IXP_FE_ADMIN_DASHBOARD_DEFAULT_GRAPH_PERIOD', 'week' ),
],

/*
|--------------------------------------------------------------------------
| User Edit
|--------------------------------------------------------------------------
|
*/
'user' => [
'hide_mobile' => env( 'IXP_FE_USER_HIDE_MOBILE', false ),
],


/*
|--------------------------------------------------------------------------
| Login History
Expand Down
4 changes: 3 additions & 1 deletion resources/views/user/edit.foil.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@
<?= Former::hidden( 'disabled' ) ?>
<?php endif; ?>

<?php if( !config( 'ixp_fe.user.hide_mobile') ): ?>

<?= Former::text( 'authorisedMobile' )
->label( 'Mobile' )
->placeholder( config( 'ixp_fe.customer.form.placeholders.phone' ) )
->blockHelp( "The user's mobile phone number." )
->disabled( $t->user ? ( !$isSuperUser && $auth->id !== $t->user->id ? true : false ) : $t->disableInputs);
?>

<?php endif; ?>

<?php if( $isSuperUser && $t->user ): ?>
<?= Former::actions(
Expand Down

0 comments on commit b75bb8b

Please sign in to comment.