Skip to content

Commit

Permalink
Fixes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 26, 2013
1 parent 4d1dd1c commit 1295855
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/admin/LocationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function postCreate()
$location->city = e(Input::get('city'));
$location->state = e(Input::get('state'));
$location->country = e(Input::get('country'));
$location->zip = e(Input::get('zip'));
$location->user_id = Sentry::getId();

// Was the asset created?
Expand Down Expand Up @@ -141,6 +142,7 @@ public function postEdit($locationId = null)
$location->city = e(Input::get('city'));
$location->state = e(Input::get('state'));
$location->country = e(Input::get('country'));
$location->zip = e(Input::get('zip'));

// Was the asset created?
if($location->save())
Expand Down
8 changes: 8 additions & 0 deletions app/views/backend/locations/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
</div>
</div>

<div class="control-group {{ $errors->has('zip') ? 'error' : '' }}">
<label class="control-label" for="zip">Postal Code</label>
<div class="controls">
<input class="span2" type="text" name="zip" id="zip" value="{{ Input::old('zip', $location->zip) }}" />
{{ $errors->first('zip', '<span class="help-inline">:message</span>') }}
</div>
</div>

<div class="control-group {{ $errors->has('country') ? 'error' : '' }}">
<label class="control-label" for="state">Country Abbrev</label>
<div class="controls">
Expand Down

0 comments on commit 1295855

Please sign in to comment.