File: D:/HostingSpaces/SBogers10/vebon.komma.pro/app/KommaApp/Auditors/Kms/AuditorSection.php
<?php
/**
*
*
* @author Komma <info@komma.pro>
* @copyright (c) 2012-2016, Komma Mediadesign
*/
namespace KommaApp\Auditors\Kms;
use Carbon\Carbon;
use KommaApp\Kms\Core\Kms;
use KommaApp\Kms\Core\Sections\KmsSectionTabs;
use KommaApp\Kms\Core\Sections\KmsSiteSection;
class AuditorSection extends KmsSiteSection
{
protected $title = "Auditors";
protected $subTitle = "All auditors";
protected $slug = "auditors";
public $showDelete = false;
public $showSave = [1, 2, 4];
public $showCreate = [1, 2, 4];
protected $modelAttributesData = [
'login_label' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
'options' => [
'title' => 'lang_get:kms/auditors.account'
],
],
'active' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsOnOff',
'modelState' => 'update',
'options' => [
'label' => 'Actief'
]
],
'activate' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsLink',
'modelState' => 'update',
'role' => [1,2,4],
'options' => [
'label' => 'lang_get:kms/members.activation_mail',
'buttonLabel' => 'lang_get:kms/members.send_activation_email',
'link' => [
'type' => 'route',
'route' => 'kms.send.auditor.activation',
'params' => [
'members' => '[[modelId]]',
'site' => '[[siteName]]'
]
]
],
],
'number' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.account_nr',
'placeholder' => 'Lidummer voor intern gebruik',
]
],
'email' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/global.email',
'placeholder' => 'Bv: info@example.com',
'lowercase' => true,
'validation' => [
'rules' => 'required|email|unique:end_users,email,[[modelId]]',
'messages' => [
'required' => 'You need to enter an email address',
'unique' => 'This email address is already registered'
]
]
]
],
'company_label' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
'options' => [
'title' => 'lang_get:kms/auditors.company'
],
],
'company' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.company_name',
'placeholder' => 'Bv: "Buitenspeeltuin bv"'
]
],
'company_vat' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.company_vat',
'placeholder' => 'Bv: "NL0XXXXXXXXXX"'
]
],
'contact_label' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
'options' => [
'title' => 'lang_get:kms/auditors.contact'
],
],
'first_name' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/global.first_name',
'placeholder' => 'Bv: "Phil"'
]
],
'name_insertion' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/global.name_insertion',
'placeholder' => 'Bv: "van de"'
]
],
'last_name' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/global.last_name',
'placeholder' => 'Bv: "Brug"'
]
],
'postal' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.postal',
'placeholder' => 'Bv: "1234 AA"'
]
],
'city' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.city',
'placeholder' => 'Bv: "Eindhoven"'
]
],
'street' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.street',
'placeholder' => 'Bv: "doodlopende weg"'
]
],
'house_number' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.house_nr',
'placeholder' => 'Bv: "11"'
]
],
'house_number_suffix' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.house_nr_addition',
'placeholder' => 'Bv: "a - 1"'
]
],
'country' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsSelect',
'options' => [
'label' => 'lang_get:kms/global.country',
'placeholder' => 'Bv: "Nederland"',
'default_value' => 155,
'data' => 'KommaApp\Countries\Kms\CountryRepository@getCountriesForSiteSelectBox',
]
],
'telephone' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/auditors.telephone',
'placeholder' => 'Bv: "06 123 1234"'
]
],
];
function __construct(
Kms $kms,
AuditorRepository $repository,
KmsSectionTabs $tabs)
{
parent::__construct($kms, $repository, $tabs);
$this->title = \Lang::get('kms/auditors.title');
$this->subTitle = \Lang::get('kms/auditors.sub_title');
}
}