4810: NarWeb - name formats not aligned in general preferences and NarWeb option
svn: r17474
This commit is contained in:
parent
2cc6fa6dbc
commit
5d95f00489
@ -6424,7 +6424,14 @@ class NavWebOptions(MenuReportOptions):
|
||||
# We must figure out the value of the first option before we can
|
||||
# create the EnumeratedListOption
|
||||
fmt_list = _nd.get_name_format()
|
||||
name_format = EnumeratedListOption(_("Name format"), fmt_list[0][0])
|
||||
defaultnum = _nd.get_default_format()
|
||||
default = 0
|
||||
for ind,val in enumerate(fmt_list):
|
||||
if val[0] == defaultnum:
|
||||
default = ind
|
||||
break
|
||||
name_format = EnumeratedListOption(_("Name format"),
|
||||
fmt_list[default][0])
|
||||
for num, name, fmt_str, act in fmt_list:
|
||||
name_format.add_item(num, name)
|
||||
name_format.set_help(_("Select the format to display names"))
|
||||
|
@ -32,7 +32,6 @@ Web Calendar generator.
|
||||
#------------------------------------------------------------------------
|
||||
# python modules
|
||||
#------------------------------------------------------------------------
|
||||
from __future__ import print_function
|
||||
from functools import partial
|
||||
import os, codecs, shutil, re
|
||||
import datetime, calendar
|
||||
@ -1083,7 +1082,7 @@ class WebCalReport(Report):
|
||||
else:
|
||||
name = gen.lib.Name(primary_name)
|
||||
surname_obj = name.get_primary_surname()
|
||||
surname_obj.set_surname(maiden_name)
|
||||
surname_obj.set_surname(maiden_name)
|
||||
else:
|
||||
name = gen.lib.Name(primary_name)
|
||||
name.set_display_as(self.name_format)
|
||||
@ -1375,7 +1374,14 @@ class WebCalOptions(MenuReportOptions):
|
||||
# We must figure out the value of the first option before we can
|
||||
# create the EnumeratedListOption
|
||||
fmt_list = _nd.get_name_format()
|
||||
name_format = EnumeratedListOption(_("Name format"), fmt_list[0][0])
|
||||
defaultnum = _nd.get_default_format()
|
||||
default = 0
|
||||
for ind,val in enumerate(fmt_list):
|
||||
if val[0] == defaultnum:
|
||||
default = ind
|
||||
break
|
||||
name_format = EnumeratedListOption(_("Name format"),
|
||||
fmt_list[default][0])
|
||||
for num, name, fmt_str, act in fmt_list:
|
||||
name_format.add_item(num, name)
|
||||
name_format.set_help(_("Select the format to display names"))
|
||||
|
Loading…
Reference in New Issue
Block a user