You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# we can't set initial, it's ignored since the form is bound, instead mutate the data
96
+
self.data=self.data.copy()
97
+
self.data["confirm_acronym"] =initial
96
98
99
+
ifexistingandexisting.type_id==self.group_type:
97
100
ifexisting.state_id=="bof":
98
-
self.confirm_msg="Turn BoF %s into proposed %s and start chartering it"% (existing.acronym, existing.type.name)
99
-
self.autoenable_confirm=True
100
-
raiseforms.ValidationError("Warning: Acronym used for an existing BoF (%s)."%existing.name)
101
+
insert_confirm_field(label="Turn BoF %s into proposed %s and start chartering it"% (existing.acronym, existing.type.name), initial=True)
102
+
ifconfirmed:
103
+
returnacronym
104
+
else:
105
+
raiseforms.ValidationError("Warning: Acronym used for an existing BoF (%s)."%existing.name)
101
106
else:
102
-
self.confirm_msg="Set state of %s %s to proposed and start chartering it"% (existing.acronym, existing.type.name)
103
-
self.autoenable_confirm=False
104
-
raiseforms.ValidationError("Warning: Acronym used for an existing %s (%s, %s)."% (existing.type.name, existing.name, existing.state.nameifexisting.stateelse"unknown state"))
107
+
insert_confirm_field(label="Set state of %s %s to proposed and start chartering it"% (existing.acronym, existing.type.name), initial=False)
108
+
ifconfirmed:
109
+
returnacronym
110
+
else:
111
+
raiseforms.ValidationError("Warning: Acronym used for an existing %s (%s, %s)."% (existing.type.name, existing.name, existing.state.nameifexisting.stateelse"unknown state"))
105
112
106
113
ifexisting:
107
114
raiseforms.ValidationError("Acronym used for an existing group (%s)."%existing.name)
0 commit comments