Add customer notes field to customer form
This commit is contained in:
parent
d53d51f499
commit
66e70e4684
3 changed files with 29 additions and 4 deletions
|
|
@ -34,6 +34,11 @@ class Customer
|
|||
*/
|
||||
protected $last_name;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", length=80)
|
||||
*/
|
||||
protected $customer_notes;
|
||||
|
||||
// mobile numbers linked to this customer
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="MobileNumber", mappedBy="customer", cascade={"persist"})
|
||||
|
|
@ -99,6 +104,17 @@ class Customer
|
|||
return $this->last_name;
|
||||
}
|
||||
|
||||
public function setCustomerNotes($customer_notes)
|
||||
{
|
||||
$this->customer_notes = $customer_notes;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCustomerNotes()
|
||||
{
|
||||
return $this->customer_notes;
|
||||
}
|
||||
|
||||
public function addMobileNumber(MobileNumber $number)
|
||||
{
|
||||
$this->numbers->add($number);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,16 @@
|
|||
<input type="text" name="last_name" class="form-control m-input" value="{{ obj.getLastName() }}" data-name="last_name">
|
||||
<div class="form-control-feedback hide" data-field="last_name"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-6">
|
||||
<label data-field="customer_notes">
|
||||
Customer Notes
|
||||
</label>
|
||||
<textarea name="customer_notes" class="form-control m-input" value="{{ obj.getCustomerNotes() }}" data-name="customer_notes" rows="4"></textarea>
|
||||
<div class="form-control-feedback hide" data-field="customer_notes"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="mobile-numbers" role="tabpanel">
|
||||
<div class="form-group m-form__group row form-group-inner row">
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<h3 class="m-portlet__head-text">
|
||||
{% if mode == 'update' %}
|
||||
Edit Manufacturer
|
||||
<small>{{ obj.getName() }}</small>
|
||||
<small>{{ obj.getName }}</small>
|
||||
{% else %}
|
||||
New Manufacturer
|
||||
{% endif %}
|
||||
|
|
@ -32,14 +32,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="row-form" class="m-form m-form--fit m-form--label-align-right m-form--group-seperator-dashed" method="post" action="{{ mode == 'update' ? url('vmfg_update_submit', {'id': obj.getId()}) : url('vmfg_create_submit') }}">
|
||||
<form id="row-form" class="m-form m-form--fit m-form--label-align-right m-form--group-seperator-dashed" method="post" action="{{ mode == 'update' ? url('vmfg_update_submit', {'id': obj.getId}) : url('vmfg_create_submit') }}">
|
||||
<div class="m-portlet__body">
|
||||
<div class="form-group m-form__group row">
|
||||
<label class="col-lg-3 col-form-label" data-field="name">
|
||||
Name:
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" name="name" class="form-control m-input" value="{{ obj.getName() }}">
|
||||
<input type="text" name="name" class="form-control m-input" value="{{ obj.getName }}">
|
||||
<div class="form-control-feedback hide" data-field="name"></div>
|
||||
<span class="m-form__help">Display name for this manufacturer</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue