source: trunk/grails-app/views/templateEditor/elements/_liFieldSelected.gsp @ 1159

Last change on this file since 1159 was 1159, checked in by robert@…, 12 years ago

Improved the template editor so that template fields can be removed from templates, even if the templates are in use, but only if the template fields are never filled. (see ticket #74)

Also changed the user registration so that the administrator confirmation mails will be sent to the administrators in production environment, but still to gscfproject@… in other environments.

  • Property svn:keywords set to Author Date Rev
File size: 2.3 KB
1<span class="listButtons">
2  <img onClick="showTemplateFieldForm( 'templateField_' + ${}); this.blur(); return false;" src="${resource( dir: 'images/icons', file: 'application_edit.png', plugin: 'famfamfam' )}" alt="Show template field properties" title="Show template field properties">
3  <g:if test="${templateField.isFilledInTemplate(template)}">
4        <img class="disabled" src="${resource( dir: 'images/icons', file: 'delete.png', plugin: 'famfamfam' )}" alt="This field can not be removed from the template, as this field is already in use." title="This field can not be removed from the template, as this field is already in use.">
5  </g:if>
6  <g:else>
7        <img onClick="removeTemplateField( ${} ); moveFieldListItem( ${}, '#availableTemplateFields' );" src="${resource( dir: 'images/icons', file: 'delete.png', plugin: 'famfamfam' )}" alt="Remove this template field from the template" title="Remove this template field from the template">
8  </g:else>
11  <span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
12  <b>${}</b>
13  (<g:if test="${templateField.unit}">${templateField.unit}, </g:if><g:render template="elements/${templateField.type.toString().toLowerCase().replaceAll(/ /,'_')}" model="[templateField: templateField]"/>)
15  <form class="templateField_form" id="templateField_${}_form" action="updateField">
16          <g:if test="${templateField.isEditable()}">
17                <g:hiddenField name="id" value="${}" />
18                <g:hiddenField name="version" value="${templateField.version}" />
19                <g:hiddenField name="renderTemplate" value="selected" />
20                <g:hiddenField name="templateId" value="${}" />
21                <g:render template="elements/fieldForm" model="['templateField': templateField, 'ontologies': ontologies, 'fieldTypes': fieldTypes]"/>
22                <div class="templateFieldButtons">
23                        <input type="button" value="Save" onClick="updateTemplateField( ${} );">
24                        <input type="button" value="Close" onClick="hideTemplateFieldForm( ${} );">
25                </div>
26          </g:if>
27        <g:else>
28                <g:render template="elements/disabledFieldForm" model="['templateField': templateField, 'ontologies': ontologies, 'fieldTypes': fieldTypes]"/>
29                <div class="templateFieldButtons">
30                        <input type="button" value="Close" onClick="hideTemplateFieldForm( ${} );">
31                </div>
32        </g:else>
33  </form>
Note: See TracBrowser for help on using the repository browser.