diff --git a/resources/lang/en/crud.php b/resources/lang/en/crud.php
index 115ef2f..8ee5777 100644
--- a/resources/lang/en/crud.php
+++ b/resources/lang/en/crud.php
@@ -13,26 +13,27 @@ return [
],
'helpers' => [
- 'list' => 'List',
- 'list_all' => 'List all :model',
- 'create_model' => 'Create :model',
- 'view_model' => 'View :model',
- 'update_model' => 'Update :model',
- 'duplicate_model' => 'Duplicate :model',
- 'delete_model' => 'Delete :model',
- 'save_model' => 'Save :model',
- 'edit_model' => 'Edit :model',
- 'no_results' => 'No results for :models',
- 'publish' => 'Publish',
- 'unpublish' => 'Unpublish',
- 'seo_title' => 'Must give a precise description of the page, which is recommended for optimum
+ 'list' => 'List',
+ 'list_all' => 'List all :model',
+ 'create_model' => 'Create :model',
+ 'view_model' => 'View :model',
+ 'update_model' => 'Update :model',
+ 'duplicate_model' => 'Duplicate :model',
+ 'delete_model' => 'Delete :model',
+ 'save_model' => 'Save :model',
+ 'edit_model' => 'Edit :model',
+ 'no_results' => 'No results for :models',
+ 'publish' => 'Publish',
+ 'unpublish' => 'Unpublish',
+ 'seo_title' => 'Must give a precise description of the page, which is recommended for optimum
positioning in search engines (
tag).',
- 'seo_description' => 'Must give a precise description of the page content ( description tag).',
- 'required_fields' => 'Required fields',
+ 'seo_description' => 'Must give a precise description of the page content ( description tag).',
+ 'required_fields' => 'Required fields',
'visibility_with_dates' => 'This field will only have an effect if no date is entered.',
- 'publish_at' => 'The :model will be published from that date.',
- 'unpublish_at' => 'The :model will be unpublished from that date.',
- 'nutritionnal_values' => 'Values must be given in grams, except for energy in kJ and kcal.',
+ 'publish_at' => 'The :model will be published from that date.',
+ 'unpublish_at' => 'The :model will be unpublished from that date.',
+ 'nutritionnal_values' => 'Values must be given in grams, except for energy in kJ and kcal.',
+ 'year' => 'Year of :model'
],
'libs' => [
diff --git a/resources/lang/fr/crud.php b/resources/lang/fr/crud.php
index 1891502..8ea4c50 100644
--- a/resources/lang/fr/crud.php
+++ b/resources/lang/fr/crud.php
@@ -13,27 +13,35 @@ return [
],
'helpers' => [
- 'list' => 'Liste',
- 'list_all' => 'Lister tous les :model',
- 'create_model' => 'Créer :model',
- 'view_model' => 'Voir :model',
- 'update_model' => 'Éditer :model',
- 'duplicate_model' => 'Dupliquer :model',
- 'delete_model' => 'Supprimer :model',
- 'save_model' => 'Sauvegarder :model',
- 'edit_model' => 'Mettre à jour :model',
- 'no_results' => 'Aucun résultat pour :model',
- 'publish' => 'Publié',
- 'unpublish' => 'Dépublié',
- 'seo_title' => 'Doit décrire précisément la page, recommandation pour un positionnement
+ 'list' => 'Liste',
+ 'list_all' => 'Lister tous les :model',
+ 'create_model' => 'Créer :model',
+ 'view_model' => 'Voir :model',
+ 'update_model' => 'Éditer :model',
+ 'duplicate_model' => 'Dupliquer :model',
+ 'delete_model' => 'Supprimer :model',
+ 'save_model' => 'Sauvegarder :model',
+ 'edit_model' => 'Mettre à jour :model',
+ 'no_results' => 'Aucun résultat pour :model',
+ 'publish' => 'Publié',
+ 'unpublish' => 'Dépublié',
+ 'seo_title' => 'Doit décrire précisément la page, recommandation pour un positionnement
optimal dans les moteurs de recherche (balise ).',
- 'seo_description' => 'Doit décrire précisément le contenu de la page (balise description).',
- 'required_fields' => 'Champs obligatoires',
+ 'seo_description' => 'Doit décrire précisément le contenu de la page (balise description).',
+ 'required_fields' => 'Champs obligatoires',
'visibility_with_dates' => 'Ce champ n\'aura d\'effet que si aucune date n\'est renseignée.',
- 'publish_at' => 'Le :model sera publié à partir de cette date.',
- 'unpublish_at' => 'Le :model sera dépublié à partir de cette date.',
- 'nutritionnal_values' => 'Les valeurs doivent être renseignées en grammes,
+ 'publish_at' => ':model sera publié à partir de cette date.',
+ 'unpublish_at' => ':model sera dépublié à partir de cette date.',
+ 'nutritionnal_values' => 'Les valeurs doivent être renseignées en grammes,
exceptés pour l\'énergie en kJ et en kcal.',
+ 'new_tab_boolean' => 'Cocher pour ouvrir dans un nouvel onglet.',
+ 'game_text' => 'Doit contenir au minimum 15 caractères et au maximum 32 mots.',
+ 'url' => 'Doit être une URL valide.',
+ 'year' => 'Année du :model',
+ ],
+
+ 'labels' => [
+ 'new_tab_boolean' => 'Ouvrir dans un nouvel onglet ?',
],
'libs' => [
@@ -57,7 +65,6 @@ return [
'publish_status_saved' => 'Changement de l\'état de publication réussi !',
'right' => 'Vous n\'avez pas les droits pour accéder à cette partie !',
'theme_updated' => 'Le thème a été mis à jour !',
-
],
'minicrud' => [
diff --git a/resources/ts/bo/components/BelongsToManyDropdownComponent.vue b/resources/ts/bo/components/BelongsToManyDropdownComponent.vue
index b4be816..c4ae5dd 100644
--- a/resources/ts/bo/components/BelongsToManyDropdownComponent.vue
+++ b/resources/ts/bo/components/BelongsToManyDropdownComponent.vue
@@ -67,9 +67,9 @@ import type VueTagsInput from "@sipec/vue3-tags-input";
import { VueTagsInput as VueTagsInputCls } from "@sipec/vue3-tags-input";
import slugify from "slugify";
import { defineComponent } from "vue";
-import parseLaravelErrorMessages from "../../modules/parseLaravelErrorMessages";
-import route from "../../modules/route";
-import trans from "../../modules/trans";
+import parseLaravelErrorMessages from "./../../modules/parseLaravelErrorMessages";
+import route from "./../../modules/route";
+import trans from "./../../modules/trans";
export default defineComponent({
name: "BelongsToManyDropdownComponent",
@@ -77,6 +77,26 @@ export default defineComponent({
components: {
VueTagsInputCls,
},
+ beforeMount() {
+ if (!this.$attrs.json) {
+ throw new Error("this component requires json");
+ }
+ },
+ mounted() {
+ const json = String(this.$attrs.json ?? "{}"),
+ data = JSON.parse(json);
+ this.name = data.name;
+ this.selectedItems = this.parseTags(data.value);
+ this.allItems = this.parseTags(data.itemsList);
+ this.placeholder = data.placeholder;
+ // * Min and max calc.
+ this.min = Number.parseInt((data?.itemLimit ?? [])[0] ?? 0);
+ this.min = this.min < 0 ? 0 : this.min;
+ this.max = Number.parseInt((data?.itemLimit ?? [])[1] ?? 0);
+ this.max = this.max <= this.min ? null : this.max;
+ // * Error parsing
+ this.allErrors = data.errors;
+ },
data(): {
name: string;
item: string;
@@ -104,26 +124,6 @@ export default defineComponent({
message: null,
};
},
- beforeMount() {
- if (!this.$attrs.json) {
- throw new Error("this component requires json");
- }
- },
- mounted() {
- const json = String(this.$attrs.json ?? "{}"),
- data = JSON.parse(json);
- this.name = data.name;
- this.selectedItems = this.parseTags(data.value);
- this.allItems = this.parseTags(data.itemsList);
- this.placeholder = data.placeholder;
- // * Min and max calc.
- this.min = Number.parseInt((data?.itemLimit ?? [])[0] ?? 0);
- this.min = this.min < 0 ? 0 : this.min;
- this.max = Number.parseInt((data?.itemLimit ?? [])[1] ?? 0);
- this.max = this.max <= this.min ? null : this.max;
- // * Error parsing
- this.allErrors = data.errors;
- },
methods: {
parseTags(selectedItems: Array): Array {
return selectedItems.map((item: CustomTag) => {
@@ -196,13 +196,7 @@ export default defineComponent({