editState.smarty 3.06 KB
<h1>State: {$oState->getName()|escape}</h1>

<h2>Edit state properties</h2>

<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="saveState" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<input type="hidden" name="fStateId" value="{$oState->getId()}" />
<input type="textbox" name="fName" value="{$oState->getName()|escape}" />
<input type="submit" name="submit" value="Save" />
</form>

<h2>Inform</h2>

<p class="helpText">Please select which roles or groups should be
informed when this state is reached.</p>

<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="saveInform" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<input type="hidden" name="fStateId" value="{$oState->getId()}" />
<h3>Roles</h3>
{entity_checkboxes entities=$aRoles name="fRoleIds" multiple="true" selected=$aInformed.role assign=aBoxes}
{foreach from=$aBoxes item=sBox}
{$sBox}<br />
{/foreach}

<h3>Groups</h3>
{entity_checkboxes entities=$aGroups name="fGroupIds" multiple="true" selected=$aInformed.group assign=aBoxes}
{foreach from=$aBoxes item=sBox}
{$sBox}<br />
{/foreach}

{*
<h3>Users</h3>
{entity_checkboxes entities=$aUsers name="fUserIds" multiple="true" selected=$aInformed.user assign=aBoxes}
{foreach from=$aBoxes item=sBox}
{$sBox}<br />
{/foreach}
<input type="submit" name="submit" value="Save" />
</form>
*}

<h2>Permissions</h2>

<p class="helpText">While in this workflow state, additional permissions
may be given.  This is done either to expose the document to more users
or to allow a particular role to be fulfilled before a workflow
transition can be accomplished.</p>

<h2>Transitions</h2>
{if $aTransitionsTo}
<h3>Transitions to this state</h3>

<ul>
{foreach from=$aTransitionsTo item=oTransition}
  <li><a
href="?action=editTransition&fWorkflowId={$oWorkflow->getId()}&fTransitionId={$oTransition->getId()}"
title="Transition
{$oTransition->getId()}">{$oTransition->getName()|escape}</a></li>
{/foreach}
</ul>

{/if}

<h3>Transitions from this state</h3>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="saveTransitions" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<input type="hidden" name="fStateId" value="{$oState->getId()}" />
{entity_checkboxes entities=$aTransitions name="fTransitionIds" multiple="true" selected=$aTransitionsSelected}
<input type="submit" name="submit" value="Save" />
</form>

<h2>Actions allowed</h2>

<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="setStateActions" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<input type="hidden" name="fStateId" value="{$oState->getId()}" />
<ul>
{entity_checkboxes name="fActions" entities=$aActions idmethod="getName" method="getDisplayName" assign="aCheckboxes" selected="$aActionsSelected"}
{foreach from=$aCheckboxes item=sCheckbox}
<li>{$sCheckbox}</li>
{/foreach}
</ul>
<input type="submit" name="submit" value="Set allowed actions" />
</form>