editWorkflow.smarty
2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<h1>Workflow: {$oWorkflow->getName()|escape}</h1>
<h2>Edit workflow properties</h2>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="saveWorkflow" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<table class="prettysw" cellpadding="0" cellspacing="0">
<tr>
<th>Name</th>
<td><input type="textbox" name="fName" value="{$oWorkflow->getName()|escape}" /></td>
</tr>
<tr>
<th>Starting state</th>
<td>{ entity_select entities=$aStates name="fStartStateId" none=true selected=$oWorkflow->getStartStateId()}</td>
</tr>
</table>
<input type="submit" name="submit" value="Save" />
</form>
<h2>States</h2>
{if $aStates}
<h3>Existing states</h3>
<ul>
{foreach from=$aStates item=oState}
<li><a
href="?action=editState&fWorkflowId={$oWorkflow->getId()}&fStateId={$oState->getId()}"
title="State {$oState->getId()}">{$oState->getName()|escape}</a></li>
{/foreach}
</ul>
{/if}
<h3>Create a new state</h3>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="newState" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<input type="textbox" name="fName" />
<input type="submit" name="submit" value="Create state" />
</form>
<h2>Transitions</h2>
{if $aTransitions}
<h3>Existing transitions</h3>
<ul>
{foreach from=$aTransitions 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>Create a new transition</h3>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="newTransition" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->getId()}" />
<table class="prettysw" cellpadding="0" cellspacing="0">
<tr><th>Name</th><td><input type="textbox" name="fName" /></td></tr>
<tr>
<th>Target State</th>
<td>{entity_select entities=$aStates name="fTargetStateId"}</td>
</tr>
<tr>
<th>Guard permission</th>
<td>{entity_select entities=$aPermissions name="fPermissionId"}</td>
</tr>
</table>
<input type="submit" name="submit" value="Create transition" />
</form>
<h2>Actions controlled</h2>
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="action" value="setWorkflowActions" />
<input type="hidden" name="fWorkflowId" value="{$oWorkflow->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 controlled actions" />
</form>