FEATURE: add translation to custom field types

This commit is contained in:
Michal Kváček
2016-01-26 22:01:28 +01:00
parent 9930d59c86
commit fedb5abae6
2 changed files with 7 additions and 2 deletions
@@ -2,13 +2,14 @@
namespace App\Http\Controllers\Admin; namespace App\Http\Controllers\Admin;
use App\Enumerations\CustomFieldTypes;
use App\Http\Requests\NewCustomFieldRequest; use App\Http\Requests\NewCustomFieldRequest;
class CreateNewCustomField extends Controller class CreateNewCustomField extends Controller
{ {
public function getNew() public function getNew()
{ {
$types = []; $types = CustomFieldTypes::getWithTranslations();
return view('admin.customFields.new', ['types' => $types]); return view('admin.customFields.new', ['types' => $types]);
} }
+5 -1
View File
@@ -13,5 +13,9 @@ return [
'regExp' => 'Match only this regular expression', 'regExp' => 'Match only this regular expression',
'minLength' => 'Minimum length', 'minLength' => 'Minimum length',
'maxLength' => 'Maximum length', 'maxLength' => 'Maximum length',
'createNew' => 'Create new field' 'createNew' => 'Create new field',
'date' => 'Date',
'number' => 'Number',
'selectboxList' => 'List (selectbox)',
'string' => 'Short text'
]; ];