Commit fc92d7c3133cc09bdf1d959d5d95a1a922b365e2

Authored by Neil Blakey-Milner
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
templates/ktcore/metadata/listFieldsets.smarty
@@ -26,11 +26,16 @@ @@ -26,11 +26,16 @@
26 {/if} 26 {/if}
27 </td> 27 </td>
28 <td> 28 <td>
  29 +{assign var="aFields" value=$oFieldset->getFields()}
  30 +{if $aFields}
29 <ul> 31 <ul>
30 -{foreach from=$oFieldset->getFields() item=oField} 32 +{foreach from=$aFields item=oField}
31 <li>{$oField->getName()}</li> 33 <li>{$oField->getName()}</li>
32 {/foreach} 34 {/foreach}
33 </ul> 35 </ul>
  36 +{else}
  37 +&nbsp;
  38 +{/if}
34 </td> 39 </td>
35 </tr> 40 </tr>
36 </tbody> 41 </tbody>
@@ -40,8 +45,12 @@ @@ -40,8 +45,12 @@
40 45
41 <h2>Create a new document field set</h2> 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 <input type="hidden" name="action" value="new"> 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 </form> 56 </form>