Skip to content
Snippets Groups Projects
Commit bccd406a authored by Owen Bush's avatar Owen Bush
Browse files

Fixing bugs with adding new revisions, and the reg_type token

parent 56381cbe
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ function recurring_events_registration_tokens($type, $tokens, array $data, array ...@@ -75,7 +75,7 @@ function recurring_events_registration_tokens($type, $tokens, array $data, array
break; break;
case 'reg_type': case 'reg_type':
$replacements[$original] = $creation_service->getRegistrationType() == 'series' ?: 'event'; $replacements[$original] = $creation_service->getRegistrationType() == 'series' ? t('series') : t('event');
break; break;
} }
} }
......
...@@ -92,7 +92,7 @@ class EventInstanceForm extends ContentEntityForm { ...@@ -92,7 +92,7 @@ class EventInstanceForm extends ContentEntityForm {
$entity = $this->getEntity(); $entity = $this->getEntity();
// Save as a new revision if requested to do so. // Save as a new revision if requested to do so.
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) { if (!$form_state->isValueEmpty('revision') && $form_state->getValue('revision') != FALSE) {
$entity->setNewRevision(); $entity->setNewRevision();
// If a new revision is created, save the current user as revision author. // If a new revision is created, save the current user as revision author.
......
...@@ -215,7 +215,7 @@ class EventSeriesForm extends ContentEntityForm { ...@@ -215,7 +215,7 @@ class EventSeriesForm extends ContentEntityForm {
$original = NULL; $original = NULL;
// Save as a new revision if requested to do so. // Save as a new revision if requested to do so.
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) { if (!$form_state->isValueEmpty('revision') && $form_state->getValue('revision') != FALSE) {
$entity->setNewRevision(); $entity->setNewRevision();
// If a new revision is created, save the current user as revision author. // If a new revision is created, save the current user as revision author.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment