def METHOD_NAME(self):
    new_name = self.request.form.get("name", None)
    if new_name is None or new_name == "":
        IStatusMessage(self.request).addStatusMessage(
            _("Name can not be empty."), "error"
        )
        return
    original_name = self.request.form.get("original_name", None)
    bundles = self._bundles
    if new_name != original_name:
        if original_name not in bundles:
            IStatusMessage(self.request).addStatusMessage(
                _("Expected record missing."), "error"
            )
            return
        if new_name in bundles:
            IStatusMessage(self.request).addStatusMessage(
                _(
                    "Record name ${new_name} already taken.",
                    mapping=dict(new_name=new_name),
                ),
                "error",
            )
            return
        record = bundles[original_name]
        del bundles[original_name]
        # update prefix
        record.__prefix__ = record.__prefix__.replace(original_name, new_name)
        bundles[new_name] = record
    else:
        record = bundles[original_name]
    self._set_data_from_form(record)
    IStatusMessage(self.request).addStatusMessage(_("Changes saved."), "info")