Commit fc92d7c3133cc09bdf1d959d5d95a1a922b365e2
1 parent
6a7e4ad5
Deal with the case where we don't have fieldsets yet, and supply all the
relevant information necessary to create a fieldset. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3709 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
13 additions
and
4 deletions
templates/ktcore/metadata/listFieldsets.smarty
| ... | ... | @@ -26,11 +26,16 @@ |
| 26 | 26 | {/if} |
| 27 | 27 | </td> |
| 28 | 28 | <td> |
| 29 | +{assign var="aFields" value=$oFieldset->getFields()} | |
| 30 | +{if $aFields} | |
| 29 | 31 | <ul> |
| 30 | -{foreach from=$oFieldset->getFields() item=oField} | |
| 32 | +{foreach from=$aFields item=oField} | |
| 31 | 33 | <li>{$oField->getName()}</li> |
| 32 | 34 | {/foreach} |
| 33 | 35 | </ul> |
| 36 | +{else} | |
| 37 | + | |
| 38 | +{/if} | |
| 34 | 39 | </td> |
| 35 | 40 | </tr> |
| 36 | 41 | </tbody> |
| ... | ... | @@ -40,8 +45,12 @@ |
| 40 | 45 | |
| 41 | 46 | <h2>Create a new document field set</h2> |
| 42 | 47 | |
| 43 | -<form method="POST"> | |
| 48 | +<form method="POST" action="{$smarty.server.PHP_SELF}"> | |
| 44 | 49 | <input type="hidden" name="action" value="new"> |
| 45 | -<input type="textbox" name="name"> | |
| 46 | -<input type="submit" name="submit" value="Create"> | |
| 50 | +<table class="prettysw" cellpadding="0" cellspacing="0"> | |
| 51 | +<tr><th>Name</th><td><input type="textbox" name="name" /></td></tr> | |
| 52 | +<tr><th>Namespace</th><td><input type="textbox" name="namespace" /></td></tr> | |
| 53 | +<tr><th>Generic</th><td><input type="checkbox" name="generic" value="true" /></td></tr> | |
| 54 | +</table> | |
| 55 | +<input type="submit" name="submit" value="Create" /> | |
| 47 | 56 | </form> | ... | ... |