Commit a7121467 authored by muschpusch's avatar muschpusch Committed by fmitchell

Issue #2270247 by muschpusch: Fixed Use proper label and message on workflow page.

parent da92b581
......@@ -3,6 +3,7 @@
#2263215 by -enzo-: Added Integrate table node_revision_states_history with views.
#2269259 by hefox: Added primary key to node_revision_states_history.
#2269303 by xdavidson: Fixed Notice: Undefined index: pathauto in state_flow_promote_node_revision.
#2270247 by muschpusch: Fixed Use proper label and message on workflow page.
7.x-2.5
--------------
......
......@@ -196,7 +196,7 @@ function state_flow_events_revision($form, &$form_state, $node_revision, $new_ev
$events = array();
foreach ($all_events as $event_machine_name => $event) {
if (state_flow_access($node_revision, $event_machine_name)) {
$events[] = $event_machine_name;
$events[$event_machine_name] = $event->get_option('label');
}
}
......@@ -204,7 +204,7 @@ function state_flow_events_revision($form, &$form_state, $node_revision, $new_ev
drupal_set_message(t('You cannot perform any workflow transitions on this revision.'), 'warning');
drupal_goto('node/' . $node_revision->nid . '/workflow');
}
elseif (empty($new_event) || !in_array($new_event, $events)) {
elseif (empty($new_event) || !array_key_exists($new_event, $events)) {
drupal_set_title(t('Transition revision @rev-vid to a new state', array('@rev-vid' => $node_revision->vid)));
$form['event'] = array(
'#type' => 'radios',
......@@ -213,7 +213,11 @@ function state_flow_events_revision($form, &$form_state, $node_revision, $new_ev
);
}
else {
drupal_set_title(t('Transition revision @rev-vid to %state', array('@rev-vid' => $node_revision->vid, '%state' => $new_event)), PASS_THROUGH);
drupal_set_title(t('Transition @title (revision @rev-vid) to "@state"', array(
'@title' => $node_revision->title,
'@rev-vid' => $node_revision->vid,
'@state' => $events[$new_event])), PASS_THROUGH);
$form['event'] = array(
'#type' => 'value',
'#value' => $new_event,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment