diff --git a/README.md b/README.md index 5b6300c..adfcad8 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,3 @@ ## AircraftTypes - Form Localization - -## Aircraft Type Groups - -- Form Localization diff --git a/controllers/AircraftTypeGroups.php b/controllers/AircraftTypeGroup.php similarity index 89% rename from controllers/AircraftTypeGroups.php rename to controllers/AircraftTypeGroup.php index e8818f8..5e5e377 100644 --- a/controllers/AircraftTypeGroups.php +++ b/controllers/AircraftTypeGroup.php @@ -3,7 +3,7 @@ use Backend\Classes\Controller; use BackendMenu; -class AircraftTypeGroups extends Controller +class AircraftTypeGroup extends Controller { public $implement = ['Backend\Behaviors\ListController', 'Backend\Behaviors\FormController']; diff --git a/controllers/aircraft/config_list.yaml b/controllers/aircraft/config_list.yaml index 73350a1..cf2ecaa 100644 --- a/controllers/aircraft/config_list.yaml +++ b/controllers/aircraft/config_list.yaml @@ -1,6 +1,6 @@ list: $/germanairlinesva/fleet/models/aircraft/columns.yaml modelClass: GermanAirlinesVa\Fleet\Models\Aircraft -title: Aircraft +title: Aircrafts noRecordsMessage: 'backend::lang.list.no_records' showSetup: true showCheckboxes: true diff --git a/controllers/aircrafttypegroups/_list_toolbar.htm b/controllers/aircrafttypegroup/_list_toolbar.htm similarity index 93% rename from controllers/aircrafttypegroups/_list_toolbar.htm rename to controllers/aircrafttypegroup/_list_toolbar.htm index 5fb5cc0..33f8678 100644 --- a/controllers/aircrafttypegroups/_list_toolbar.htm +++ b/controllers/aircrafttypegroup/_list_toolbar.htm @@ -1,5 +1,5 @@
- = e(trans('backend::lang.form.return_to_list')) ?>
diff --git a/controllers/aircrafttypegroups/index.htm b/controllers/aircrafttypegroup/index.htm similarity index 100% rename from controllers/aircrafttypegroups/index.htm rename to controllers/aircrafttypegroup/index.htm diff --git a/controllers/aircrafttypegroups/preview.htm b/controllers/aircrafttypegroup/preview.htm similarity index 90% rename from controllers/aircrafttypegroups/preview.htm rename to controllers/aircrafttypegroup/preview.htm index ded0d8f..d6a35b2 100644 --- a/controllers/aircrafttypegroups/preview.htm +++ b/controllers/aircrafttypegroup/preview.htm @@ -1,6 +1,6 @@
= e(trans('backend::lang.form.return_to_list')) ?>
diff --git a/controllers/aircrafttypegroups/update.htm b/controllers/aircrafttypegroup/update.htm
similarity index 94%
rename from controllers/aircrafttypegroups/update.htm
rename to controllers/aircrafttypegroup/update.htm
index 2c7eb86..8909a31 100644
--- a/controllers/aircrafttypegroups/update.htm
+++ b/controllers/aircrafttypegroup/update.htm
@@ -1,6 +1,6 @@
-
@@ -44,7 +44,7 @@
= e(trans('backend::lang.form.or')) ?>
- = e(trans('backend::lang.form.cancel')) ?>
@@ -55,7 +55,7 @@
diff --git a/controllers/aircrafttypegroups/config_form.yaml b/controllers/aircrafttypegroups/config_form.yaml
deleted file mode 100644
index 4eaca4c..0000000
--- a/controllers/aircrafttypegroups/config_form.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-name: AircraftTypeGroups
-form: $/germanairlinesva/fleet/models/aircrafttypegroup/fields.yaml
-modelClass: GermanAirlinesVa\Fleet\Models\AircraftTypeGroup
-defaultRedirect: germanairlinesva/fleet/aircrafttypegroups
-create:
- redirect: 'germanairlinesva/fleet/aircrafttypegroups/update/:id'
- redirectClose: germanairlinesva/fleet/aircrafttypegroups
-update:
- redirect: germanairlinesva/fleet/aircrafttypegroups
- redirectClose: germanairlinesva/fleet/aircrafttypegroups
diff --git a/lang/en/lang.php b/lang/en/lang.php
index 48dc683..afcf1b8 100644
--- a/lang/en/lang.php
+++ b/lang/en/lang.php
@@ -14,6 +14,9 @@
'name' => 'Aircraft Name',
'home_base' => 'Aircraft Home Base',
],
+ 'aircraft_type_groups' => [
+ 'comment' => 'Comment Identifying Aircraft Type Group',
+ ],
'menu' => [
'main' => 'GA Fleet',
'manufacturers' => 'Aircraft Manufacturers',
diff --git a/models/AircraftTypeGroup.php b/models/AircraftTypeGroup.php
index 6ab4f57..a7c968a 100644
--- a/models/AircraftTypeGroup.php
+++ b/models/AircraftTypeGroup.php
@@ -24,7 +24,9 @@ class AircraftTypeGroup extends Model
/**
* @var array Validation rules
*/
- public $rules = [];
+ public $rules = [
+ 'comment' => 'required',
+ ];
public $belongsToMany = [
'aircraft_types' => 'GermanAirlinesVa\Fleet\Models\AircraftType',
diff --git a/models/aircrafttypegroup/fields.yaml b/models/aircrafttypegroup/fields.yaml
index abb53a9..bee7fe8 100644
--- a/models/aircrafttypegroup/fields.yaml
+++ b/models/aircrafttypegroup/fields.yaml
@@ -1,5 +1,5 @@
fields:
comment:
- label: Comment
+ label: 'germanairlinesva.fleet::lang.aircraft_type_groups.comment'
span: auto
type: text