PATH:
home
/
lab2454c
/
vaultchip.com
/
platform
/
plugins
/
ecommerce
/
src
/
Forms
<?php namespace Botble\Ecommerce\Forms; use BaseHelper; use Botble\Base\Forms\FormAbstract; use Botble\Ecommerce\Http\Requests\CustomerCreateRequest; use Botble\Ecommerce\Models\Customer; class CustomerForm extends FormAbstract { /** * @var string */ protected $template = 'core/base::forms.form-tabs'; /** * {@inheritDoc} */ public function buildForm() { $this ->setupModel(new Customer) ->setValidatorClass(CustomerCreateRequest::class) ->withCustomFields() ->add('name', 'text', [ 'label' => trans('core/base::forms.name'), 'label_attr' => ['class' => 'control-label required'], 'attr' => [ 'placeholder' => trans('core/base::forms.name_placeholder'), 'data-counter' => 120, ], ]) ->add('email', 'text', [ 'label' => trans('plugins/ecommerce::customer.email'), 'label_attr' => ['class' => 'control-label required'], 'attr' => [ 'placeholder' => trans('plugins/ecommerce::customer.email_placeholder'), 'data-counter' => 60, ], ]) ->add('phone', 'text', [ 'label' => trans('plugins/ecommerce::customer.phone'), 'label_attr' => ['class' => 'control-label'], 'attr' => [ 'placeholder' => trans('plugins/ecommerce::customer.phone_placeholder'), 'data-counter' => 20, ], ]) ->add('dob', 'date', [ 'label' => trans('plugins/ecommerce::customer.dob'), 'label_attr' => ['class' => 'control-label'], 'attr' => [ 'data-date-format' => config('core.base.general.date_format.js.date'), ], 'default_value' => BaseHelper::formatDate(now()), ]) ->add('is_change_password', 'checkbox', [ 'label' => trans('plugins/ecommerce::customer.change_password'), 'label_attr' => ['class' => 'control-label'], 'value' => 1, ]) ->add('password', 'password', [ 'label' => trans('plugins/ecommerce::customer.password'), 'label_attr' => ['class' => 'control-label required'], 'attr' => [ 'data-counter' => 60, ], 'wrapper' => [ 'class' => $this->formHelper->getConfig('defaults.wrapper_class') . ($this->getModel()->id ? ' hidden' : null), ], ]) ->add('password_confirmation', 'password', [ 'label' => trans('plugins/ecommerce::customer.password_confirmation'), 'label_attr' => ['class' => 'control-label required'], 'attr' => [ 'data-counter' => 60, ], 'wrapper' => [ 'class' => $this->formHelper->getConfig('defaults.wrapper_class') . ($this->getModel()->id ? ' hidden' : null), ], ]) ->add('avatar', 'mediaImage', [ 'label' => trans('core/base::forms.image'), 'label_attr' => ['class' => 'control-label'], ]) ->setBreakFieldPoint('avatar'); } }
[-] ProductForm.php
[edit]
[-] ProductTagForm.php
[edit]
[+]
..
[-] TaxForm.php
[edit]
[-] ProductCategoryForm.php
[edit]
[-] BrandForm.php
[edit]
[-] ProductAttributeSetForm.php
[edit]
[-] CustomerForm.php
[edit]
[-] ProductLabelForm.php
[edit]
[-] FlashSaleForm.php
[edit]
[-] AddShippingRegionForm.php
[edit]
[-] ProductCollectionForm.php
[edit]
[+]
Fields