Fixes #155
This commit is contained in:
@@ -70,6 +70,7 @@ class SuppliersController extends AdminController {
|
||||
$supplier->fax = e(Input::get('fax'));
|
||||
$supplier->email = e(Input::get('email'));
|
||||
$supplier->notes = e(Input::get('notes'));
|
||||
$supplier->url = e(Input::get('url'));
|
||||
$supplier->user_id = Sentry::getId();
|
||||
|
||||
// Was it created?
|
||||
@@ -148,6 +149,7 @@ class SuppliersController extends AdminController {
|
||||
$supplier->phone = e(Input::get('phone'));
|
||||
$supplier->fax = e(Input::get('fax'));
|
||||
$supplier->email = e(Input::get('email'));
|
||||
$supplier->url = e(Input::get('url'));
|
||||
$supplier->notes = e(Input::get('notes'));
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddUrlToSupplier extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('suppliers', function($table)
|
||||
{
|
||||
$table->string('url',250)->nullable()->default(NULL);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('suppliers', function($table)
|
||||
{
|
||||
$table->dropColumn('url');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ return array(
|
||||
'state' => 'State',
|
||||
'suppliers' => 'Suppliers',
|
||||
'update' => 'Update Supplier',
|
||||
'url' => 'URL',
|
||||
'view' => 'View Supplier',
|
||||
'view_assets_for' => 'View Assets for',
|
||||
'zip' => 'Postal Code',
|
||||
|
||||
@@ -11,6 +11,7 @@ class Supplier extends Elegant {
|
||||
'fax' => 'alpha_space|min:7',
|
||||
'phone' => 'alpha_space|min:7',
|
||||
'email' => 'email|min:5',
|
||||
'url' => 'url|min:5',
|
||||
);
|
||||
|
||||
public function assets()
|
||||
|
||||
@@ -129,6 +129,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('url') ? ' has-error' : '' }}">
|
||||
<label for="url" class="col-md-3 control-label">@lang('admin/suppliers/table.url')</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="url" id="url" value="{{{ Input::old('url', $supplier->url) }}}" />
|
||||
{{ $errors->first('url', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
|
||||
<label for="notes" class="col-md-3 control-label">@lang('admin/suppliers/table.notes')</label>
|
||||
<div class="col-md-6">
|
||||
@@ -141,6 +150,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
|
||||
@@ -91,12 +91,17 @@
|
||||
<li><i class="icon-print"></i>{{{ $supplier->fax }}}</li>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($supplier->email)
|
||||
<li><i class="icon-envelope-alt"></i><a href="mailto:{{{ $supplier->email }}}">
|
||||
{{{ $supplier->email }}}
|
||||
</a></li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->url)
|
||||
<li><i class="icon-globe"></i><a href="{{{ $supplier->url }}}" target="_new">{{{ $supplier->url }}}</a></li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->address)
|
||||
<li><br>
|
||||
{{{ $supplier->address }}}
|
||||
|
||||
Reference in New Issue
Block a user