Skip to content

Commit

Permalink
Grey out button pw reset button for consistency
Browse files Browse the repository at this point in the history
When user has no email in their profile, the box is greyed out for
consistency accross all buttons on the user profile
  • Loading branch information
akemidx committed Dec 14, 2022
1 parent fabefa6 commit b114ffd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions resources/views/users/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,16 @@
@endcan

@can('update', $user)
<div class="col-md-12" style="padding-top: 5px;">
@if (($user->activated == '1') && ($user->email != '') && ($user->ldap_import == '0'))
<div class="col-md-12" style="padding-top: 5px;">
<form action="{{ route('users.password',['userId'=> $user->id]) }}" method="POST">
<form action="{{ route('users.password',['userId'=> $user->id]) }}" method="POST">
{{ csrf_field() }}
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('button.send_password_link') }}</button>
</form>
</div>
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print">{{ trans('button.send_password_link') }}</button>
</form>
@elseif(($user->activated == '1') && ($user->ldap_import == '0'))
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">{{ trans('button.send_password_link') }}</button>
@endif
</div>
@endcan

@can('delete', $user)
Expand Down

0 comments on commit b114ffd

Please sign in to comment.