root/trunk/grails-app/views/templateEditor/elements/_disabledFieldForm.gsp @ 1175

Revision 1175, 2.6 KB (checked in by robert@…, 3 years ago)

The templateeditor is now capable of adding new items to a stringlist (that is in use), or adding new ontologies to a ontologyterm field that is in use. See ticket #74

  • Property svn:keywords set to Author Date Rev
Line 
1        <g:hiddenField name="id" value="${templateField?.id}" />
2        <g:hiddenField name="version" value="${templateField?.version}" />
3        <g:hiddenField name="is_disabled" value="1" />
4        <g:if test="${is_selected}"><g:hiddenField name="renderTemplate" value="selected" /></g:if>
5        <g:if test="${template}"><g:hiddenField name="templateId" value="${template.id}" /></g:if>
6
7        <label for="name">Name:</label> <g:textField disabled="disabled" name="name" value="${templateField?.name}" /><br />
8        <label for="type">Type:</label> <g:textField disabled="disabled" name="type" value="${templateField?.type}" /><br />
9
10        <div class="extra stringlist_options" <g:if test="${templateField?.type.toString() == 'STRINGLIST'}">style='display: block;'</g:if>>
11          <label for="type">Used items:</label>
12                <g:textArea name="usedListEntries" disabled="disabled" value="${templateField?.getUsedListEntries().name?.join( '\n' )}" />
13          <label for="type">Extra Items (every item on a new line):</label>
14                <g:textArea name="listEntries" value="${templateField?.getNonUsedListEntries().name?.join( '\n' )}" />
15        </div>
16        <div class="extra ontologyterm_options" <g:if test="${templateField?.type.toString() == 'ONTOLOGYTERM'}">style='display: block;'</g:if>>
17          <label for="type">Used ontologies:</label> <g:textArea name="ontology" disabled="disabled" value="${templateField?.getUsedOntologies().name?.join( '\n' )}" /><br />
18
19          <label for="type">Extra ontologies:<br /><br /><a href="#" style="text-decoration: underline;" onClick="openOntologyDialog();">Add new</a></label>
20                <g:select multiple="yes" size="5" from="${ontologies - templateField?.getUsedOntologies()}" class="ontologySelect" optionValue="name" optionKey="id" name="ontologies" id="ontologies_${templateField?.id}" value="${templateField?.getNonUsedOntologies()}" /><br />
21
22        </div>
23       
24        <label for="unit">Unit:</label> <g:textField disabled="disabled" name="unit" value="${templateField?.unit}" /><br />
25        <label for="comment">Comment:</label> <g:textArea disabled="disabled" name="comment" value="${templateField?.comment}" /><br />
26        <label for="required">Required:</label> <input type="checkbox" disabled <g:if test="${templateField?.required}">checked</g:if><br />
27
28        <div class="templateFieldButtons">
29          <g:if test="${ templateField?.type.toString() == 'STRINGLIST' || templateField?.type.toString() == 'ONTOLOGYTERM' }">
30                <input type="button" value="Save" onClick="updateTemplateField( ${templateField?.id} );">
31                <input type="button" value="Close" onClick="hideTemplateFieldForm( ${templateField?.id} );">
32          </g:if>
33          <g:else>
34                <input type="button" value="Close" onClick="hideTemplateFieldForm( ${templateField?.id} );">
35          </g:else>
36        </div>
Note: See TracBrowser for help on using the browser.