diff --git a/README.md b/README.md index e041cb432762..a6f8f6ab71d5 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Note: you may be prompted for your Github user/pass due to their API limits. composer install -Configure config/database.php and then initialize the database +Configure config/database.php and config/mail.php and initialize the database. php artisan migrate --seed diff --git a/app/models/Product.php b/app/models/Product.php index bf809f998b36..9468928d117d 100755 --- a/app/models/Product.php +++ b/app/models/Product.php @@ -6,12 +6,4 @@ class Product extends EntityModel { return Product::scope()->where('product_key','=',$key)->first(); } - - public static function getProductKeys($products) - { - $products = array_pluck($products, 'product_key'); - $products = array_combine($products, $products); - - return $products; - } } \ No newline at end of file diff --git a/app/views/accounts/product.blade.php b/app/views/accounts/product.blade.php index 49027f7c96d0..6893beac28af 100644 --- a/app/views/accounts/product.blade.php +++ b/app/views/accounts/product.blade.php @@ -13,7 +13,7 @@ {{ Former::populateField('cost', number_format($product->cost, 2)) }} @endif - {{ Former::text('product_key') }} + {{ Former::text('product_key')->label('texts.product') }} {{ Former::textarea('notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") }} {{ Former::text('cost') }} diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index bb2bad076d12..06d8e79f7f70 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -128,7 +128,7 @@ - {{ Former::text('product_key')->useDatalist(Product::getProductKeys($products), 'product_key')->onkeyup('onItemChange()') + {{ Former::text('product_key')->useDatalist($products, 'product_key')->onkeyup('onItemChange()') ->raw()->data_bind("value: product_key, valueUpdate: 'afterkeydown'")->addClass('datalist') }} diff --git a/app/views/public/header.blade.php b/app/views/public/header.blade.php index b7105ad4ff1e..d70dee33480a 100644 --- a/app/views/public/header.blade.php +++ b/app/views/public/header.blade.php @@ -66,8 +66,8 @@ @@ -125,8 +125,8 @@