diff --git a/app/Abstracts/View/Components/Documents/Form.php b/app/Abstracts/View/Components/Documents/Form.php index c6f7f76e7..2ffa97220 100644 --- a/app/Abstracts/View/Components/Documents/Form.php +++ b/app/Abstracts/View/Components/Documents/Form.php @@ -603,20 +603,18 @@ abstract class Form extends Component return $textCreateNewContact; } - /* $default_key = Str::plural(config('type.document.' . $type . '.contact_type'), 2); $translation = $this->getTextFromConfig($type, 'create_new_contact', $default_key, 'trans_choice'); if (!empty($translation)) { return [ - 'general.form.add_new', + 'general.title.new', $translation, ]; } - */ - return 'general.add_new'; + return 'general.title.add'; } protected function getTextEditContact($type, $textEditContact) diff --git a/app/View/Components/Documents/Form/Contact.php b/app/View/Components/Documents/Form/Contact.php index cffaeecbc..01ffbfb2b 100644 --- a/app/View/Components/Documents/Form/Contact.php +++ b/app/View/Components/Documents/Form/Contact.php @@ -132,8 +132,8 @@ class Contact extends Component protected function getTextCreateNewContact($type, $textCreateNewContact) { - if (!empty($textCreateNewContact)) { - return $textCreateNewContact; + if (!empty($textCreateNewContact) && is_array($textCreateNewContact)) { + return trans($textCreateNewContact[0], ['type' => trans_choice($textCreateNewContact[1], 1)]); } switch ($type) { diff --git a/app/View/Components/Form/Group/Country.php b/app/View/Components/Form/Group/Country.php index b54a86b17..14caf9a76 100644 --- a/app/View/Components/Form/Group/Country.php +++ b/app/View/Components/Form/Group/Country.php @@ -8,6 +8,18 @@ class Country extends Form { public $type = 'country'; + /** @var string */ + public $formGroupClass; + + /** + * Create a new component instance. + * + * @return void + */ + public function __construct(string $formGroupClass = 'sm:col-span-3') { + $this->formGroupClass = $formGroupClass; + } + /** * Get the view / contents that represent the component. * diff --git a/resources/assets/js/components/AkauntingContactCard.vue b/resources/assets/js/components/AkauntingContactCard.vue index 1e9d54a49..4b335816a 100644 --- a/resources/assets/js/components/AkauntingContactCard.vue +++ b/resources/assets/js/components/AkauntingContactCard.vue @@ -46,8 +46,9 @@ -