def manage_add_nfp_nrc(parent, id, REQUEST=None): """ Adds a new Eionet NFP Admin object """ form = (REQUEST.form if REQUEST is not None else {}) config = ldap_config.read_form(form) obj = NfpNrc(config) obj.title = form.get('title', id) obj._setId(id) parent._setObject(id, obj) if REQUEST is not None: REQUEST.RESPONSE.redirect(parent.absolute_url() + '/manage_workspace')
def manage_add_orgs_editor(parent, id, REQUEST=None): """ Adds a new Eionet Organisations Editor object """ form = (REQUEST.form if REQUEST is not None else {}) config = ldap_config.read_form(form) obj = OrganisationsEditor(config) obj.title = form.get('title', id) obj._setId(id) parent._setObject(id, obj) if REQUEST is not None: REQUEST.RESPONSE.redirect(parent.absolute_url() + '/manage_workspace')
def manage_edit_save(self, REQUEST): """ save changes to configuration """ self._config.update(ldap_config.read_form(REQUEST.form, edit=True)) REQUEST.RESPONSE.redirect(self.absolute_url() + '/manage_edit')