Skip to content

Commit

Permalink
Merge branch 'release/0.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewNatoli committed Aug 31, 2016
2 parents 201e65c + 1267a9f commit 13f6a2a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 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
7 changes: 4 additions & 3 deletions app/Http/Controllers/Auth/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

function appropriate_email_domains() {
return [
"CMPD" => "cmpd.org",
"CMS" => "cms.k12.nc.us",
"CFD" => "ci.charlotte.nc.us"
"CMPD" => "cmpd.org",
"CMS" => "cms.k12.nc.us",
"CFD" => "ci.charlotte.nc.us",
"CFC" => "codeforcharlotte.org"
];
}

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 13f6a2a

Please sign in to comment.