delegate action: set date, start to current, clear other fields

This commit is contained in:
Helmut Merz 2016-04-17 10:00:18 +02:00
parent 635a4e2568
commit f12361daa4

View file

@ -609,7 +609,7 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
def onChangeAction(self): def onChangeAction(self):
js = [self.actionJs['setDefault'], js = [self.actionJs['setDefault'],
self.actionJs['showIf'], self.actionJs['showIf'],
self.actionJs['setIfStart']] self.actionJs['setIfSD']]
if self.state in ('done',): if self.state in ('done',):
js.append(self.actionJs['setIfWF']) js.append(self.actionJs['setIfWF'])
return ';\n'.join(js) return ';\n'.join(js)
@ -618,8 +618,9 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
showIf=""" showIf="""
showIfIn(this, [['move', 'target_task'], showIfIn(this, [['move', 'target_task'],
['delegate', 'target_party']])""", ['delegate', 'target_party']])""",
setIfStart=""" setIfSD="""
setIf(this, 'start', [['start_date', defValue], setIfN(this, ['start', 'delegate'], [
['start_date', defValue],
['start_time', defValue], ['start_time', defValue],
['end_time', null], ['end_time', null],
['duration', ''], ['duration', ''],