Skip to content

Commit

Permalink
Added note about activating user on edit forms + added option to manu…
Browse files Browse the repository at this point in the history
…ally confirm email
  • Loading branch information
AndrewNatoli committed Aug 31, 2016
1 parent 25cae78 commit e967585
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
19 changes: 13 additions & 6 deletions app/Forms/Admin/UsersForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,26 @@ public function buildForm()
'label' => "Nomination Limit (Yearly)"
])

->add('active', 'choice', [
'choices' => ['N' => "No - Deactivated", 'Y' => "Yes - Active"],
'multiple' => false,
'label' => "Account Enabled"
])

->add('phone', 'text', [
'label' => "Phone Number"
])

->add('email', 'email', [
'label' => trans('admin.fields.user.email')
])

->add('confirmed_email', 'choice', [
'choices' => ['N' => "No", 'Y' => "Yes - Confirmed"],
'multiple' => false,
'label' => "Confirmed Email Address"
])

->add('active', 'choice', [
'choices' => ['N' => "No - Deactivated", 'Y' => "Yes - Active"],
'multiple' => false,
'label' => "Account Enabled"
])

->add('password', 'password', [
'label' => trans('admin.fields.user.password'),
'value' => ''
Expand Down
8 changes: 7 additions & 1 deletion resources/views/admin/users/create.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
@extends('layouts.admin')

@section('content')
{!! form($form) !!}
@if (Auth::User()->hasRole("admin"))
<p>
<b>Note: </b> After creating a new user they will need to be activated from the
<a href="{{route('admin.user.pending')}}">pending registrations</a> screen.
</p>
@endif
{!! form($form) !!}
@endsection
6 changes: 6 additions & 0 deletions resources/views/admin/users/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@extends('layouts.admin')

@section('content')
@if (Auth::User()->hasRole("admin"))
<p>
<b>Note: </b> When creating a new user they will need to be activated from the
<a href="{{route('admin.user.pending')}}">pending registrations</a> screen.
</p>
@endif
{!! form($form) !!}
@include('partials.admin.file', ['file'=> $object->picture])
@endsection

0 comments on commit e967585

Please sign in to comment.