défaut: celui sélectionné
This commit is contained in:
parent
47b773c378
commit
3ffb9ce955
@ -579,21 +579,22 @@ class MergeDuplicates(Form):
|
||||
("event_" + str(e.pk), _("Value of the selected version"))
|
||||
for e in self.events
|
||||
]
|
||||
initial = "event_" + str(self.event.pk)
|
||||
else:
|
||||
choices = [
|
||||
("event_" + str(e.pk), _("Value of version {}").format(e.pk)) for e in self.events
|
||||
]
|
||||
|
||||
initial = choices[0][0]
|
||||
for f in self.duplicates.get_items_comparison():
|
||||
if not f["similar"]:
|
||||
if f["key"] in MergeDuplicates.checkboxes_fields:
|
||||
self.fields[f["key"]] = MultipleChoiceField(choices=choices)
|
||||
self.fields[f["key"]].initial = choices[0][0]
|
||||
self.fields[f["key"]].initial = initial
|
||||
else:
|
||||
self.fields[f["key"]] = ChoiceField(
|
||||
widget=RadioSelect, choices=choices
|
||||
)
|
||||
self.fields[f["key"]].initial = choices[0][0]
|
||||
self.fields[f["key"]].initial = initial
|
||||
|
||||
def as_grid(self):
|
||||
result = '<div class="grid">'
|
||||
|
Loading…
x
Reference in New Issue
Block a user