protected $connection = 'extranet_users';
protected $table = 'company';
protected $_options = ['name' => 'company',
- 'singular' => 'company',
- 'plural' => 'companies'];
+ 'singular' => 'entreprise',
+ 'plural' => 'entreprises'];
public function setFields()
{
parent::setFields();
$this->addField(['name' => 'name',
- 'label' => 'Company name',
+ 'label' => __('Nom de l\'entreprise'),
'type' => 'Text',
'column' => true,
- 'tab' => 'Details']);
+ 'tab' => __('Informations')]);
$this->addField(['name' => 'address',
'type' => 'BunchOfFields',
'bunch' => Address::class,
- 'label' => 'Address',
- 'tab' => 'Addresses']);
+ 'label' => __('Adresse'),
+ 'tab' => __('Adresses')]);
$this->addField(['name' => 'billing_address',
'type' => 'BunchOfFields',
'bunch' => Address::class,
- 'label' => 'Billing address',
- 'tab' => 'Addresses']);
+ 'label' => __('Adresse de facturation'),
+ 'tab' => __('Adresses')]);
$this->addField(['name' => 'vat_number',
'type' => 'VATNumber',
- 'label' => 'VAT number',
- 'tab' => 'Details']);
+ 'label' => __('Numéro de TVA'),
+ 'tab' => __('Informations')]);
$this->addField(['name' => 'type',
'type' => 'SelectFromArray',
- 'label' => 'Type',
+ 'label' => __('Type'),
'options' => [
- 0 => 'Undefined',
- 1 => 'Very small company',
- 2 => 'Startup',
- 3 => 'Small / medium company',
- 4 => 'Agency',
- 5 => 'Big company',
- 6 => 'Government / Public institution'
+ 0 => __('Non défini'),
+ 1 => __('TPE'),
+ 2 => __('Startup'),
+ 3 => __('PME'),
+ 4 => __('Agence'),
+ 5 => __('Grande entreprise'),
+ 6 => __('Gouvernement / Institution publique')
],
- 'tab' => 'Details'
+ 'tab' => __('Informations')
]
);
'type' => 'SelectFromModel',
'optionsmodel' => User::class,
'attribute' => 'nameWithCompany',
- 'label' => 'Administrator',
- 'tab' => 'Details']);
+ 'label' => __('Administrateur'),
+ 'tab' => __('Informations')]);
$this->addField(['name' => 'website',
'type' => 'URL',
- 'label' => 'Website',
- 'tab' => 'Details']);
+ 'label' => __('Site web'),
+ 'tab' => __('Informations')]);
$this->addField(['name' => 'e1_ws_signatures',
'type' => 'Hidden']);
$builder->where('id', '<', '0');
return;
}
- if ($bu->hasPermissionTo('company:admin')){
+ if ($bu->hasPermissionTo('company:admin')) {
return;
}
$builder->whereIn('id', Permissions::getManagedCompanies($bu->id));
protected $connection = 'extranet_users';
protected $table = 'user';
protected $_options = ['name' => 'users',
- 'singular' => 'user',
- 'plural' => 'users'];
+ 'singular' => 'utilisateur',
+ 'plural' => 'utilisateurs'];
protected $_operations = ['\Cubedesigners\UserDatabase\Operations\LoginasOperation'];
parent::setFields();
$this->addField(['name' => 'firstname',
- 'label' => 'Firstname',
+ 'label' => __('Prénom'),
'type' => 'Text',
'column' => true,
- 'tab' => 'Contact']);
+ 'tab' => __('Contact')]);
$this->addField(['name' => 'lastname',
- 'label' => 'Lastname',
+ 'label' => __('Nom'),
'type' => 'Text',
'column' => true,
- 'tab' => 'Contact']);
+ 'tab' => __('Contact')]);
$this->addField(['name' => 'company',
- 'label' => 'Company',
+ 'label' => __('Entreprise'),
'type' => 'SelectFromModel',
'optionsmodel' => Company::class,
- 'tab' => 'Contact',
+ 'tab' => __('Contact'),
'column' => true,
]);
$this->addField(['name' => 'address',
'type' => 'BunchOfFields',
'bunch' => Address::class,
- 'label' => 'Address',
- 'tab' => 'Contact']);
+ 'label' => __('Adresse'),
+ 'tab' => __('Contact')]);
$this->addField(['name' => 'phone',
- 'label' => 'Phone',
+ 'label' => __('Téléphone'),
'type' => 'Phone',
- 'tab' => 'Contact']);
+ 'tab' => __('Contact')]);
$this->addField(['name' => 'mobile',
- 'label' => 'Mobile',
+ 'label' => __('Mobile'),
'type' => 'Phone',
- 'tab' => 'Contact']);
+ 'tab' => __('Contact')]);
$this->addField(['name' => 'locale',
- 'label' => 'Locale',
+ 'label' => __('Langue'),
'type' => 'Locale',
- 'tab' => 'Settings']);
+ 'tab' => __('Paramètres')]);
$extranetv1 = ['settings', 'ws_password', 'ws_settings', 'ws_rights', 'ws_domains', 'ws_count', 'login', 'mobile', 'fax', 'notes', 'grade', 'resetpassword'];