Add new personal settings MOTION_IDENTIFIER_WITHOUT_BLANKS.
Allow to remove all whitespaces from motion identifier if settings value is True. Default: False. Example: "B 1 - Ä 1" -> "B1-Ä1"
This commit is contained in:
parent
f146e11354
commit
f4d468a6f6
@ -53,6 +53,7 @@ Motions:
|
|||||||
- Changed label of former state "commited a bill" to "refered to committee".
|
- Changed label of former state "commited a bill" to "refered to committee".
|
||||||
- New csv import layout and using Papa Parse for parsing the csv.
|
- New csv import layout and using Papa Parse for parsing the csv.
|
||||||
- Number of ballots printed can now be set in config.
|
- Number of ballots printed can now be set in config.
|
||||||
|
- Add new personal settings to remove all whitespaces from motion identifier.
|
||||||
|
|
||||||
Elections:
|
Elections:
|
||||||
- Added options to calculate percentages on different bases.
|
- Added options to calculate percentages on different bases.
|
||||||
|
@ -336,6 +336,10 @@ class Motion(RESTModelMixin, models.Model):
|
|||||||
number += 1
|
number += 1
|
||||||
identifier = '%s%s' % (prefix, self.extend_identifier_number(number))
|
identifier = '%s%s' % (prefix, self.extend_identifier_number(number))
|
||||||
|
|
||||||
|
# remove all whitespaces from identifier if MOTION_IDENTIFIER_WITHOUT_BLANKS is set
|
||||||
|
if hasattr(settings, 'MOTION_IDENTIFIER_WITHOUT_BLANKS') and settings.MOTION_IDENTIFIER_WITHOUT_BLANKS:
|
||||||
|
identifier = identifier.replace(' ', '')
|
||||||
|
|
||||||
self.identifier = identifier
|
self.identifier = identifier
|
||||||
self.identifier_number = number
|
self.identifier_number = number
|
||||||
|
|
||||||
|
@ -120,3 +120,4 @@ SEARCH_INDEX = os.path.join(OPENSLIDES_USER_DATA_PATH, 'search_index')
|
|||||||
# Customization of OpenSlides apps
|
# Customization of OpenSlides apps
|
||||||
|
|
||||||
MOTION_IDENTIFIER_MIN_DIGITS = 1
|
MOTION_IDENTIFIER_MIN_DIGITS = 1
|
||||||
|
MOTION_IDENTIFIER_WITHOUT_BLANKS = False
|
||||||
|
Loading…
Reference in New Issue
Block a user