contacts: add title and birthdate to contact fields (#9495)
This commit is contained in:
parent
9a41edbe2f
commit
d9dd50ba21
|
@ -15,10 +15,19 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
|
||||
|
||||
|
||||
DEFAULT_TITLE_CHOICES = (
|
||||
('', ''),
|
||||
(pgettext_lazy('title', 'Mrs'), pgettext_lazy('title', 'Mrs')),
|
||||
(pgettext_lazy('title', 'Mr'), pgettext_lazy('title', 'Mr')),
|
||||
)
|
||||
|
||||
class ContactAddForm(forms.Form):
|
||||
title = forms.CharField(label=_('Title'),
|
||||
required=False,
|
||||
widget=forms.Select(choices=DEFAULT_TITLE_CHOICES))
|
||||
first_name = forms.CharField(label=_('First Name'),
|
||||
required=True,
|
||||
widget=forms.TextInput(attrs={'required': 'required'}))
|
||||
|
@ -32,3 +41,4 @@ class ContactAddForm(forms.Form):
|
|||
country = forms.CharField(label=_('Country'))
|
||||
phone = forms.CharField(label=_('Phone'))
|
||||
mobile = forms.CharField(label=_('Mobile'))
|
||||
birthdate = forms.CharField(label=_('Birthdate'))
|
||||
|
|
|
@ -518,6 +518,12 @@ form.contact-add p label {
|
|||
width: 6em;
|
||||
}
|
||||
|
||||
div.ui-dialog form.contact-add p select {
|
||||
padding: 7px 10px;
|
||||
display: inline-block;
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
div.ui-dialog form.contact-add p input {
|
||||
display: inline-block;
|
||||
width: 20em;
|
||||
|
|
Loading…
Reference in New Issue