def _save_as_new(self): data = gmForms.create_form_template ( template_type = self._PRW_template_type.GetData(), name_short = self._PRW_name_short.GetValue().strip(), name_long = self._PRW_name_long.GetValue().strip() ) data['external_version'] = self._TCTRL_external_version.GetValue() data['instance_type'] = self._PRW_instance_type.GetValue().strip() data['filename'] = os.path.split(self._TCTRL_filename.GetValue().strip())[1] data['in_use'] = self._CHBOX_active.GetValue() data['edit_after_substitution'] = self._CHBOX_editable.GetValue() data['engine'] = gmForms.form_engine_abbrevs[self._CH_engine.GetSelection()] data.save() data.update_template_from_file(filename = self._TCTRL_filename.GetValue().strip()) self.data = data return True