diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-09 11:38:11 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-09 11:38:11 +0100 | 
| commit | db16b6a6f4d0c2105551b8da64f3793cbea17b7e (patch) | |
| tree | 6ec94caa9139cf74642ed6c5f51bc6214c6c5b06 | |
| parent | df3796f45d1e82888145cedd1c79d5cdca8984b3 (diff) | |
| download | Ishtar-db16b6a6f4d0c2105551b8da64f3793cbea17b7e.tar.bz2 Ishtar-db16b6a6f4d0c2105551b8da64f3793cbea17b7e.zip | |
Profile form: manage "auto-pin" and "show pin menu"
| -rw-r--r-- | ishtar_common/forms_common.py | 11 | ||||
| -rw-r--r-- | version.py | 4 | 
2 files changed, 13 insertions, 2 deletions
| diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 1da4ac35f..4cc0ca024 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -823,6 +823,13 @@ class ProfilePersonForm(forms.Form):      name = forms.CharField(label=_(u"Name"), required=False)      profile_type = forms.ChoiceField(label=_(u"Profile type"), required=False,                                       disabled=True, choices=[]) +    auto_pin = forms.BooleanField( +        label=_(u"Pin automatically items on creation and modification"), +        required=False) +    display_pin_menu = forms.BooleanField( +        label=_(u"Show pin menu"), +        required=False) +      duplicate_profile = forms.BooleanField(          label=_(u"Duplicate this profile"), required=False)      delete_profile = forms.BooleanField( @@ -843,6 +850,8 @@ class ProfilePersonForm(forms.Form):              initial['name'] = current_profile.name or \                                current_profile.profile_type              initial['profile_type'] = current_profile.profile_type.pk +            initial['auto_pin'] = current_profile.auto_pin +            initial['display_pin_menu'] = current_profile.display_pin_menu          kwargs['initial'] = initial          super(ProfilePersonForm, self).__init__(*args, **kwargs)          self.fields['current_profile'].choices = choices @@ -913,6 +922,8 @@ class ProfilePersonForm(forms.Form):          profile.current = True          profile.name = name +        profile.auto_pin = self.cleaned_data['auto_pin'] +        profile.display_pin_menu = self.cleaned_data['display_pin_menu']          profile.save()          clean_session_cache(session) diff --git a/version.py b/version.py index 0b8249431..82feb2808 100644 --- a/version.py +++ b/version.py @@ -1,5 +1,5 @@ -# 2.1.dev.15 -VERSION = (2, 1, 'dev', 15) +# 2.1.dev.16 +VERSION = (2, 1, 'dev', 16)  def get_version(): | 
