Add max lengths when editing person name via profile view
This commit is contained in:
parent
6a0a4627b4
commit
f005ef4d52
|
@ -69,13 +69,19 @@
|
||||||
|
|
||||||
<section class="modal-card-body">
|
<section class="modal-card-body">
|
||||||
<b-field label="First Name">
|
<b-field label="First Name">
|
||||||
<b-input v-model.trim="personFirstName"></b-input>
|
<b-input v-model.trim="personFirstName"
|
||||||
|
:maxlength="maxLengths.person_first_name || null">
|
||||||
|
</b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field label="Middle Name">
|
<b-field label="Middle Name">
|
||||||
<b-input v-model.trim="personMiddleName"></b-input>
|
<b-input v-model.trim="personMiddleName"
|
||||||
|
:maxlength="maxLengths.person_middle_name || null">
|
||||||
|
</b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
<b-field label="Last Name">
|
<b-field label="Last Name">
|
||||||
<b-input v-model.trim="personLastName"></b-input>
|
<b-input v-model.trim="personLastName"
|
||||||
|
:maxlength="maxLengths.person_last_name || null">
|
||||||
|
</b-input>
|
||||||
</b-field>
|
</b-field>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -447,6 +447,9 @@ class PersonView(MasterView):
|
||||||
def get_max_lengths(self):
|
def get_max_lengths(self):
|
||||||
model = self.model
|
model = self.model
|
||||||
return {
|
return {
|
||||||
|
'person_first_name': maxlen(model.Person.first_name),
|
||||||
|
'person_middle_name': maxlen(model.Person.middle_name),
|
||||||
|
'person_last_name': maxlen(model.Person.last_name),
|
||||||
'address_street': maxlen(model.PersonMailingAddress.street),
|
'address_street': maxlen(model.PersonMailingAddress.street),
|
||||||
'address_street2': maxlen(model.PersonMailingAddress.street2),
|
'address_street2': maxlen(model.PersonMailingAddress.street2),
|
||||||
'address_city': maxlen(model.PersonMailingAddress.city),
|
'address_city': maxlen(model.PersonMailingAddress.city),
|
||||||
|
|
Loading…
Reference in a new issue