Esempio n. 1
0
    def do_sample_wizard_components(self):
        self.context['wiz_message'] = d_utils.json_to_pytype(lkup.MESSAGES_LKUPS["sample_wizard_messages"])[
            "properties"]
        self.context['wiz_howtos'] = d_utils.json_to_pytype(lkup.MESSAGES_LKUPS["sample_wizard_howto"])
        self.context['wizard_stages'] = self.wizard_helper.generate_stage_items()

        # get all records: used in the UI for 'cloning' and other purposes
        profile_id = ThreadLocal.get_current_request().session['profile_id']
        self.context["component_records"] = htags.generate_component_records("sample", profile_id)

        return self.context
Esempio n. 2
0
    def do_form_and_component_records(self):
        # generates form, and in addition returns records of the form component, this could, for instance, be
        # used for cloning of a record

        kwargs = dict()
        kwargs["referenced_field"] = self.param_dict.get(
            "referenced_field", str())
        kwargs["referenced_type"] = self.param_dict.get(
            "referenced_type", str())

        self.context = self.do_form()
        self.context["component_records"] = htags.generate_component_records(
            self.component, self.profile_id, **kwargs)

        return self.context
Esempio n. 3
0
    def get_sources_json_component(self):
        self.context["option_values"] = d_utils.generate_sources_json()
        self.context["component_records"] = htags.generate_component_records(self.component, self.profile_id)

        return self.context