def get_context_data(self, **kwargs): context = super(EditScriptContentView, self).get_context_data(**kwargs) context["title"] = get_create_or_change_title(self.request, self.object) context["action_infos"] = Action.get_ui_info_map() context["condition_infos"] = Condition.get_ui_info_map() context["cond_op_names"] = get_enum_choices_dict(StepConditionOperator) context["step_next_names"] = get_enum_choices_dict(StepNext) context["toolbar"] = Toolbar([ JavaScriptActionButton( text="Save", icon="fa fa-save", extra_css_class="btn-success", onclick="ScriptEditor.save();return false" ), get_discard_button(get_model_url(self.object, "edit")) ]) return context