diff --git a/CHANGELOG.md b/CHANGELOG.md
index a6d2f16ed..e419ff0b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+* **Build 15x** (2014-10-x)
+ - Added twig filters `|trans` for `Lang::get(...)` and `|transchoice` for `Lang::choice(...)`.
+
* **Build 153** (2014-10-09)
- Plugins are now updated in order of their dependency definitions.
- Moved `ViewMaker` trait now lives under system, it can be useful for Models too.
diff --git a/modules/backend/assets/js/october.inspector.js b/modules/backend/assets/js/october.inspector.js
index 88d4d13b9..a4baa7f33 100644
--- a/modules/backend/assets/js/october.inspector.js
+++ b/modules/backend/assets/js/october.inspector.js
@@ -587,7 +587,7 @@
// DROPDOWN EDITOR
// ==================
-
+
var InspectorEditorDropdown = function(editorId, inspector, fieldDef) {
this.inspector = inspector
this.fieldDef = fieldDef
diff --git a/modules/backend/behaviors/FormController.php b/modules/backend/behaviors/FormController.php
index d03fbe204..c4de44f9c 100644
--- a/modules/backend/behaviors/FormController.php
+++ b/modules/backend/behaviors/FormController.php
@@ -108,6 +108,17 @@ class FormController extends ControllerBehavior
if ($this->controller->isClassExtendedWith('Backend.Behaviors.RelationController')) {
$this->controller->initRelation($model);
}
+
+ $this->prepareVars($model);
+ }
+
+ /**
+ * Prepares common form data
+ */
+ protected function prepareVars($model)
+ {
+ $this->controller->vars['formModel'] = $model;
+ $this->controller->vars['formRecordName'] = Lang::get($this->getConfig('name', 'backend::lang.model.name'));
}
//
@@ -129,7 +140,6 @@ class FormController extends ControllerBehavior
);
$model = $this->controller->formCreateModelObject();
$this->initForm($model);
-
$this->controller->vars['formModel'] = $model;
} catch (Exception $ex) {
$this->controller->handleError($ex);
@@ -184,7 +194,7 @@ class FormController extends ControllerBehavior
);
$model = $this->controller->formFindModelObject($recordId);
$this->initForm($model);
-
+
$this->controller->vars['formModel'] = $model;
} catch (Exception $ex) {
$this->controller->handleError($ex);
@@ -262,7 +272,7 @@ class FormController extends ControllerBehavior
);
$model = $this->controller->formFindModelObject($recordId);
$this->initForm($model);
-
+
$this->controller->vars['formModel'] = $model;
} catch (Exception $ex) {
$this->controller->handleError($ex);
@@ -368,10 +378,10 @@ class FormController extends ControllerBehavior
{
$name = $this->getConfig($name, $default);
$vars = [
- 'name' => Lang::get($this->getConfig('name', trans('backend::lang.model.name')))
+ 'name' => Lang::get($this->getConfig('name', 'backend::lang.model.name'))
];
$vars = array_merge($vars, $extras);
- return trans($name, $vars);
+ return Lang::get($name, $vars);
}
//
diff --git a/modules/backend/behaviors/ListController.php b/modules/backend/behaviors/ListController.php
index 36ab6823f..67ac8d2e5 100644
--- a/modules/backend/behaviors/ListController.php
+++ b/modules/backend/behaviors/ListController.php
@@ -289,6 +289,19 @@ class ListController extends ControllerBehavior
return $this->listWidgets[$definition]->onRefresh();
}
+ /**
+ * Returns the widget used by this behavior.
+ * @return Backend\Classes\WidgetBase
+ */
+ public function listGetWidget($definition = null)
+ {
+ if (!$definition) {
+ $definition = $this->primaryDefinition;
+ }
+
+ return array_get($this->listWidgets, $definition);
+ }
+
//
// Overrides
//
diff --git a/modules/backend/classes/AuthManager.php b/modules/backend/classes/AuthManager.php
index 66f2645f6..bf84a20cf 100644
--- a/modules/backend/classes/AuthManager.php
+++ b/modules/backend/classes/AuthManager.php
@@ -27,7 +27,7 @@ class AuthManager extends RainAuthManager
// Permission management
//
- static $permissionDefaults = [
+ protected static $permissionDefaults = [
'code' => null,
'label' => null,
'comment' => null,
diff --git a/modules/backend/classes/NavigationManager.php b/modules/backend/classes/NavigationManager.php
index 7f9d284ea..26b20e1ab 100644
--- a/modules/backend/classes/NavigationManager.php
+++ b/modules/backend/classes/NavigationManager.php
@@ -30,7 +30,7 @@ class NavigationManager
protected $contextMainMenuItemCode;
protected $contextSideMenuItemCode;
- static $mainItemDefaults = [
+ protected static $mainItemDefaults = [
'code' => null,
'label' => null,
'icon' => null,
@@ -40,7 +40,7 @@ class NavigationManager
'sideMenu' => []
];
- static $sideItemDefaults = [
+ protected static $sideItemDefaults = [
'code' => null,
'label' => null,
'icon' => null,
diff --git a/modules/backend/lang/de/lang.php b/modules/backend/lang/de/lang.php
index 833d46a3a..2ec49f439 100644
--- a/modules/backend/lang/de/lang.php
+++ b/modules/backend/lang/de/lang.php
@@ -163,8 +163,8 @@ return [
'select_placeholder' => 'Bitte auswählen',
'insert_row' => 'Reihe einfügen',
'delete_row' => 'Reihe löschen',
- 'concurrency-file-changed-title' => 'Datei wurde geändert',
- 'concurrency-file-changed-description' => 'Die Datei, welche Sie bearbeiten, wurde auf von einem anderen Benutzer geändert. Sie können die Datei entweder erneut laden, wodurch Ihre Änderungen verloren gehen oder Sie überschreiben die Datei auf dem Server',
+ 'concurrency_file_changed_title' => 'Datei wurde geändert',
+ 'concurrency_file_changed_description' => 'Die Datei, welche Sie bearbeiten, wurde auf von einem anderen Benutzer geändert. Sie können die Datei entweder erneut laden, wodurch Ihre Änderungen verloren gehen oder Sie überschreiben die Datei auf dem Server',
'reload' => 'Erneut laden',
],
'relation' => [
diff --git a/modules/backend/lang/en/lang.php b/modules/backend/lang/en/lang.php
index 4442ad9f0..2243df5f3 100644
--- a/modules/backend/lang/en/lang.php
+++ b/modules/backend/lang/en/lang.php
@@ -139,14 +139,18 @@ return [
'missing_model' => 'Form behavior used in :class does not have a model defined.',
'missing_definition' => "Form behavior does not contain a field for ':field'.",
'not_found' => 'Form record with an ID of :id could not be found.',
+ 'action_confirm' => "Are you sure?",
'create' => 'Create',
'create_and_close' => 'Create and close',
'creating' => 'Creating...',
+ 'creating_name' => 'Creating :name...',
'save' => 'Save',
'save_and_close' => 'Save and close',
'saving' => 'Saving...',
+ 'saving_name' => 'Saving :name...',
'delete' => 'Delete',
'deleting' => 'Deleting...',
+ 'deleting_name' => 'Deleting :name...',
'undefined_tab' => 'Misc',
'field_off' => 'Off',
'field_on' => 'On',
@@ -154,6 +158,8 @@ return [
'apply' => 'Apply',
'cancel' => 'Cancel',
'close' => 'Close',
+ 'confirm' => 'Confirm',
+ 'reload' => 'Reload',
'ok' => 'OK',
'or' => 'or',
'confirm_tab_close' => 'Do you really want to close the tab? Unsaved changes will be lost.',
@@ -165,16 +171,15 @@ return [
'select_placeholder' => 'please select',
'insert_row' => 'Insert Row',
'delete_row' => 'Delete Row',
- 'concurrency-file-changed-title' => 'File was changed',
- 'concurrency-file-changed-description' => 'The file you\'re editing has been changed on disk by another user. You can either reload the file and lose your changes or override the file on the disk.',
- 'reload' => 'Reload',
+ 'concurrency_file_changed_title' => "File was changed",
+ 'concurrency_file_changed_description' => "The file you're editing has been changed on disk by another user. You can either reload the file and lose your changes or override the file on the disk.",
],
'relation' => [
'missing_definition' => "Relation behavior does not contain a definition for ':field'.",
'missing_model' => "Relation behavior used in :class does not have a model defined.",
'invalid_action_single' => "This action cannot be performed on a singular relationship.",
'invalid_action_multi' => "This action cannot be performed on a multiple relationship.",
- 'help' => "Click on an item to add",
+ 'help' => "Click on an item to add",
'related_data' => "Related :name data",
'add' => "Add",
'add_selected' => "Add selected",
diff --git a/modules/backend/lang/es-ar/lang.php b/modules/backend/lang/es-ar/lang.php
new file mode 100644
index 000000000..2577371be
--- /dev/null
+++ b/modules/backend/lang/es-ar/lang.php
@@ -0,0 +1,254 @@
+ [
+ 'invalid_type' => 'El tipo de campo utilizado es inválido :type.',
+ 'options_method_not_exists' => 'El modelo clase: model debe definir un método: method() opciones recurrentes para el ":field" desde campo.',
+ ],
+ 'widget' => [
+ 'not_registered' => "La clase del modulo ':name' no ha sido registrada",
+ 'not_bound' => "El módulo con la clase ':name' no se ha unido al controlador",
+ ],
+ 'page' => [
+ 'untitled' => "Sin título",
+ 'access_denied' => [
+ 'label' => "Acceso denegado",
+ 'help' => "Usted no tiene los permisos necesarios para ver esta página.",
+ 'cms_link' => "Regresar al Back-end",
+ ],
+ ],
+ 'partial' => [
+ 'not_found' => "El parcial ':name' no se encuentra.",
+ ],
+ 'account' => [
+ 'sign_out' => 'Salir',
+ 'login' => 'Entrar',
+ 'reset' => 'Reiniciar',
+ 'restore' => 'Restaurar',
+ 'login_placeholder' => 'Usuario',
+ 'password_placeholder' => 'Contraseña',
+ 'forgot_password' => "Olvido su contraseña?",
+ 'enter_email' => "Ingrese su email",
+ 'enter_login' => "Ingrese su usuario",
+ 'email_placeholder' => "email",
+ 'enter_new_password' => "Ingrese una nueva contraseña",
+ 'password_reset' => "Reiniciar contraseña",
+ 'restore_success' => "Le hemos enviado un email con la nueva contraseña.",
+ 'restore_error' => "El usuario no es válido ':login'",
+ 'reset_success' => "Su contraseña fue correctamente reseteada.",
+ 'reset_error' => "La contraseña es inválida. Por favor, intente otra vez!",
+ 'reset_fail' => "No se puede reiniciar su contraseña!",
+ 'apply' => 'Aplicar',
+ 'cancel' => 'Cancelar',
+ 'delete' => 'Borrar',
+ 'ok' => 'OK',
+ ],
+ 'dashboard' => [
+ 'menu_label' => 'Tablero',
+ 'widget_label' => 'Modulo',
+ 'widget_width' => 'Ancho',
+ 'full_width' => 'Ancho completo',
+ 'add_widget' => 'Agregar módulo',
+ 'widget_inspector_title' => 'Configurar módulo',
+ 'widget_inspector_description' => 'Configure el módulo de informe',
+ 'widget_columns_label' => 'Ancho :columnas',
+ 'widget_columns_description' => 'El ancho del módulo, un número entre 1 y 10.',
+ 'widget_columns_error' => 'Por favor introduce el ancho del modulo, un número entre 1 y 10.',
+ 'columns' => '{1} columna|[2,Inf] columnas',
+ 'widget_new_row_label' => 'Forzar nueva fila',
+ 'widget_new_row_description' => 'Coloca el módulo en una nueva fila.',
+ 'widget_title_label' => 'Título del módulo',
+ 'widget_title_error' => 'El título del módulo es requerido.',
+ 'status' => [
+ 'widget_title_default' => 'Estado del sistema',
+ 'online' => 'online',
+ 'update_available' => '{0} actualizaciones disponibles!|{1} actualizaciones disponibles!|[2,Inf] actualizaciones disponibles!',
+ ]
+ ],
+ 'user' => [
+ 'name' => 'Administrador',
+ 'menu_label' => 'Administradores',
+ 'menu_description' => 'Gestionar back-end de administrador de usuarios, grupos y permisos.',
+ 'list_title' => 'Gestionar Administradores',
+ 'new' => 'Nuevo Administrador',
+ 'login' => "Acceso",
+ 'first_name' => "Nombre",
+ 'last_name' => "Apellido",
+ 'full_name' => "Nombre completo",
+ 'email' => "Email",
+ 'groups' => "Grupos",
+ 'groups_comment' => "Especifique a qué grupos pertenece esta persona.",
+ 'avatar' => "Avatar",
+ 'password' => "Contraseña",
+ 'password_confirmation' => "Confirmar contraseña",
+ 'superuser' => "Super Administrador",
+ 'superuser_comment' => "Marque esta casilla para permitir que esta persona tenga acceso a todas las áreas.",
+ 'send_invite' => 'Enviar invitación por email',
+ 'send_invite_comment' => 'Utilice esta casilla de verificación para enviar una invitación al usuario por emai',
+ 'delete_confirm' => '¿Realmente desea eliminar este administrador?',
+ 'return' => 'Regresar a la lista de administradorest',
+ 'allow' => 'Permitir',
+ 'inherit' => 'Heredar',
+ 'deny' => 'Denegar',
+ 'group' => [
+ 'name' => 'Grupo',
+ 'name_field' => 'Nombre',
+ 'menu_label' => 'Grupos',
+ 'list_title' => 'Gestionar Grupos',
+ 'new' => 'Nuevo Grupo',
+ 'delete_confirm' => '¿Realmente desea eliminar este grupo de administradores?',
+ 'return' => 'Regresar a la lista de grupos',
+ ],
+ 'preferences' => [
+ 'not_authenticated' => 'No existe un usuario autenticado para cargar o guardar las preferencias para.'
+ ]
+ ],
+ 'list' => [
+ 'default_title' => 'Lista',
+ 'search_prompt' => 'Buscar...',
+ 'no_records' => 'No hay registros en esta lista',
+ 'missing_model' => 'El comportamiento de lista utilizado en :class no tiene un modelo definido.',
+ 'missing_column' => 'No hay definiciones de columna para :columns.',
+ 'missing_columns' => 'Lista utilizada en :class no tiene lista de columnas definidas.',
+ 'missing_definition' => "Comportamiento de lista no contiene una columna para ':field'.",
+ 'behavior_not_ready' => 'Comportamiento de lista no se ha inicializado, compruebe que ha llamado makeLists() en el controlador.',
+ 'invalid_column_datetime' => "Columna valor ':column' no es un objeto DateTime, has perdido la referencia \$dates en el Modelo?",
+ 'pagination' => 'Registros que se muestran: :from-:to de :total',
+ 'prev_page' => 'Página anterior',
+ 'next_page' => 'Página siguiente',
+ 'loading' => 'Cargando...',
+ 'setup_title' => 'Configuración de la lista',
+ 'setup_help' => 'Utilice las casillas de verificación para seleccionar las columnas que desea ver en la lista. Usted puede cambiar la posición de las columnas arrastrándolas hacia arriba o hacia abajo.',
+ 'records_per_page' => 'Registros por página',
+ 'records_per_page_help' => 'Seleccione el número de registros por página para mostrar. Tenga en cuenta que un alto número de registros en una sola página puede reducir el rendimiento.',
+ ],
+ 'fileupload' => [
+ 'attachment' => 'Adjunto',
+ 'help' => 'Añadir un título y una descripción para este Adjunto..',
+ 'title_label' => 'Título',
+ 'description_label' => 'Descripción'
+ ],
+
+ 'form' => [
+ 'create_title' => "Nuevo :name",
+ 'update_title' => "Editar :name",
+ 'preview_title' => "Vista previa :name",
+ 'create_success' => ':name ha sido creado con éxito',
+ 'update_success' => ':name se ha actualizado correctamente',
+ 'delete_success' => ':name se ha eliminado correctamente',
+ 'missing_id' => "El formulario de registro de identificación no se ha especificado.",
+ 'missing_model' => 'El comportamiento del formulario utilizado en :class no tiene un modelo definido.',
+ 'missing_definition' => "El comportamiento de formulario no contiene un campo para':field'.",
+ 'not_found' => 'El registro de formulario con el ID :id no se pudo encontrar.',
+ 'create' => 'Crear',
+ 'create_and_close' => 'Crear y cerrar',
+ 'creating' => 'Creando...',
+ 'save' => 'Guardar',
+ 'save_and_close' => 'Guardar y cerrar',
+ 'saving' => 'Guardando...',
+ 'delete' => 'Borrar',
+ 'deleting' => 'Borrando...',
+ 'undefined_tab' => 'Misc',
+ 'field_off' => 'Off',
+ 'field_on' => 'On',
+ 'add' => 'Agregar',
+ 'apply' => 'Aplicar',
+ 'cancel' => 'Cancelar',
+ 'close' => 'Cerrar',
+ 'ok' => 'OK',
+ 'or' => 'o',
+ 'confirm_tab_close' => '¿Realmente desea cerrar la cuenta? Se perderán los cambios no guardados.',
+ 'behavior_not_ready' => 'Favor compruebe que ha llamado a la funcion initForm() en el controlador.',
+ 'preview_no_files_message' => 'Los archivos no fueron cargados',
+ 'select' => 'Seleccionar',
+ 'select_all' => 'Todo',
+ 'select_none' => 'Nada',
+ 'select_placeholder' => 'Seleccione',
+ 'insert_row' => 'Insertar fila',
+ 'delete_row' => 'Eliminar fila',
+ 'concurrency-file-changed-title' => 'El archivo fue cambiado',
+ 'concurrency-file-changed-description' => 'El archivo que usted se encuentra editando fue cambiado editado por otro usuario. Usted puede recargar el archivo y perder los cambios o sobreescribir el archivo en el disco.',
+ 'reload' => 'Recargar',
+ ],
+ 'relation' => [
+ 'missing_definition' => "Relación comportamiento no contiene una definición para ':field'.",
+ 'missing_model' => "Relación comportamiento utilizado en :class no tiene un modelo definido.",
+ 'invalid_action_single' => "Esta acción no se puede realizar en una relación singular.",
+ 'invalid_action_multi' => "Esta acción no se puede realizar en una relación múltiple.",
+ 'help' => "Haga clic en un elemento para añadir.",
+ 'related_data' => "Relacionar :name datos",
+ 'add' => "Agregar",
+ 'add_selected' => "Agregar seleccionado",
+ 'add_a_new' => "Agregar un nuevo :name",
+ 'cancel' => "Cancelar",
+ 'add_name' => "Agregar :name",
+ 'create' => "Crear",
+ 'create_name' => "Crear :name",
+ 'update' => "Actualizar",
+ 'update_name' => "Actualizar :name",
+ 'remove' => "Remover",
+ 'remove_name' => "Remover :name",
+ 'delete' => "Borrar",
+ 'delete_name' => "Borrar :name",
+ 'delete_confirm' => "¿Está usted seguro?",
+ ],
+ 'model' => [
+ 'name' => "Modelo",
+ 'not_found' => "Modelo ':class' con el ID :id no se pudo encontrar",
+ 'missing_id' => "No se ha especificado un ID para encontrar el modelo guardado.",
+ 'missing_relation' => "Modelo ':class' no contiene una definición para ':relation'.",
+ 'invalid_class' => "Modelo :model utilizado en :class no es váildo, este debería heredar la clase del \Model.",
+ 'mass_assignment_failed' => "Asignación masiva falló para el atributo del Modelo ':attribute'.",
+ ],
+ 'warnings' => [
+ 'tips' => 'Consejos de configuración del sistema',
+ 'tips_description' => 'Hay problemas que necesitan de su atención para configurar el sistema correctamente.',
+ 'permissions' => 'Directorio :name o los subdirectorios no se puede escribir por PHP. Por favor establecer los permisos correctos para el servidor web en este directorio.',
+ 'extension' => 'La extensión PHP :name no está instalada. Por favor instalar esta librería y activar la extensión.'
+ ],
+ 'editor' => [
+ 'menu_label' => 'Preferencias del Editor de Código',
+ 'menu_description' => 'Configurar las preferencias del editor de código, como el tamaño de la letra y el color del esquema.',
+ 'font_size' => 'Tamaño de la letra',
+ 'tab_size' => '>Tamaño de la Solapa',
+ 'use_hard_tabs' => 'Espacio entre solapas',
+ 'code_folding' => 'Código Plegable',
+ 'word_wrap' => 'Ajuste de línea',
+ 'highlight_active_line' => 'Resaltar línea activa',
+ 'show_invisibles' => 'Mostrar caracteres invisibles',
+ 'show_gutter' => 'Mostrar canal',
+ 'theme' => 'Color del esquema',
+ ],
+ 'tooltips' => [
+ 'preview_website' => 'Vista previa de la página web'
+ ],
+ 'mysettings' => [
+ 'menu_label' => 'Mi configuración',
+ 'menu_description' => 'Ajustes relacionados con su cuenta de administración',
+ ],
+ 'myaccount' => [
+ 'menu_label' => 'Mi cuenta',
+ 'menu_description' => 'Actualice la información de su cuenta, tales como nombre, dirección de correo electrónico y contraseña.',
+ 'menu_keywords' => 'Inicio seguro'
+ ],
+ 'backend_preferences' => [
+ 'menu_label' => 'Preferencias de Back-end',
+ 'menu_description' => 'Gestionar preferencia de idioma y la apariencia del Back-end.',
+ 'locale' => 'Idioma',
+ 'locale_comment' => 'Seleccione la localización para el uso del lenguaje.',
+ ],
+ 'access_log' => [
+ 'hint' => 'Este registro muestra la lista de ingresos al panel de administración. Los registros se mantienen por un total de :days días.',
+ 'menu_label' => 'Registro de acceso',
+ 'menu_description' => 'Ver registro de ingresos al panel de administracion.',
+ 'created_at' => 'Fecha y hora',
+ 'login' => 'Acceso',
+ 'ip_address' => 'IP',
+ 'first_name' => 'Nombre',
+ 'last_name' => 'Apellido',
+ 'email' => 'Email',
+ ],
+ 'filter' => [
+ 'all' => 'Todo'
+ ]
+];
\ No newline at end of file
diff --git a/modules/backend/models/BackendPreferences.php b/modules/backend/models/BackendPreferences.php
index 1d2fbdf06..d747047f2 100644
--- a/modules/backend/models/BackendPreferences.php
+++ b/modules/backend/models/BackendPreferences.php
@@ -48,6 +48,7 @@ class BackendPreferences extends Model
'fr' => [Lang::get('system::lang.locale.fr'), 'flag-fr'],
'it' => [Lang::get('system::lang.locale.it'), 'flag-it'],
'ro' => [Lang::get('system::lang.locale.ro'), 'flag-ro'],
+ 'es-ar' => [Lang::get('system::lang.locale.es-ar'), 'flag-ar'],
'pt-br' => [Lang::get('system::lang.locale.pt-br'), 'flag-br'],
'fa' => [Lang::get('system::lang.locale.fa'), 'flag-ir'],
];
diff --git a/modules/backend/models/accesslog/columns.yaml b/modules/backend/models/accesslog/columns.yaml
index ecd6ae313..65c7133c8 100644
--- a/modules/backend/models/accesslog/columns.yaml
+++ b/modules/backend/models/accesslog/columns.yaml
@@ -10,8 +10,9 @@ columns:
login:
label: backend::lang.access_log.login
relation: user
- select: @login
+ select: login
searchable: yes
+ sortable: false
ip_address:
label: backend::lang.access_log.ip_address
@@ -20,17 +21,20 @@ columns:
first_name:
label: backend::lang.access_log.first_name
relation: user
- select: @first_name
+ select: first_name
searchable: yes
+ sortable: false
last_name:
label: backend::lang.access_log.last_name
relation: user
- select: @last_name
+ select: last_name
searchable: yes
+ sortable: false
email:
label: backend::lang.access_log.email
relation: user
- select: @email
- searchable: yes
\ No newline at end of file
+ select: email
+ searchable: yes
+ sortable: false
\ No newline at end of file
diff --git a/modules/backend/models/user/columns.yaml b/modules/backend/models/user/columns.yaml
index 94aae5bcb..4bdec362f 100644
--- a/modules/backend/models/user/columns.yaml
+++ b/modules/backend/models/user/columns.yaml
@@ -22,4 +22,5 @@ columns:
groups:
label: backend::lang.user.groups
relation: groups
- select: @name
\ No newline at end of file
+ select: name
+ sortable: false
\ No newline at end of file
diff --git a/modules/backend/traits/InspectableContainer.php b/modules/backend/traits/InspectableContainer.php
index e24f6b3e9..759d70e09 100644
--- a/modules/backend/traits/InspectableContainer.php
+++ b/modules/backend/traits/InspectableContainer.php
@@ -1,8 +1,8 @@
fields as $field) {
- if (!in_array($field->type, ['switch', 'checkbox', 'number'])) {
+ if ($field->type != 'number')
continue;
}
@@ -769,11 +768,10 @@ class Form extends WidgetBase
*/
$parts = Str::evalHtmlArray($field->fieldName);
$dotted = implode('.', $parts);
- $value = array_get($data, $dotted, 0);
- if ($field->type == 'number') {
+ if (($value = array_get($data, $dotted)) !== null) {
$value = !strlen(trim($value)) ? null : (float) $value;
+ array_set($data, $dotted, $value);
}
- array_set($data, $dotted, $value);
}
/*
diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php
index ac3c3e68a..35cbb8a38 100644
--- a/modules/backend/widgets/Lists.php
+++ b/modules/backend/widgets/Lists.php
@@ -586,7 +586,9 @@ class Lists extends WidgetBase
if ($columnOrder = $this->getSession('order', null)) {
$orderedDefinitions = [];
foreach ($columnOrder as $column) {
- $orderedDefinitions[$column] = $this->columns[$column];
+ if (isset($this->columns[$column])) {
+ $orderedDefinitions[$column] = $this->columns[$column];
+ }
}
$this->columns = array_merge($orderedDefinitions, $this->columns);
diff --git a/modules/backend/widgets/filter/partials/_scope_checkbox.htm b/modules/backend/widgets/filter/partials/_scope_checkbox.htm
index d9ce4fe87..3b618af87 100644
--- a/modules/backend/widgets/filter/partials/_scope_checkbox.htm
+++ b/modules/backend/widgets/filter/partials/_scope_checkbox.htm
@@ -3,5 +3,5 @@
class="filter-scope checkbox custom-checkbox"
data-scope-name="= $scope->scopeName ?>">
value ? 'checked' : '' ?> />
-
+
diff --git a/modules/backend/widgets/filter/partials/_scope_group.htm b/modules/backend/widgets/filter/partials/_scope_group.htm
index bec8604fe..e5628d359 100644
--- a/modules/backend/widgets/filter/partials/_scope_group.htm
+++ b/modules/backend/widgets/filter/partials/_scope_group.htm
@@ -3,6 +3,6 @@
class="filter-scope = $scope->value ? 'active' : '' ?>"
href="javascript:;"
data-scope-name="= $scope->scopeName ?>">
- = e($scope->label) ?>:
+ = e(trans($scope->label)) ?>:= $scope->value ? count($scope->value) : e(trans('backend::lang.filter.all')) ?>
diff --git a/modules/backend/widgets/form/partials/_field_checkbox.htm b/modules/backend/widgets/form/partials/_field_checkbox.htm
index ea24f3021..962501a34 100644
--- a/modules/backend/widgets/form/partials/_field_checkbox.htm
+++ b/modules/backend/widgets/form/partials/_field_checkbox.htm
@@ -1,5 +1,10 @@