Commit 98e741465553e6cd1b1bf51a13169372e335aadc
1 parent
21453c85
Allow setting of master field, and don't allow ordering unless the
master field is set. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3778 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
30 additions
and
0 deletions
templates/ktcore/metadata/conditional/manageConditional.smarty
| 1 | <h1>Manage conditional fieldset<h1> | 1 | <h1>Manage conditional fieldset<h1> |
| 2 | 2 | ||
| 3 | +<h2>Master field</h2> | ||
| 4 | + | ||
| 5 | +{if !$oMasterField} | ||
| 6 | +No master field is set, please select the master field: | ||
| 7 | + | ||
| 8 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | ||
| 9 | +<input type="hidden" name="action" value="setMasterField"> | ||
| 10 | +<input type="hidden" name="fFieldsetId" value="{$oFieldset->getId()}"> | ||
| 11 | + | ||
| 12 | +{entity_select entities=$oFieldset->getFields() name="fFieldId"} | ||
| 13 | +<input type="submit" name="submit" value="Set master field"> | ||
| 14 | +</form> | ||
| 15 | + | ||
| 16 | +{else} | ||
| 17 | + | ||
| 18 | +<form action="{$smarty.server.PHP_SELF}" method="POST"> | ||
| 19 | +<input type="hidden" name="action" value="setMasterField"> | ||
| 20 | +<input type="hidden" name="fFieldsetId" value="{$oFieldset->getId()}"> | ||
| 21 | + | ||
| 22 | +{entity_select entities=$oFieldset->getFields() name="fFieldId" selected=$oMasterField->getId()} | ||
| 23 | +<input type="submit" name="submit" value="Change master field"> | ||
| 24 | +</form> | ||
| 25 | + | ||
| 26 | +<p>Changing the master field set will remove all existing field | ||
| 27 | +ordering!</p> | ||
| 28 | + | ||
| 3 | <h2>Field ordering</h2> | 29 | <h2>Field ordering</h2> |
| 4 | 30 | ||
| 5 | {if $aFieldOrders} | 31 | {if $aFieldOrders} |
| @@ -20,6 +46,7 @@ affects the values available in | @@ -20,6 +46,7 @@ affects the values available in | ||
| 20 | </ul> | 46 | </ul> |
| 21 | {/if} | 47 | {/if} |
| 22 | 48 | ||
| 49 | +{ if $free_fields } | ||
| 23 | <h3>Order fields</h2> | 50 | <h3>Order fields</h2> |
| 24 | 51 | ||
| 25 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 52 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| @@ -36,3 +63,6 @@ are conditional on the values of this field: | @@ -36,3 +63,6 @@ are conditional on the values of this field: | ||
| 36 | <br /> | 63 | <br /> |
| 37 | <input type="submit" name="submit" value="Order"> | 64 | <input type="submit" name="submit" value="Order"> |
| 38 | </form> | 65 | </form> |
| 66 | +{/if} | ||
| 67 | + | ||
| 68 | +{/if} |