Skip to content

Commit

Permalink
Fix content-state-update event
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Dec 4, 2018
1 parent 18c5b32 commit 10d0f7d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
Expand Up @@ -4,13 +4,13 @@
<div class="element">
<label>{'Group/State before'|i18n( 'extension/ezworkflowcollection' )}:</label>
<select id="before_{$event.id}" name="WorkflowEvent_event_objectstateupdate_group_before_{$event.id}" size="5">
{foreach $event.state_groups as $group}
{foreach $event.workflow_type.state_groups as $group}
{if $group.is_internal|not}
<option value="{$group.id}"{if $event.state_before.group_id|eq( $group.id )} selected="selected"{/if}>{$group.current_translation.name|wash}</option>
{/if}
{/foreach}
</select>
{foreach $event.state_groups as $group}
{foreach $event.workflow_type.state_groups as $group}
{if $group.is_internal|not}
<select id="before_{$event.id}_{$group.id}" name="WorkflowEvent_event_objectstateupdate_state_before_{$event.id}" size="5"{if $event.state_before.group_id|eq( $group.id )|not()} style="display:hidden;"{/if}>
{foreach $group.states as $state}
Expand All @@ -24,15 +24,15 @@
<div class="element">
<label>{'Group/State after'|i18n( 'extension/ezworkflowcollection' )}:</label>
<select id="after_{$event.id}" name="WorkflowEvent_event_objectstateupdate_group_after_{$event.id}" size="5">
{foreach $event.state_groups as $group}
{foreach $event.workflow_type.state_groups as $group}
{if $group.is_internal|not}
<option value="{$group.id}"{if $event.state_after.group_id|eq( $group.id )} selected="selected"{/if}>{$group.current_translation.name|wash}</option>
{/if}
{/foreach}
</select>
{foreach $event.state_groups as $group}
{foreach $event.workflow_type.state_groups as $group}
{if $group.is_internal|not}
<select id="after_{$event.id}_{$group.id}" name="WorkflowEvent_event_objectstateupdate_state_after_{$event.id}" size="5"{if $event.state_after.group_id|eq( $group.id )|not()} style="display:hidden;"{/if}>
<select id="after_{$event.id}_{$group.id}" name="WorkflowEvent_event_objectstateupdate_state_after_{$event.id}" size="5"{if $event.state_after.group_id|eq( $group.id )|not()} style="display:hidden;"{/if}>
{foreach $group.states as $state}
<option value="{$state.id}"{if $event.state_after.id|eq( $state.id )} selected="selected"{/if}>{$state.current_translation.name|wash}</option>
{/foreach}
Expand All @@ -42,11 +42,9 @@
</div>
</div>


{ezscript_require(array( 'ezjsc::jquery') )}
{ezscript_load(array( 'objectstateupdate.js') )}


<script type="text/javascript">
// updateList({$event.id}, {$event.state_before.group_id}, {$event.state_after.group_id});
updateList({$event.id});
Expand Down
2 changes: 1 addition & 1 deletion doc/changelogs/CHANGELOG-0.6
@@ -1,4 +1,4 @@
Changes to 0.5 - released 2013/7/24
Changes to 0.6 - released 2013/7/24

Bugfix:
. compatibility with eZP 4.7 and later
Expand Down
4 changes: 4 additions & 0 deletions doc/changelogs/CHANGELOG-0.7
@@ -0,0 +1,4 @@
Changes to 0.7 - released 2018/12/4

Bugfix:
. the template for editing the "Update Content State" workflow event would not list any existing state
5 changes: 3 additions & 2 deletions eventtypes/event/objectstateupdate/objectstateupdatetype.php
Expand Up @@ -89,12 +89,11 @@ function attribute( $attr )
{
switch( $attr )
{
case 'state_group';
case 'state_groups';
return eZContentObjectStateGroup::fetchByOffset();
default:
return eZWorkflowEventType::attribute( $attr );
}

}

/// per-event attributes
Expand Down Expand Up @@ -165,3 +164,5 @@ function fetchHTTPInput( $http, $base, $event )
}

eZWorkflowEventType::registerEventType( objectStateUpdateType::WORKFLOW_TYPE_STRING, 'objectstateupdatetype' );

?>
2 changes: 1 addition & 1 deletion extension.xml
Expand Up @@ -2,7 +2,7 @@
<software>
<metadata>
<name>ezworkflowcollection</name>
<version>0.7-dev</version>
<version>0.7</version>
<copyright>Copyright (C) 2010-2018 G. Giunta - O. Portier</copyright>
<license>GNU General Public License v2.0</license>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion ezinfo.php
Expand Up @@ -5,7 +5,7 @@ class ezworkflowcollectionInfo
static function info()
{
return array( 'Name' => "ezworkflowcollection",
'Version' => "0.7-dev",
'Version' => "0.7",
'Copyright' => "Copyright (C) 2010-2018 G. Giunta - O. Portier",
'License' => "GNU General Public License v2.0"
);
Expand Down

0 comments on commit 10d0f7d

Please sign in to comment.