diff --git a/README.md b/README.md
index adfcad8..60e5d80 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,3 @@
## General
- Remove design phase database connection in Schema and Model
-
-## AircraftTypes
-
-- Form Localization
diff --git a/controllers/AircraftTypes.php b/controllers/AircraftType.php
similarity index 90%
rename from controllers/AircraftTypes.php
rename to controllers/AircraftType.php
index b6f427b..2e51b5d 100644
--- a/controllers/AircraftTypes.php
+++ b/controllers/AircraftType.php
@@ -3,7 +3,7 @@
use Backend\Classes\Controller;
use BackendMenu;
-class AircraftTypes extends Controller
+class AircraftType extends Controller
{
public $implement = ['Backend\Behaviors\ListController', 'Backend\Behaviors\FormController'];
diff --git a/controllers/aircrafttypes/_list_toolbar.htm b/controllers/aircrafttype/_list_toolbar.htm
similarity index 93%
rename from controllers/aircrafttypes/_list_toolbar.htm
rename to controllers/aircrafttype/_list_toolbar.htm
index 9cc14c1..9c9c89a 100644
--- a/controllers/aircrafttypes/_list_toolbar.htm
+++ b/controllers/aircrafttype/_list_toolbar.htm
@@ -1,5 +1,5 @@
-
= e(trans('backend::lang.form.create')) ?>
= e(trans('backend::lang.form.or')) ?>
- = e(trans('backend::lang.form.cancel')) ?>
@@ -47,7 +47,7 @@
= e(trans($this->fatalError)) ?>
- = e(trans('backend::lang.form.return_to_list')) ?>
diff --git a/controllers/aircrafttypes/index.htm b/controllers/aircrafttype/index.htm
similarity index 100%
rename from controllers/aircrafttypes/index.htm
rename to controllers/aircrafttype/index.htm
diff --git a/controllers/aircrafttypes/preview.htm b/controllers/aircrafttype/preview.htm
similarity index 85%
rename from controllers/aircrafttypes/preview.htm
rename to controllers/aircrafttype/preview.htm
index f1b6f10..518ba44 100644
--- a/controllers/aircrafttypes/preview.htm
+++ b/controllers/aircrafttype/preview.htm
@@ -1,6 +1,6 @@
@@ -14,7 +14,7 @@
-
+
= e(trans('backend::lang.form.return_to_list')) ?>
diff --git a/controllers/aircrafttypes/update.htm b/controllers/aircrafttype/update.htm
similarity index 95%
rename from controllers/aircrafttypes/update.htm
rename to controllers/aircrafttype/update.htm
index a3c2ec5..b202aaf 100644
--- a/controllers/aircrafttypes/update.htm
+++ b/controllers/aircrafttype/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 @@
= e(trans($this->fatalError)) ?>
- = e(trans('backend::lang.form.return_to_list')) ?>
diff --git a/controllers/aircrafttypes/config_form.yaml b/controllers/aircrafttypes/config_form.yaml
deleted file mode 100644
index d3b4580..0000000
--- a/controllers/aircrafttypes/config_form.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-name: AircraftTypes
-form: $/germanairlinesva/fleet/models/aircrafttype/fields.yaml
-modelClass: GermanAirlinesVa\Fleet\Models\AircraftType
-defaultRedirect: germanairlinesva/fleet/aircrafttypes
-create:
- redirect: 'germanairlinesva/fleet/aircrafttypes/update/:id'
- redirectClose: germanairlinesva/fleet/aircrafttypes
-update:
- redirect: germanairlinesva/fleet/aircrafttypes
- redirectClose: germanairlinesva/fleet/aircrafttypes
diff --git a/lang/en/lang.php b/lang/en/lang.php
index afcf1b8..1b47cb0 100644
--- a/lang/en/lang.php
+++ b/lang/en/lang.php
@@ -17,6 +17,36 @@
'aircraft_type_groups' => [
'comment' => 'Comment Identifying Aircraft Type Group',
],
+ 'aircraft_types' => [
+ 'tabs' => [
+ 'operational' => 'Operational',
+ 'informational' => 'Informational',
+ 'weights' => 'Weights',
+ ],
+ 'aircraft_manufacturer' => 'Aircraft Manufacturer',
+ 'typerating_id' => 'Typerating',
+ 'only_charter' => 'True if Type is Charter Exclusive',
+ 'type' => 'Aircraft Type Specifier',
+ 'simbrief_type' => 'Aircraft Type Specifier for SimBrief',
+ 'aircraft_type_groups' => 'Aircraft Type Group',
+ 'dom' => 'Dry Operating Mass (kg)',
+ 'mpld' => 'Max Payload (kg)',
+ 'mzfm' => 'Max Zero Fuel Mass (kg)',
+ 'fuel_capacity' => 'Fuel Capacity (kg)',
+ 'mtom' => 'Maximum Takeoff Mass (kg)',
+ 'mlam' => 'Maximum Landing Mass (kg)',
+ 'description' => 'Aircraft Type Description',
+ 'wingspan' => 'Aircraft Wingspan (m)',
+ 'length' => 'Aircraft Length (m)',
+ 'cruise_speed' => 'Aircraft Cruise Speed (kph)',
+ 'range' => 'Aircraft Maximum Range (km)',
+ 'engines' => 'Engines Installed',
+ 'max_fl' => 'Maximum Altitude (ft)',
+ 'capacity_flight_crew' => 'Strenght of Flight Crew',
+ 'capacity_cabin_crew' => 'Strength of Cabin Crew',
+ 'capacity_passengers' => 'Maximum Amount of Passengers',
+ 'capacity_cargo' => 'Maximum amount of Cargo (kg)',
+ ],
'menu' => [
'main' => 'GA Fleet',
'manufacturers' => 'Aircraft Manufacturers',
diff --git a/models/AircraftType.php b/models/AircraftType.php
index 317b650..198ae3e 100644
--- a/models/AircraftType.php
+++ b/models/AircraftType.php
@@ -24,7 +24,31 @@ class AircraftType extends Model
/**
* @var array Validation rules
*/
- public $rules = [];
+ public $rules = [
+ 'aircraft_manufacturer' => 'required',
+ 'typerating_id' => 'required',
+ 'only_charter' => 'required',
+ 'type' => 'required',
+ 'simbrief_type' => 'required',
+ 'aircraft_type_groups' => 'required',
+ 'dom' => 'required',
+ 'mpld' => 'required',
+ 'mzfm' => 'required',
+ 'fuel_capacity' => 'required',
+ 'mtom' => 'required',
+ 'mlam' => 'required',
+ 'description' => 'required',
+ 'wingspan' => 'required',
+ 'length' => 'required',
+ 'cruise_speed' => 'required',
+ 'range' => 'required',
+ 'engines' => 'required',
+ 'max_fl' => 'required',
+ 'capacity_flight_crew' => 'required',
+ 'capacity_cabin_crew' => 'required',
+ 'capacity_passengers' => 'required',
+ 'capacity_cargo' => 'required',
+ ];
public $belongsTo = [
'aircraft_manufacturer' => 'GermanAirlinesVa\Fleet\Models\AircraftManufacturer',
diff --git a/models/aircrafttype/fields.yaml b/models/aircrafttype/fields.yaml
index aa22a8b..481a11d 100644
--- a/models/aircrafttype/fields.yaml
+++ b/models/aircrafttype/fields.yaml
@@ -1,145 +1,145 @@
tabs:
fields:
aircraft_manufacturer:
- label: Manufacturer
+ label: 'germanairlinesva.fleet::lang.aircraft_types.aircraft_manufacturer'
nameFrom: name
descriptionFrom: description
span: auto
required: 1
type: relation
- tab: Operational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.operational'
typerating_id:
- label: Typerating
+ label: 'germanairlinesva.fleet::lang.aircraft_types.typerating_id'
span: auto
required: 1
type: number
- tab: Operational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.operational'
only_charter:
- label: 'Charter Only'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.only_charter'
span: auto
required: 1
type: switch
- tab: Operational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.operational'
type:
- label: Type
+ label: 'germanairlinesva.fleet::lang.aircraft_types.type'
span: auto
required: 1
type: text
- tab: Operational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.operational'
simbrief_type:
- label: 'SimBrief Type'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.simbrief_type'
span: auto
required: 1
type: text
- tab: Operational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.operational'
aircraft_type_groups:
- label: 'Aircraft Type Groups'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.aircraft_type_groups'
nameFrom: comment
descriptionFrom: description
span: auto
required: 1
type: relation
- tab: Operational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.operational'
dom:
- label: DOM
+ label: 'germanairlinesva.fleet::lang.aircraft_types.dom'
span: auto
required: 1
type: number
- tab: Weights
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.weights'
mpld:
- label: 'Max Payload'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.mpld'
span: auto
required: 1
type: number
- tab: Weights
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.weights'
mzfm:
- label: 'Max ZFM'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.mzfm'
span: auto
required: 1
type: number
- tab: Weights
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.weights'
fuel_capacity:
- label: 'Fuel Capacity'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.fuel_capacity'
span: auto
required: 1
type: number
- tab: Weights
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.weights'
mtom:
- label: 'Max TOM'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.mtom'
span: auto
required: 1
type: number
- tab: Weights
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.weights'
mlam:
- label: 'Max LAM'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.mlam'
span: auto
required: 1
type: number
- tab: Weights
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.weights'
description:
- label: Description
+ label: 'germanairlinesva.fleet::lang.aircraft_types.description'
size: large
span: auto
required: 1
type: richeditor
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
wingspan:
- label: Wingspan
+ label: 'germanairlinesva.fleet::lang.aircraft_types.wingspan'
span: auto
required: 1
type: text
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
length:
- label: Length
+ label: 'germanairlinesva.fleet::lang.aircraft_types.length'
span: auto
required: 1
type: text
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
cruise_speed:
- label: 'Cruise Speed'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.cruise_speed'
span: auto
required: 1
type: text
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
range:
- label: Range
+ label: 'germanairlinesva.fleet::lang.aircraft_types.range'
span: auto
required: 1
type: text
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
engines:
- label: Engines
+ label: 'germanairlinesva.fleet::lang.aircraft_types.engines'
span: auto
required: 1
type: text
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
max_fl:
- label: 'Max FL'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.max_fl'
span: auto
required: 1
type: number
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
capacity_flight_crew:
- label: 'Flight Crew'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.capacity_flight_crew'
span: auto
required: 1
type: number
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
capacity_cabin_crew:
- label: 'Cabin Crew'
+ label: 'germanairlinesva.fleet::lang.aircraft_types.capacity_cabin_crew'
span: auto
required: 1
type: number
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
capacity_passengers:
- label: Passengers
+ label: 'germanairlinesva.fleet::lang.aircraft_types.capacity_passengers'
span: auto
required: 1
type: number
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'
capacity_cargo:
- label: Cargo
+ label: 'germanairlinesva.fleet::lang.aircraft_types.capacity_cargo'
span: auto
required: 1
type: number
- tab: Informational
+ tab: 'germanairlinesva.fleet::lang.aircraft_types.tabs.informational'