+ # translate high-level 'toggled' into 4 different booleans
+ self.need_toggle = False
+ if self.toggled=='persistent':
+ # start with everything turned off and let the js callback do its job
+ env.update({'persistent_toggle':True,'display_hide_button':False,'display_show_button':False,'display_body':False})
+ elif self.toggled==False:
+ env.update({'persistent_toggle':False,'display_hide_button':False,'display_show_button':True,'display_body':False})
+ else:
+ env.update({'persistent_toggle':False,'display_hide_button':True,'display_show_button':False,'display_body':True})