Ignore:
Timestamp:
Jun 11, 2010, 4:00:10 PM (11 years ago)
Author:
roberth
Message:

Improved template editor , stringlists and ontologyfields can be edited and extra checks are built in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/templateEditor/elements/_fieldForm.gsp

    r544 r558  
    11        <label for="name">Name:</label> <g:textField name="name" value="${templateField?.name}" /><br />
    2         <label for="type">Type:</label> <g:select from="${fieldTypes}" name="type" value="${templateField?.type}" /><br />
     2        <label for="type">Type:</label> <g:select from="${fieldTypes}" name="type" value="${templateField?.type}" onChange="showExtraFields( ${templateField ? templateField.id : '\'new\''} );" /><br />
     3
     4        <div class="extra stringlist_options" <g:if test="${templateField?.type.toString() == 'STRINGLIST'}">style='display: block;'</g:if>>
     5          <label for="type">Items (every item on a new line):</label>
     6                <g:textArea name="listEntries" value="${templateField?.listEntries?.name?.join( '\n' )}" />
     7        </div>
     8        <div class="extra ontologyterm_options" <g:if test="${templateField?.type.toString() == 'ONTOLOGYTERM'}">style='display: block;'</g:if>>
     9          <label for="type">Ontology:<br /><br /><a href="#" style="text-decoration: underline;" onClick="openOntologyDialog();">Add new</a></label>
     10                <g:select multiple="yes" size="5" from="${ontologies}" class="ontologySelect" optionValue="name" optionKey="id" name="ontologies" id="ontologies_${templateField?.id}" value="${templateField?.ontologies}" /><br />
     11        </div>
     12
    313        <label for="unit">Unit:</label> <g:textField name="unit" value="${templateField?.unit}" /><br />
    414        <label for="comment">Comment:</label> <g:textArea name="comment" value="${templateField?.comment}" /><br />
Note: See TracChangeset for help on using the changeset viewer.