Add the reseller field in the customer form
This commit is contained in:
1
core/lib/Thelia/Controller/Admin/CustomerController.php
Normal file → Executable file
1
core/lib/Thelia/Controller/Admin/CustomerController.php
Normal file → Executable file
@@ -91,6 +91,7 @@ class CustomerController extends AbstractCrudController
|
||||
'email' => $object->getEmail(),
|
||||
'title' => $object->getTitleId(),
|
||||
'discount' => $object->getDiscount(),
|
||||
'reseller' => $object->getReseller(),
|
||||
);
|
||||
|
||||
if ($address !== null) {
|
||||
|
||||
6
core/lib/Thelia/Form/CustomerUpdateForm.php
Normal file → Executable file
6
core/lib/Thelia/Form/CustomerUpdateForm.php
Normal file → Executable file
@@ -164,6 +164,12 @@ class CustomerUpdateForm extends BaseForm
|
||||
'for' => 'discount'
|
||||
)
|
||||
))
|
||||
->add('reseller', 'integer', array(
|
||||
'label' => Translator::getInstance()->trans('Reseller'),
|
||||
'label_attr' => array(
|
||||
'for' => 'reseller'
|
||||
)
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
11
templates/backOffice/default/customer-edit.html
Normal file → Executable file
11
templates/backOffice/default/customer-edit.html
Normal file → Executable file
@@ -95,6 +95,17 @@
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='reseller'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} (leave blank to keep current customer password) {if $required} <span class="required">*</span>{/if} : </label>
|
||||
|
||||
Reference in New Issue
Block a user