www/admin/annotationtypes/edit_annotationtype.jsp

Code
Comments
Other
Rev Date Author Line
836 28 Jun 05 nicklas 1 <%-- $Id$
836 28 Jun 05 nicklas 2   ------------------------------------------------------------------
3675 16 Aug 07 jari 3   Copyright (C) 2005 Nicklas Nordborg
5425 23 Sep 10 nicklas 4   Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg
836 28 Jun 05 nicklas 5
2304 22 May 06 jari 6   This file is part of BASE - BioArray Software Environment.
2304 22 May 06 jari 7   Available at http://base.thep.lu.se/
836 28 Jun 05 nicklas 8
836 28 Jun 05 nicklas 9   BASE is free software; you can redistribute it and/or
836 28 Jun 05 nicklas 10   modify it under the terms of the GNU General Public License
4476 05 Sep 08 jari 11   as published by the Free Software Foundation; either version 3
836 28 Jun 05 nicklas 12   of the License, or (at your option) any later version.
836 28 Jun 05 nicklas 13
836 28 Jun 05 nicklas 14   BASE is distributed in the hope that it will be useful,
836 28 Jun 05 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
836 28 Jun 05 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
836 28 Jun 05 nicklas 17   GNU General Public License for more details.
836 28 Jun 05 nicklas 18
836 28 Jun 05 nicklas 19   You should have received a copy of the GNU General Public License
4510 11 Sep 08 jari 20   along with BASE. If not, see <http://www.gnu.org/licenses/>.
836 28 Jun 05 nicklas 21   ------------------------------------------------------------------
836 28 Jun 05 nicklas 22
1980 14 Feb 06 nicklas 23
836 28 Jun 05 nicklas 24   @author Nicklas
836 28 Jun 05 nicklas 25   @version 2.0
836 28 Jun 05 nicklas 26 --%>
5426 24 Sep 10 nicklas 27 <%@ page pageEncoding="UTF-8" session="false"
836 28 Jun 05 nicklas 28   import="net.sf.basedb.core.SessionControl"
836 28 Jun 05 nicklas 29   import="net.sf.basedb.core.DbControl"
836 28 Jun 05 nicklas 30   import="net.sf.basedb.core.Item"
936 14 Jul 05 nicklas 31   import="net.sf.basedb.core.Type"
1980 14 Feb 06 nicklas 32   import="net.sf.basedb.core.ItemContext"
3890 30 Oct 07 nicklas 33   import="net.sf.basedb.core.Include"
836 28 Jun 05 nicklas 34   import="net.sf.basedb.core.Permission"
836 28 Jun 05 nicklas 35   import="net.sf.basedb.core.AnnotationType"
2515 14 Aug 06 nicklas 36   import="net.sf.basedb.core.AnnotationTypeCategory"
4544 25 Sep 08 nicklas 37   import="net.sf.basedb.core.Quantity"
4544 25 Sep 08 nicklas 38   import="net.sf.basedb.core.Unit"
1980 14 Feb 06 nicklas 39   import="net.sf.basedb.core.SystemItems"
1980 14 Feb 06 nicklas 40   import="net.sf.basedb.core.Metadata"
1980 14 Feb 06 nicklas 41   import="net.sf.basedb.core.ItemQuery"
1980 14 Feb 06 nicklas 42   import="net.sf.basedb.core.ItemResultList"
1980 14 Feb 06 nicklas 43   import="net.sf.basedb.core.PermissionDeniedException"
1980 14 Feb 06 nicklas 44   import="net.sf.basedb.core.query.Orders"
1980 14 Feb 06 nicklas 45   import="net.sf.basedb.core.query.Hql"
836 28 Jun 05 nicklas 46   import="net.sf.basedb.clients.web.Base"
836 28 Jun 05 nicklas 47   import="net.sf.basedb.clients.web.util.HTML"
2753 20 Oct 06 nicklas 48   import="net.sf.basedb.util.Values"
2942 22 Nov 06 nicklas 49   import="net.sf.basedb.util.formatter.Formatter"
2942 22 Nov 06 nicklas 50   import="net.sf.basedb.clients.web.formatter.FormatterFactory"
2942 22 Nov 06 nicklas 51   import="net.sf.basedb.clients.web.formatter.FormatterSettings"
5510 19 Nov 10 nicklas 52   import="net.sf.basedb.core.plugin.GuiContext"
5510 19 Nov 10 nicklas 53   import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
5510 19 Nov 10 nicklas 54   import="net.sf.basedb.clients.web.extensions.JspContext"
5510 19 Nov 10 nicklas 55   import="net.sf.basedb.clients.web.extensions.edit.EditUtil"
7604 25 Feb 19 nicklas 56   import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction"
5510 19 Nov 10 nicklas 57   import="net.sf.basedb.util.extensions.ExtensionsInvoker"
6294 13 Jun 13 nicklas 58   import="net.sf.basedb.util.json.NameableConverter"
6294 13 Jun 13 nicklas 59   import="net.sf.basedb.util.json.JsonUtil"
6294 13 Jun 13 nicklas 60   import="net.sf.basedb.util.json.JsonConverter"
2942 22 Nov 06 nicklas 61   import="java.util.Date"
836 28 Jun 05 nicklas 62   import="java.util.Set"
2942 22 Nov 06 nicklas 63   import="java.util.List"
6294 13 Jun 13 nicklas 64   import="java.util.Collections"
6294 13 Jun 13 nicklas 65   import="org.json.simple.JSONObject"
6294 13 Jun 13 nicklas 66   import="org.json.simple.JSONArray"
836 28 Jun 05 nicklas 67 %>
836 28 Jun 05 nicklas 68 <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
836 28 Jun 05 nicklas 69 <%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %>
6149 25 Sep 12 nicklas 70 <%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %>
836 28 Jun 05 nicklas 71 <%
1980 14 Feb 06 nicklas 72 final Item itemType = Item.ANNOTATIONTYPE;
1980 14 Feb 06 nicklas 73 final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
1980 14 Feb 06 nicklas 74 final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null);
1980 14 Feb 06 nicklas 75 final int itemId = cc.getId();
836 28 Jun 05 nicklas 76 final String ID = sc.getId();
836 28 Jun 05 nicklas 77 final float scale = Base.getScale(sc);
7954 12 May 21 nicklas 78 final DbControl dc = sc.newDbControl(":Edit "+itemType);
836 28 Jun 05 nicklas 79 try
836 28 Jun 05 nicklas 80 {
836 28 Jun 05 nicklas 81   String title = null;
836 28 Jun 05 nicklas 82   AnnotationType annotationType = null;
2515 14 Aug 06 nicklas 83   ItemQuery<AnnotationTypeCategory> categoryQuery = null;
4544 25 Sep 08 nicklas 84   ItemQuery<Unit> unitQuery = null;
6294 13 Jun 13 nicklas 85   ItemQuery<Unit> usableUnitsQuery = null;
6294 13 Jun 13 nicklas 86   Set<Item> enabledForItems = null;
1980 14 Feb 06 nicklas 87   Type valueType = null;
4544 25 Sep 08 nicklas 88   boolean readCurrentQuantity = true;
4544 25 Sep 08 nicklas 89   int currentQuantityId = 0;
4544 25 Sep 08 nicklas 90   boolean readCurrentUnit = true;
4544 25 Sep 08 nicklas 91   int currentUnitId = 0;
7257 08 Dec 16 nicklas 92   long numProjectSpecificAnnotations = 0;
7257 08 Dec 16 nicklas 93   
1980 14 Feb 06 nicklas 94   if (itemId == 0)
836 28 Jun 05 nicklas 95   {
836 28 Jun 05 nicklas 96     title = "Create annotation type";
1980 14 Feb 06 nicklas 97     valueType = Type.valueOf(request.getParameter("value_type"));
5156 22 Oct 09 nicklas 98     if (valueType.isNumerical()) unitQuery = Unit.getQuery();  
1980 14 Feb 06 nicklas 99     cc.removeObject("item");
6294 13 Jun 13 nicklas 100     int itemCode = Values.getInt(cc.getPropertyValue("@itemTypes"), -1);
6294 13 Jun 13 nicklas 101     if (itemCode > 0) 
6294 13 Jun 13 nicklas 102     {
6294 13 Jun 13 nicklas 103       enabledForItems = Collections.singleton(Item.fromValue(itemCode));
6294 13 Jun 13 nicklas 104     }
6294 13 Jun 13 nicklas 105     else
6294 13 Jun 13 nicklas 106     {
6294 13 Jun 13 nicklas 107       enabledForItems = Collections.emptySet();
6294 13 Jun 13 nicklas 108     }
836 28 Jun 05 nicklas 109   }
836 28 Jun 05 nicklas 110   else
836 28 Jun 05 nicklas 111   {
1980 14 Feb 06 nicklas 112     annotationType = AnnotationType.getById(dc, itemId);
2515 14 Aug 06 nicklas 113     annotationType.checkPermission(Permission.WRITE);
1980 14 Feb 06 nicklas 114     valueType = annotationType.getValueType();
6294 13 Jun 13 nicklas 115     enabledForItems = annotationType.getEnabledItems();
7257 08 Dec 16 nicklas 116     numProjectSpecificAnnotations = annotationType.countProjectSpecificAnnotations();
6294 13 Jun 13 nicklas 117     
1980 14 Feb 06 nicklas 118     cc.setObject("item", annotationType);
836 28 Jun 05 nicklas 119     title = "Edit annotation type -- " + HTML.encodeTags(annotationType.getName());
2515 14 Aug 06 nicklas 120     categoryQuery = annotationType.getCategories();
3890 30 Oct 07 nicklas 121     categoryQuery.include(Include.ALL);
2515 14 Aug 06 nicklas 122     categoryQuery.order(Orders.asc(Hql.property("name")));
6294 13 Jun 13 nicklas 123     
6294 13 Jun 13 nicklas 124     usableUnitsQuery = annotationType.getUsableUnits();
6294 13 Jun 13 nicklas 125     usableUnitsQuery.include(Include.ALL);
6294 13 Jun 13 nicklas 126     usableUnitsQuery.order(Orders.asc(Hql.property("referenceFactor")));
6294 13 Jun 13 nicklas 127     usableUnitsQuery.order(Orders.asc(Hql.property("name")));
6294 13 Jun 13 nicklas 128     
4544 25 Sep 08 nicklas 129     try
4544 25 Sep 08 nicklas 130     {
4669 26 Nov 08 nicklas 131       if (annotationType.getValueType().isNumerical())
4544 25 Sep 08 nicklas 132       {
4669 26 Nov 08 nicklas 133         Quantity quantity = annotationType.getQuantity();
4669 26 Nov 08 nicklas 134         if (quantity != null) 
4669 26 Nov 08 nicklas 135         {
4669 26 Nov 08 nicklas 136           currentQuantityId = quantity.getId();
4669 26 Nov 08 nicklas 137           unitQuery = quantity.getUnits();
4669 26 Nov 08 nicklas 138         }
4669 26 Nov 08 nicklas 139         else
4669 26 Nov 08 nicklas 140         {
4669 26 Nov 08 nicklas 141           unitQuery = Unit.getQuery();
4669 26 Nov 08 nicklas 142         }
4669 26 Nov 08 nicklas 143         Unit unit = annotationType.getDefaultUnit();
4669 26 Nov 08 nicklas 144         if (unit != null) currentUnitId = unit.getId();
4544 25 Sep 08 nicklas 145       }
4544 25 Sep 08 nicklas 146     }
4544 25 Sep 08 nicklas 147     catch (PermissionDeniedException ex)
4544 25 Sep 08 nicklas 148     {
4544 25 Sep 08 nicklas 149       readCurrentQuantity = false;
4544 25 Sep 08 nicklas 150       readCurrentUnit = false;
4544 25 Sep 08 nicklas 151     }
836 28 Jun 05 nicklas 152   }
4669 26 Nov 08 nicklas 153
6294 13 Jun 13 nicklas 154   JSONArray jsonQuantities = new JSONArray();
4669 26 Nov 08 nicklas 155   if (unitQuery != null)
4669 26 Nov 08 nicklas 156   {
4669 26 Nov 08 nicklas 157     unitQuery.include(Include.ALL);
4669 26 Nov 08 nicklas 158     unitQuery.order(Orders.asc(Hql.property("quantity.name")));
4669 26 Nov 08 nicklas 159     unitQuery.order(Orders.asc(Hql.property("referenceFactor")));
4669 26 Nov 08 nicklas 160     unitQuery.order(Orders.asc(Hql.property("name")));
6294 13 Jun 13 nicklas 161
6294 13 Jun 13 nicklas 162     Quantity prevQuantity = null;
6294 13 Jun 13 nicklas 163     JSONArray jsonUnits = null;
6294 13 Jun 13 nicklas 164     for (Unit unit : unitQuery.list(dc))
6294 13 Jun 13 nicklas 165     {
6294 13 Jun 13 nicklas 166       Quantity quantity = unit.getQuantity();
6294 13 Jun 13 nicklas 167       if (!quantity.equals(prevQuantity))
6294 13 Jun 13 nicklas 168       {
6294 13 Jun 13 nicklas 169         prevQuantity = quantity;
6294 13 Jun 13 nicklas 170         JSONObject jsonQuantity = new JSONObject();
6294 13 Jun 13 nicklas 171         jsonUnits = new JSONArray();
6294 13 Jun 13 nicklas 172         jsonQuantity.put("id", quantity.getId());
6294 13 Jun 13 nicklas 173         jsonQuantity.put("name", quantity.getName());
6294 13 Jun 13 nicklas 174         jsonQuantity.put("units", jsonUnits);
6294 13 Jun 13 nicklas 175
6294 13 Jun 13 nicklas 176         jsonQuantities.add(jsonQuantity);
6294 13 Jun 13 nicklas 177       }
6294 13 Jun 13 nicklas 178       
6294 13 Jun 13 nicklas 179       JSONObject jsonUnit = new JSONObject();
6294 13 Jun 13 nicklas 180       jsonUnit.put("id", unit.getId());
6294 13 Jun 13 nicklas 181       jsonUnit.put("name", unit.getName());
6294 13 Jun 13 nicklas 182       jsonUnit.put("symbol", unit.getDisplaySymbol());
6294 13 Jun 13 nicklas 183       jsonUnits.add(jsonUnit);
6294 13 Jun 13 nicklas 184     }
4669 26 Nov 08 nicklas 185   }
836 28 Jun 05 nicklas 186   
6294 13 Jun 13 nicklas 187   JSONObject jsonUsableUnits = new JSONObject();
6294 13 Jun 13 nicklas 188   jsonUsableUnits.put("itemType", "UNIT");
6294 13 Jun 13 nicklas 189   if (usableUnitsQuery != null)
6294 13 Jun 13 nicklas 190   {
6294 13 Jun 13 nicklas 191     jsonUsableUnits.put("items", JsonUtil.toArray(usableUnitsQuery.iterate(dc), new NameableConverter<Unit>()
6294 13 Jun 13 nicklas 192     {
6294 13 Jun 13 nicklas 193       protected void setMore(JSONObject json, Unit unit)
6294 13 Jun 13 nicklas 194       {
6294 13 Jun 13 nicklas 195         json.put("name", unit.getName() + " [ " + unit.getDisplaySymbol() + " ]");
6294 13 Jun 13 nicklas 196       }
6294 13 Jun 13 nicklas 197     }));
6294 13 Jun 13 nicklas 198   }
6217 14 Dec 12 nicklas 199   
6294 13 Jun 13 nicklas 200   JSONObject jsonCategories = new JSONObject();
6294 13 Jun 13 nicklas 201   jsonCategories.put("itemType", "ANNOTATIONTYPECATEGORY");
6294 13 Jun 13 nicklas 202   if (categoryQuery != null)
6294 13 Jun 13 nicklas 203   {
7604 25 Feb 19 nicklas 204     jsonCategories.put("items", JsonUtil.toArray(categoryQuery.iterate(dc), new NameableConverter<AnnotationTypeCategory>()));
6294 13 Jun 13 nicklas 205   }
6217 14 Dec 12 nicklas 206   
2942 22 Nov 06 nicklas 207   Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
2942 22 Nov 06 nicklas 208   String dateFormat = FormatterSettings.getDateFormat(sc);
2942 22 Nov 06 nicklas 209   String jsDateFormat = HTML.javaScriptEncode(dateFormat);
2942 22 Nov 06 nicklas 210   String htmlDateFormat = HTML.encodeTags(dateFormat);
5423 23 Sep 10 nicklas 211   
5423 23 Sep 10 nicklas 212   Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc);
5423 23 Sep 10 nicklas 213   String dateTimeFormat = FormatterSettings.getDateTimeFormat(sc);
5423 23 Sep 10 nicklas 214   String jsDateTimeFormat = HTML.javaScriptEncode(dateTimeFormat);
5423 23 Sep 10 nicklas 215   String htmlDateTimeFormat = HTML.encodeTags(dateTimeFormat);
5510 19 Nov 10 nicklas 216   JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), annotationType);
7604 25 Feb 19 nicklas 217   ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext);
836 28 Jun 05 nicklas 218   %>
6294 13 Jun 13 nicklas 219   <base:page type="popup" title="<%=title%>" id="edit-page">
6294 13 Jun 13 nicklas 220   <base:head scripts="tabcontrol-2.js,linkitems-2.js,~annotationtypes.js" styles="tabcontrol.css">
5510 19 Nov 10 nicklas 221     <ext:scripts context="<%=jspContext%>" />
5510 19 Nov 10 nicklas 222     <ext:stylesheets context="<%=jspContext%>" />
6294 13 Jun 13 nicklas 223   </base:head>
6294 13 Jun 13 nicklas 224   <base:body>
6294 13 Jun 13 nicklas 225     <h1><%=title%> <base:help tabcontrol="settings" /></h1>
1980 14 Feb 06 nicklas 226     
6387 18 Dec 13 nicklas 227     <div id="page-data" class="datacontainer"
6294 13 Jun 13 nicklas 228       data-current-quantity="<%=currentQuantityId%>"
6294 13 Jun 13 nicklas 229       data-current-unit="<%=currentUnitId%>"
6294 13 Jun 13 nicklas 230       data-units="<%=HTML.encodeTags(jsonQuantities.toJSONString())%>"
6294 13 Jun 13 nicklas 231       ></div>
845 29 Jun 05 nicklas 232     
6162 10 Oct 12 nicklas 233     <form action="index.jsp?ID=<%=ID%>" method="post" name="annotationType">
1980 14 Feb 06 nicklas 234     <input type="hidden" name="cmd" value="UpdateItem">
1980 14 Feb 06 nicklas 235     <input type="hidden" name="value_type" value="<%=valueType.name()%>">
845 29 Jun 05 nicklas 236
5922 11 Jan 12 nicklas 237     <t:tabcontrol id="settings" 
5922 11 Jan 12 nicklas 238       subclass="content dialogtabcontrol"
5510 19 Nov 10 nicklas 239       position="bottom" remember="<%=annotationType != null%>"
5510 19 Nov 10 nicklas 240       extensions="<%=invoker%>">
6294 13 Jun 13 nicklas 241     <t:tab id="info" title="Annotation type" helpid="annotationtype.edit">
5922 11 Jan 12 nicklas 242       <table class="fullform input100">
836 28 Jun 05 nicklas 243       <tr>
5922 11 Jan 12 nicklas 244         <th>Value type</th>
1980 14 Feb 06 nicklas 245         <td><%=valueType%></td>
5922 11 Jan 12 nicklas 246         <td></td>
836 28 Jun 05 nicklas 247       </tr>
836 28 Jun 05 nicklas 248       <tr>
5922 11 Jan 12 nicklas 249         <th>Name</th>
6294 13 Jun 13 nicklas 250         <td><input class="text required auto-init" data-auto-init="<%=annotationType == null ? "focus-select" : "focus" %>"
6294 13 Jun 13 nicklas 251           type="text" name="name" 
1980 14 Feb 06 nicklas 252           value="<%=HTML.encodeTags(annotationType == null ? 
1980 14 Feb 06 nicklas 253           Values.getString(cc.getPropertyValue("name"), "New "+valueType+" annotation type") : annotationType.getName())%>" 
5922 11 Jan 12 nicklas 254           maxlength="<%=AnnotationType.MAX_NAME_LENGTH%>"></td>
5922 11 Jan 12 nicklas 255         <td></td>
836 28 Jun 05 nicklas 256       </tr>
836 28 Jun 05 nicklas 257       <tr>
5922 11 Jan 12 nicklas 258         <th>External ID</th>
6217 14 Dec 12 nicklas 259         <td><input class="text" type="text" name="external_id" 
2933 17 Nov 06 nicklas 260           value="<%=HTML.encodeTags(annotationType == null ? 
5922 11 Jan 12 nicklas 261           Values.getString(cc.getPropertyValue("externalId"), "") : annotationType.getExternalId())%>" 
5922 11 Jan 12 nicklas 262           maxlength="<%=AnnotationType.MAX_EXTERNAL_ID_LENGTH%>"></td>
5922 11 Jan 12 nicklas 263         <td></td>
2933 17 Nov 06 nicklas 264       </tr>
2933 17 Nov 06 nicklas 265       <tr>
6149 25 Sep 12 nicklas 266         <th>Multiplicity</th>
6294 13 Jun 13 nicklas 267         <td><input class="text auto-init" type="text" name="multiplicity" id="multiplicity"
6294 13 Jun 13 nicklas 268           data-auto-init="integer-only"
2239 11 May 06 nicklas 269           value="<%=annotationType == null ? Values.getString(cc.getPropertyValue("multiplicity"), "1") : 
5922 11 Jan 12 nicklas 270           Integer.toString(annotationType.getMultiplicity())%>" style="width: 15em;"
6294 13 Jun 13 nicklas 271           maxlength="10">
1980 14 Feb 06 nicklas 272           0 or empty = unlimited
5922 11 Jan 12 nicklas 273         </td>
5922 11 Jan 12 nicklas 274         <td></td>
836 28 Jun 05 nicklas 275       </tr>
5922 11 Jan 12 nicklas 276       <tr class="<%=valueType == Type.TEXT ? "big" : ""%>">
5922 11 Jan 12 nicklas 277         <th>Default value</th>
845 29 Jun 05 nicklas 278         <td>
845 29 Jun 05 nicklas 279           <%
1980 14 Feb 06 nicklas 280           String defaultValue = annotationType == null ? cc.getPropertyValue("defaultValue") : annotationType.getDefaultValue();
5922 11 Jan 12 nicklas 281           boolean hasZoom = false;
936 14 Jul 05 nicklas 282           if (valueType == Type.INT || valueType == Type.LONG)
845 29 Jun 05 nicklas 283           {
845 29 Jun 05 nicklas 284             %>
6294 13 Jun 13 nicklas 285             <input class="text auto-init" type="text" name="defaultValue" id="defaultValue"
6294 13 Jun 13 nicklas 286               data-auto-init="integer-only"
5922 11 Jan 12 nicklas 287               value="<%=HTML.encodeTags(defaultValue)%>" style="width: 15em;"
6294 13 Jun 13 nicklas 288               maxlength="20">
845 29 Jun 05 nicklas 289             <%
845 29 Jun 05 nicklas 290           }
936 14 Jul 05 nicklas 291           else if (valueType == Type.FLOAT || valueType == Type.DOUBLE)
845 29 Jun 05 nicklas 292           {
845 29 Jun 05 nicklas 293             %>
6294 13 Jun 13 nicklas 294             <input class="text auto-init" type="text" name="defaultValue" id="defaultValue"
6294 13 Jun 13 nicklas 295               data-auto-init="number-only"
5922 11 Jan 12 nicklas 296               value="<%=HTML.encodeTags(defaultValue)%>" style="width: 15em;"
6294 13 Jun 13 nicklas 297               maxlength="20">
845 29 Jun 05 nicklas 298             <%
845 29 Jun 05 nicklas 299           }
936 14 Jul 05 nicklas 300           else if (valueType == Type.BOOLEAN)
845 29 Jun 05 nicklas 301           {
1980 14 Feb 06 nicklas 302             boolean booleanDefaultValue = Values.getBoolean(defaultValue);
845 29 Jun 05 nicklas 303             %>
5812 17 Oct 11 nicklas 304             <input type="radio" name="defaultValue" id="defaultTrue" value="true" 
1980 14 Feb 06 nicklas 305               <%=booleanDefaultValue ? "checked" : ""%>
5812 17 Oct 11 nicklas 306             ><label for="defaultTrue">true</label>
5812 17 Oct 11 nicklas 307             <input type="radio" name="defaultValue" id="defaultFalse" value="false" 
1980 14 Feb 06 nicklas 308               <%=booleanDefaultValue ? "" : "checked"%>
5812 17 Oct 11 nicklas 309             ><label for="defaultFalse">false</label>
845 29 Jun 05 nicklas 310             <%
845 29 Jun 05 nicklas 311           }
936 14 Jul 05 nicklas 312           else if (valueType == Type.DATE)
845 29 Jun 05 nicklas 313           {
845 29 Jun 05 nicklas 314             %>
5922 11 Jan 12 nicklas 315             <table>
845 29 Jun 05 nicklas 316             <tr>
845 29 Jun 05 nicklas 317             <td>
6217 14 Dec 12 nicklas 318               <input class="text" type="text" name="defaultValue" id="defaultValue"
5922 11 Jan 12 nicklas 319                 value="<%=HTML.encodeTags(defaultValue)%>" style="width: 15em;"
6149 25 Sep 12 nicklas 320                 maxlength="20" title="Enter date in format: <%=htmlDateFormat%>">
845 29 Jun 05 nicklas 321             </td>
845 29 Jun 05 nicklas 322             <td>
6216 14 Dec 12 nicklas 323               <base:calendar textarea="defaultValue" title="Default value" />
845 29 Jun 05 nicklas 324             </td>
845 29 Jun 05 nicklas 325             </tr>
845 29 Jun 05 nicklas 326             </table>
845 29 Jun 05 nicklas 327             <%
845 29 Jun 05 nicklas 328           }
5423 23 Sep 10 nicklas 329           else if (valueType == Type.TIMESTAMP)
5423 23 Sep 10 nicklas 330           {
5423 23 Sep 10 nicklas 331             %>
5922 11 Jan 12 nicklas 332             <table>
5423 23 Sep 10 nicklas 333             <tr>
5423 23 Sep 10 nicklas 334             <td>
6217 14 Dec 12 nicklas 335               <input class="text" type="text" name="defaultValue" id="defaultValue"
5922 11 Jan 12 nicklas 336                 value="<%=HTML.encodeTags(defaultValue)%>" style="width: 15em;"
6149 25 Sep 12 nicklas 337                 maxlength="30" title="Enter date in format: <%=htmlDateTimeFormat%>">
5423 23 Sep 10 nicklas 338             </td>
5423 23 Sep 10 nicklas 339             <td>
6216 14 Dec 12 nicklas 340               <base:calendar textarea="defaultValue" title="Default value" 
6216 14 Dec 12 nicklas 341                 data-use-time="1" tooltip="Select a date and time from a calendar" />
5423 23 Sep 10 nicklas 342             </td>
5423 23 Sep 10 nicklas 343             </tr>
5423 23 Sep 10 nicklas 344             </table>
5423 23 Sep 10 nicklas 345             <%
5423 23 Sep 10 nicklas 346           }
936 14 Jul 05 nicklas 347           else if (valueType == Type.STRING)
845 29 Jun 05 nicklas 348           {
845 29 Jun 05 nicklas 349             %>
6217 14 Dec 12 nicklas 350             <input class="text" type="text" name="defaultValue" id="defaultValue"
1980 14 Feb 06 nicklas 351               value="<%=HTML.encodeTags(defaultValue)%>" 
5922 11 Jan 12 nicklas 352               maxlength="<%=AnnotationType.MAX_DEFAULT_VALUE_LENGTH%>">
1980 14 Feb 06 nicklas 353           <%
845 29 Jun 05 nicklas 354           }
936 14 Jul 05 nicklas 355           else if (valueType == Type.TEXT)
845 29 Jun 05 nicklas 356           {
5922 11 Jan 12 nicklas 357             hasZoom = true;
845 29 Jun 05 nicklas 358             %>
6217 14 Dec 12 nicklas 359             <textarea class="text" rows="4" name="defaultValue" id="defaultValue"
5905 12 Dec 11 nicklas 360               ><%=HTML.encodeTags(defaultValue)%></textarea>
845 29 Jun 05 nicklas 361             <%
845 29 Jun 05 nicklas 362           }
845 29 Jun 05 nicklas 363           %>
845 29 Jun 05 nicklas 364         </td>
5922 11 Jan 12 nicklas 365         <td>
5922 11 Jan 12 nicklas 366         <%
5922 11 Jan 12 nicklas 367         if (hasZoom)
5922 11 Jan 12 nicklas 368         {
5922 11 Jan 12 nicklas 369           %>
6215 13 Dec 12 nicklas 370           <base:zoom textarea="defaultValue" title="Default value" />
5922 11 Jan 12 nicklas 371           <%
5922 11 Jan 12 nicklas 372         }
5922 11 Jan 12 nicklas 373         %>
5922 11 Jan 12 nicklas 374         </td>
845 29 Jun 05 nicklas 375       </tr>
7616 04 Mar 19 nicklas 376       <%
7616 04 Mar 19 nicklas 377       if (valueType == Type.STRING || valueType == Type.INT || valueType == Type.LONG)
7616 04 Mar 19 nicklas 378       {
7616 04 Mar 19 nicklas 379         %>
7616 04 Mar 19 nicklas 380         <tr>
7616 04 Mar 19 nicklas 381           <th><label for="identifier">Is identifier</label></th>
7616 04 Mar 19 nicklas 382           <td><input type="checkbox" name="identifier" id="identifier" value="1" 
7616 04 Mar 19 nicklas 383             <%=(annotationType != null && annotationType.isIdentifier()) || 
7616 04 Mar 19 nicklas 384               (annotationType == null && Values.getBoolean(cc.getPropertyValue("identifier"))) ? "checked" : ""%>
7616 04 Mar 19 nicklas 385             >
7616 04 Mar 19 nicklas 386           </td>
7616 04 Mar 19 nicklas 387           <td></td>
7616 04 Mar 19 nicklas 388         </tr>
7616 04 Mar 19 nicklas 389         <%
7616 04 Mar 19 nicklas 390       }
7616 04 Mar 19 nicklas 391       %>
845 29 Jun 05 nicklas 392       <tr>
5922 11 Jan 12 nicklas 393         <th><label for="required_for_miame">Required for MIAME</label></th>
5922 11 Jan 12 nicklas 394         <td><input type="checkbox" name="required_for_miame" id="required_for_miame" value="1" 
1980 14 Feb 06 nicklas 395           <%=(annotationType != null && annotationType.isRequiredForMiame()) || 
1980 14 Feb 06 nicklas 396             (annotationType == null && Values.getBoolean(cc.getPropertyValue("requiredForMiame"))) ? "checked" : ""%>
6149 25 Sep 12 nicklas 397           >
5922 11 Jan 12 nicklas 398         </td>
5922 11 Jan 12 nicklas 399         <td></td>
845 29 Jun 05 nicklas 400       </tr>
2875 08 Nov 06 nicklas 401       <tr>
5922 11 Jan 12 nicklas 402         <th><label for="is_protocol_parameter">Protocol parameter</label></th>
5922 11 Jan 12 nicklas 403         <td><input type="checkbox" name="is_protocol_parameter" id="is_protocol_parameter" value="1" 
2875 08 Nov 06 nicklas 404           <%=(annotationType != null && annotationType.isProtocolParameter()) || 
2875 08 Nov 06 nicklas 405             (annotationType == null && Values.getBoolean(cc.getPropertyValue("protocolParameter"))) ? "checked" : ""%>
6149 25 Sep 12 nicklas 406           >
5922 11 Jan 12 nicklas 407         </td>
5922 11 Jan 12 nicklas 408         <td></td>
2875 08 Nov 06 nicklas 409       </tr>
6358 27 Nov 13 nicklas 410       <tr>
7166 07 Jun 16 nicklas 411         <th><label for="disable_log">Disable history log</label></th>
6358 27 Nov 13 nicklas 412         <td><input type="checkbox" name="disable_log" id="disable_log" value="1" 
6358 27 Nov 13 nicklas 413           <%=(annotationType != null && annotationType.getDisableLogOfValues()) || 
6358 27 Nov 13 nicklas 414             (annotationType == null && Values.getBoolean(cc.getPropertyValue("disableLogOfValues"))) ? "checked" : ""%>
6358 27 Nov 13 nicklas 415           >
6358 27 Nov 13 nicklas 416         </td>
6358 27 Nov 13 nicklas 417         <td></td>
6358 27 Nov 13 nicklas 418       </tr>
6728 13 Feb 15 nicklas 419       <tr>
6728 13 Feb 15 nicklas 420         <th><label for="disable_inheritance">Disable inheritance</label></th>
6728 13 Feb 15 nicklas 421         <td><input type="checkbox" name="disable_inheritance" id="disable_inheritance" value="1" 
6728 13 Feb 15 nicklas 422           <%=(annotationType != null && annotationType.getDisableInheritance()) || 
6728 13 Feb 15 nicklas 423             (annotationType == null && Values.getBoolean(cc.getPropertyValue("disableInheritance"))) ? "checked" : ""%>
6728 13 Feb 15 nicklas 424           >
6728 13 Feb 15 nicklas 425         </td>
6728 13 Feb 15 nicklas 426         <td></td>
6728 13 Feb 15 nicklas 427       </tr>
7244 01 Dec 16 nicklas 428       <tr>
7244 01 Dec 16 nicklas 429         <th><label for="project_annotations">Project annotations</label></th>
7244 01 Dec 16 nicklas 430         <td><input type="checkbox" name="project_annotations" id="project_annotations" value="1" 
7244 01 Dec 16 nicklas 431           <%=(annotationType != null && annotationType.getProjectAnnotations()) || 
7244 01 Dec 16 nicklas 432             (annotationType == null && Values.getBoolean(cc.getPropertyValue("projectAnnotations"))) ? "checked" : ""%>
7257 08 Dec 16 nicklas 433             <%=numProjectSpecificAnnotations > 0 ? "disabled" : "" %>
7244 01 Dec 16 nicklas 434           >
7257 08 Dec 16 nicklas 435           <%
7257 08 Dec 16 nicklas 436           if (numProjectSpecificAnnotations > 0)
7257 08 Dec 16 nicklas 437           {
7257 08 Dec 16 nicklas 438             %>
7257 08 Dec 16 nicklas 439             There are <%=numProjectSpecificAnnotations %> existing project-specific annotations.
7257 08 Dec 16 nicklas 440             <%
7257 08 Dec 16 nicklas 441           }
7257 08 Dec 16 nicklas 442           %>
7244 01 Dec 16 nicklas 443         </td>
7244 01 Dec 16 nicklas 444         <td></td>
7244 01 Dec 16 nicklas 445       </tr>
5922 11 Jan 12 nicklas 446       <tr class="dynamic">
5922 11 Jan 12 nicklas 447         <th>Description</th>
5922 11 Jan 12 nicklas 448         <td>
6217 14 Dec 12 nicklas 449           <textarea class="text" rows="4" name="description" id="description"
1980 14 Feb 06 nicklas 450             ><%=HTML.encodeTags(annotationType == null ? cc.getPropertyValue("description") : annotationType.getDescription())%></textarea>
6149 25 Sep 12 nicklas 451         </td>
5922 11 Jan 12 nicklas 452         <td style="width: 20px;">
6215 13 Dec 12 nicklas 453           <base:zoom textarea="description" title="Description" />
1980 14 Feb 06 nicklas 454         </td>
1980 14 Feb 06 nicklas 455       </tr>
836 28 Jun 05 nicklas 456       </table>
836 28 Jun 05 nicklas 457     </t:tab>
1980 14 Feb 06 nicklas 458     
6294 13 Jun 13 nicklas 459     <t:tab id="options" title="Options" helpid="annotationtype.edit.options">
845 29 Jun 05 nicklas 460       <%
936 14 Jul 05 nicklas 461       if (valueType == Type.INT || valueType == Type.LONG)
845 29 Jun 05 nicklas 462       {
1980 14 Feb 06 nicklas 463         Long minValue = annotationType == null ? null : annotationType.getMinValueLong();
1980 14 Feb 06 nicklas 464         Long maxValue = annotationType == null ? null : annotationType.getMaxValueLong();
1980 14 Feb 06 nicklas 465         boolean isEnumeration = annotationType == null ? 
1980 14 Feb 06 nicklas 466           Values.getBoolean(cc.getPropertyValue("enumeration")) : annotationType.isEnumeration();
1980 14 Feb 06 nicklas 467         boolean displayAsList = annotationType == null ? false : annotationType.getDisplayAsList();
845 29 Jun 05 nicklas 468         %>
5922 11 Jan 12 nicklas 469         <table class="fullform input100">
845 29 Jun 05 nicklas 470         <tr>
5922 11 Jan 12 nicklas 471           <th>Interface</th>
861 04 Jul 05 nicklas 472           <td>
5812 17 Oct 11 nicklas 473             <input type="radio" name="interface" id="interfaceBox" value="box"
861 04 Jul 05 nicklas 474               <%=!isEnumeration ? "checked" : ""%>
5812 17 Oct 11 nicklas 475             ><label for="interfaceBox">text box</label>
5812 17 Oct 11 nicklas 476             <input type="radio" name="interface" id="interfaceList" value="list" 
861 04 Jul 05 nicklas 477               <%=isEnumeration && displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 478             ><label for="interfaceList">selection list</label>
5812 17 Oct 11 nicklas 479             <input type="radio" name="interface" id="interfaceButtons" value="buttons" 
861 04 Jul 05 nicklas 480               <%=isEnumeration && !displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 481             ><label for="interfaceButtons">radiobuttons/checkboxes</label>
861 04 Jul 05 nicklas 482           </td>
5922 11 Jan 12 nicklas 483           <td></td>
861 04 Jul 05 nicklas 484         </tr>
861 04 Jul 05 nicklas 485         <tr>
5922 11 Jan 12 nicklas 486           <th>Min value</th>
845 29 Jun 05 nicklas 487           <td>
6294 13 Jun 13 nicklas 488             <input class="text auto-init" type="text" name="minValue" 
6294 13 Jun 13 nicklas 489               data-auto-init="integer-only"
5922 11 Jan 12 nicklas 490               value="<%=minValue == null ? "" : minValue.toString()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 491               maxlength="20">
845 29 Jun 05 nicklas 492             empty = no limit
845 29 Jun 05 nicklas 493           </td>
5922 11 Jan 12 nicklas 494           <td></td>
845 29 Jun 05 nicklas 495         </tr>
845 29 Jun 05 nicklas 496         <tr>
5922 11 Jan 12 nicklas 497           <th>Max value</th>
845 29 Jun 05 nicklas 498           <td>
6294 13 Jun 13 nicklas 499             <input class="text auto-init" type="text" name="maxValue" 
6294 13 Jun 13 nicklas 500               data-auto-init="integer-only"
5922 11 Jan 12 nicklas 501               value="<%=maxValue == null ? "" : maxValue.toString()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 502               maxlength="20">
845 29 Jun 05 nicklas 503             empty = no limit
845 29 Jun 05 nicklas 504           </td>
5922 11 Jan 12 nicklas 505           <td></td>
845 29 Jun 05 nicklas 506         </tr>
845 29 Jun 05 nicklas 507         <tr>
5922 11 Jan 12 nicklas 508           <th>Input box width</th>
845 29 Jun 05 nicklas 509           <td>
6294 13 Jun 13 nicklas 510             <input class="text auto-init" type="text" name="width" style="width: 15em;"
6294 13 Jun 13 nicklas 511               data-auto-init="integer-only"
1980 14 Feb 06 nicklas 512               value="<%=annotationType == null ? "" : annotationType.getWidth()%>" 
6294 13 Jun 13 nicklas 513               maxlength="10">
845 29 Jun 05 nicklas 514           </td>
5922 11 Jan 12 nicklas 515           <td></td>
845 29 Jun 05 nicklas 516         </tr>
5922 11 Jan 12 nicklas 517         <tr class="dynamic">
5922 11 Jan 12 nicklas 518           <th>Values</th>
5922 11 Jan 12 nicklas 519           <td>
861 04 Jul 05 nicklas 520             <%
1980 14 Feb 06 nicklas 521             String values = annotationType == null ? "" : Values.getString(annotationType.getValues(), "\n", true);
861 04 Jul 05 nicklas 522             %>
6294 13 Jun 13 nicklas 523             <textarea class="text auto-init" rows="10" name="values" id="values"
6294 13 Jun 13 nicklas 524               data-auto-init="integer-only"><%=HTML.encodeTags(values)%></textarea><br>
861 04 Jul 05 nicklas 525           </td>
5922 11 Jan 12 nicklas 526           <td style="width: 20px;">
6215 13 Dec 12 nicklas 527             <base:zoom textarea="values" title="Values" />
5922 11 Jan 12 nicklas 528           </td>
861 04 Jul 05 nicklas 529         </tr>
5922 11 Jan 12 nicklas 530         <tr>
5922 11 Jan 12 nicklas 531           <th class="subprompt"></th>
5922 11 Jan 12 nicklas 532           <td>One enumeration value per line</td>
5922 11 Jan 12 nicklas 533           <td></td>
5922 11 Jan 12 nicklas 534         </tr>
5922 11 Jan 12 nicklas 535         </table>
845 29 Jun 05 nicklas 536         <%
845 29 Jun 05 nicklas 537       }
936 14 Jul 05 nicklas 538       else if (valueType == Type.FLOAT || valueType == Type.DOUBLE)
845 29 Jun 05 nicklas 539       {
1980 14 Feb 06 nicklas 540         Double minValue = annotationType == null ? null : annotationType.getMinValueDouble();
1980 14 Feb 06 nicklas 541         Double maxValue = annotationType == null ? null : annotationType.getMaxValueDouble();
1980 14 Feb 06 nicklas 542         boolean isEnumeration = annotationType == null ? 
1980 14 Feb 06 nicklas 543           Values.getBoolean(cc.getPropertyValue("enumeration")) : annotationType.isEnumeration();
1980 14 Feb 06 nicklas 544         boolean displayAsList = annotationType == null ? false : annotationType.getDisplayAsList();
845 29 Jun 05 nicklas 545         %>
5922 11 Jan 12 nicklas 546         <table class="fullform input100">
845 29 Jun 05 nicklas 547         <tr>
5922 11 Jan 12 nicklas 548           <th>Interface</th>
861 04 Jul 05 nicklas 549           <td>
5812 17 Oct 11 nicklas 550             <input type="radio" name="interface" id="interfaceBox" value="box"
861 04 Jul 05 nicklas 551               <%=!isEnumeration ? "checked" : ""%>
5812 17 Oct 11 nicklas 552             ><label for="interfaceBox">text box</label>
5812 17 Oct 11 nicklas 553             <input type="radio" name="interface" id="interfaceList" value="list" 
861 04 Jul 05 nicklas 554               <%=isEnumeration && displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 555             ><label for="interfaceList">selection list</label>
5812 17 Oct 11 nicklas 556             <input type="radio" name="interface" id="interfaceButtons" value="buttons" 
861 04 Jul 05 nicklas 557               <%=isEnumeration && !displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 558             ><label for="interfaceButtons">radiobuttons/checkboxes</label>
861 04 Jul 05 nicklas 559           </td>
5922 11 Jan 12 nicklas 560           <td></td>
861 04 Jul 05 nicklas 561         </tr>
861 04 Jul 05 nicklas 562         <tr>
5922 11 Jan 12 nicklas 563           <th>Min value</th>
845 29 Jun 05 nicklas 564           <td>
6294 13 Jun 13 nicklas 565             <input class="text auto-init" type="text" name="minValue" 
6294 13 Jun 13 nicklas 566               data-auto-init="number-only"
5922 11 Jan 12 nicklas 567               value="<%=minValue == null ? "" : minValue.toString()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 568               maxlength="20">
845 29 Jun 05 nicklas 569             empty = no limit
845 29 Jun 05 nicklas 570           </td>
5922 11 Jan 12 nicklas 571           <td></td>
845 29 Jun 05 nicklas 572         </tr>
845 29 Jun 05 nicklas 573         <tr>
5922 11 Jan 12 nicklas 574           <th>Max value</th>
845 29 Jun 05 nicklas 575           <td>
6294 13 Jun 13 nicklas 576             <input class="text auto-init" type="text" name="maxValue" 
6294 13 Jun 13 nicklas 577               data-auto-init="number-only"
5922 11 Jan 12 nicklas 578               value="<%=maxValue == null ? "" : maxValue.toString()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 579               maxlength="20">
845 29 Jun 05 nicklas 580             empty = no limit
845 29 Jun 05 nicklas 581           </td>
5922 11 Jan 12 nicklas 582           <td></td>
845 29 Jun 05 nicklas 583         </tr>
845 29 Jun 05 nicklas 584         <tr>
5922 11 Jan 12 nicklas 585           <th>Input box width</th>
845 29 Jun 05 nicklas 586           <td>
6294 13 Jun 13 nicklas 587             <input class="text auto-init" type="text" name="width" 
6294 13 Jun 13 nicklas 588               data-auto-init="integer-only"
5922 11 Jan 12 nicklas 589               value="<%=annotationType == null ? "" : annotationType.getWidth()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 590               maxlength="10">
845 29 Jun 05 nicklas 591           </td>
5922 11 Jan 12 nicklas 592           <td></td>
845 29 Jun 05 nicklas 593         </tr>
5922 11 Jan 12 nicklas 594         <tr class="dynamic">
5922 11 Jan 12 nicklas 595           <th>Values</th>
5922 11 Jan 12 nicklas 596           <td>
861 04 Jul 05 nicklas 597             <%
1980 14 Feb 06 nicklas 598             String values = annotationType == null ? "" : Values.getString(annotationType.getValues(), "\n", true);
861 04 Jul 05 nicklas 599             %>
6321 11 Sep 13 nicklas 600             <textarea class="text auto-init" rows="10" name="values" id="values"
6321 11 Sep 13 nicklas 601               data-auto-init="integer-only"><%=HTML.encodeTags(values)%></textarea>
861 04 Jul 05 nicklas 602           </td>
5922 11 Jan 12 nicklas 603           <td style="width: 20px;">
6215 13 Dec 12 nicklas 604             <base:zoom textarea="values" title="Values" />
5922 11 Jan 12 nicklas 605           </td>
861 04 Jul 05 nicklas 606         </tr>
5922 11 Jan 12 nicklas 607         <tr>
5922 11 Jan 12 nicklas 608           <th class="subprompt"></th>
5922 11 Jan 12 nicklas 609           <td>One enumeration value per line</td>
5922 11 Jan 12 nicklas 610           <td></td>
5922 11 Jan 12 nicklas 611         </tr>
5922 11 Jan 12 nicklas 612         </table>
845 29 Jun 05 nicklas 613         <%
845 29 Jun 05 nicklas 614       }
936 14 Jul 05 nicklas 615       else if (valueType == Type.BOOLEAN)
845 29 Jun 05 nicklas 616       {
845 29 Jun 05 nicklas 617         %>
5922 11 Jan 12 nicklas 618         <div style="border: 1px solid transparent;">
5922 11 Jan 12 nicklas 619         <div class="messagecontainer help">
845 29 Jun 05 nicklas 620         No options for this type.
5922 11 Jan 12 nicklas 621         </div>
5922 11 Jan 12 nicklas 622         </div>
845 29 Jun 05 nicklas 623         <%
845 29 Jun 05 nicklas 624       }
936 14 Jul 05 nicklas 625       else if (valueType == Type.DATE)
845 29 Jun 05 nicklas 626       {
1980 14 Feb 06 nicklas 627         boolean isEnumeration = annotationType == null ? 
1980 14 Feb 06 nicklas 628           Values.getBoolean(cc.getPropertyValue("enumeration")) : annotationType.isEnumeration();
1980 14 Feb 06 nicklas 629         boolean displayAsList = annotationType == null ? false : annotationType.getDisplayAsList();
845 29 Jun 05 nicklas 630         %>
5922 11 Jan 12 nicklas 631         <table class="fullform input100">
861 04 Jul 05 nicklas 632         <tr>
5922 11 Jan 12 nicklas 633           <th>Interface</th>
861 04 Jul 05 nicklas 634           <td>
5812 17 Oct 11 nicklas 635             <input type="radio" name="interface" id="interfaceBox" value="box"
861 04 Jul 05 nicklas 636               <%=!isEnumeration ? "checked" : ""%>
5812 17 Oct 11 nicklas 637             ><label for="interfaceBox">text box</label>
5812 17 Oct 11 nicklas 638             <input type="radio" name="interface" id="interfaceList" value="list" 
861 04 Jul 05 nicklas 639               <%=isEnumeration && displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 640             ><label for="interfaceList">selection list</label>
5812 17 Oct 11 nicklas 641             <input type="radio" name="interface" id="interfaceButtons" value="buttons" 
861 04 Jul 05 nicklas 642               <%=isEnumeration && !displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 643             ><label for="interfaceButtons">radiobuttons/checkboxes</label>
861 04 Jul 05 nicklas 644           </td>
5922 11 Jan 12 nicklas 645           <td></td>
861 04 Jul 05 nicklas 646         </tr>
861 04 Jul 05 nicklas 647         <tr>
5922 11 Jan 12 nicklas 648           <th>Input box width</th>
861 04 Jul 05 nicklas 649           <td>
6294 13 Jun 13 nicklas 650             <input class="text auto-init" type="text" name="width" 
6294 13 Jun 13 nicklas 651               data-auto-init="integer-only"
5922 11 Jan 12 nicklas 652               value="<%=annotationType == null ? "" : annotationType.getWidth()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 653               maxlength="10">
861 04 Jul 05 nicklas 654           </td>
5922 11 Jan 12 nicklas 655           <td></td>
861 04 Jul 05 nicklas 656         </tr>
5922 11 Jan 12 nicklas 657         <tr class="dynamic">
5922 11 Jan 12 nicklas 658           <th>Values</th>
5922 11 Jan 12 nicklas 659           <td>
861 04 Jul 05 nicklas 660             <%
2942 22 Nov 06 nicklas 661             String values = annotationType == null ? "" : 
7610 27 Feb 19 nicklas 662               Values.getString(annotationType.getValues(), "\n", true, dateFormatter);
861 04 Jul 05 nicklas 663             %>
6217 14 Dec 12 nicklas 664             <textarea class="text" rows="10" name="values" id="values"
2942 22 Nov 06 nicklas 665               ><%=HTML.encodeTags(values)%></textarea>
861 04 Jul 05 nicklas 666           </td>
5922 11 Jan 12 nicklas 667           <td style="width: 20px;">
6215 13 Dec 12 nicklas 668             <base:zoom textarea="values" title="Values" />
5922 11 Jan 12 nicklas 669           </td>
861 04 Jul 05 nicklas 670         </tr>
5922 11 Jan 12 nicklas 671         <tr>
5922 11 Jan 12 nicklas 672           <th class="subprompt"></th>
5922 11 Jan 12 nicklas 673           <td>One date value (<%=htmlDateFormat%>) per line</td>
5922 11 Jan 12 nicklas 674           <td></td>
5922 11 Jan 12 nicklas 675         </tr>
5922 11 Jan 12 nicklas 676         </table>
845 29 Jun 05 nicklas 677         <%
845 29 Jun 05 nicklas 678       }
5423 23 Sep 10 nicklas 679       else if (valueType == Type.TIMESTAMP)
5423 23 Sep 10 nicklas 680       {
5423 23 Sep 10 nicklas 681         %>
5922 11 Jan 12 nicklas 682         <table class="fullform input100">
5423 23 Sep 10 nicklas 683         <tr>
5922 11 Jan 12 nicklas 684           <th>Input box width</th>
5423 23 Sep 10 nicklas 685           <td>
6294 13 Jun 13 nicklas 686             <input class="text auto-init" type="text" name="width" 
6294 13 Jun 13 nicklas 687               data-auto-init="integer-only"
5922 11 Jan 12 nicklas 688               value="<%=annotationType == null ? "" : annotationType.getWidth()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 689               maxlength="10">
5423 23 Sep 10 nicklas 690           </td>
5423 23 Sep 10 nicklas 691         </tr>
5922 11 Jan 12 nicklas 692         <tr class="dynamic">
5922 11 Jan 12 nicklas 693           <th class="subprompt"></th>
5922 11 Jan 12 nicklas 694           <td></td>
5922 11 Jan 12 nicklas 695         </tr>
5922 11 Jan 12 nicklas 696         </table>
5423 23 Sep 10 nicklas 697         <%
5423 23 Sep 10 nicklas 698       }
936 14 Jul 05 nicklas 699       else if (valueType == Type.STRING)
845 29 Jun 05 nicklas 700       {
1980 14 Feb 06 nicklas 701         Integer maxLength = annotationType == null ? null : annotationType.getMaxLength();
1980 14 Feb 06 nicklas 702         boolean isEnumeration = annotationType == null ? 
1980 14 Feb 06 nicklas 703           Values.getBoolean(cc.getPropertyValue("enumeration")) : annotationType.isEnumeration();
1980 14 Feb 06 nicklas 704         boolean displayAsList = annotationType == null ? false : annotationType.getDisplayAsList();
845 29 Jun 05 nicklas 705         %>
5922 11 Jan 12 nicklas 706         <table class="fullform input100">
845 29 Jun 05 nicklas 707         <tr>
5922 11 Jan 12 nicklas 708           <th>Interface</th>
861 04 Jul 05 nicklas 709           <td>
5812 17 Oct 11 nicklas 710             <input type="radio" name="interface" id="interfaceBox" value="box"
861 04 Jul 05 nicklas 711               <%=!isEnumeration ? "checked" : ""%>
5812 17 Oct 11 nicklas 712             ><label for="interfaceBox">text box</label>
5812 17 Oct 11 nicklas 713             <input type="radio" name="interface" id="interfaceList" value="list" 
861 04 Jul 05 nicklas 714               <%=isEnumeration && displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 715             ><label for="interfaceList">selection list</label>
5812 17 Oct 11 nicklas 716             <input type="radio" name="interface" id="interfaceButtons" value="buttons" 
861 04 Jul 05 nicklas 717               <%=isEnumeration && !displayAsList ? "checked" : ""%>
5812 17 Oct 11 nicklas 718             ><label for="interfaceButtons">radiobuttons/checkboxes</label>
861 04 Jul 05 nicklas 719           </td>
5922 11 Jan 12 nicklas 720           <td></td>
861 04 Jul 05 nicklas 721         </tr>
861 04 Jul 05 nicklas 722         <tr>
5922 11 Jan 12 nicklas 723           <th>Max length</th>
845 29 Jun 05 nicklas 724           <td>
6294 13 Jun 13 nicklas 725             <input class="text auto-init" type="text" name="maxLength"
6294 13 Jun 13 nicklas 726               data-auto-init="integer-only" 
5922 11 Jan 12 nicklas 727               value="<%=maxLength == null ? "" : maxLength.toString()%>" style="width: 5em;"
6294 13 Jun 13 nicklas 728               maxlength="3"> (1-255)
845 29 Jun 05 nicklas 729           </td>
5922 11 Jan 12 nicklas 730           <td></td>
845 29 Jun 05 nicklas 731         </tr>
845 29 Jun 05 nicklas 732         <tr>
5922 11 Jan 12 nicklas 733           <th>Input box width</th>
845 29 Jun 05 nicklas 734           <td>
6294 13 Jun 13 nicklas 735             <input class="text auto-init" type="text" name="width" 
6294 13 Jun 13 nicklas 736               data-auto-init="integer-only" 
5922 11 Jan 12 nicklas 737               value="<%=annotationType == null ? "" : annotationType.getWidth()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 738               maxlength="10">
845 29 Jun 05 nicklas 739           </td>
5922 11 Jan 12 nicklas 740           <td></td>
845 29 Jun 05 nicklas 741         </tr>
5922 11 Jan 12 nicklas 742         <tr class="dynamic">
5922 11 Jan 12 nicklas 743           <th>Values</th>
5922 11 Jan 12 nicklas 744           <td>
861 04 Jul 05 nicklas 745             <%
1980 14 Feb 06 nicklas 746             String values = annotationType == null ? "" : Values.getString(annotationType.getValues(), "\n", true);
861 04 Jul 05 nicklas 747             %>
6217 14 Dec 12 nicklas 748             <textarea class="text" rows="10" name="values" id="values"><%=HTML.encodeTags(values)%></textarea>
861 04 Jul 05 nicklas 749           </td>
5922 11 Jan 12 nicklas 750           <td style="width: 20px;">
6215 13 Dec 12 nicklas 751             <base:zoom textarea="values" title="Values" />
5922 11 Jan 12 nicklas 752           </td>
861 04 Jul 05 nicklas 753         </tr>
5922 11 Jan 12 nicklas 754         <tr>
5922 11 Jan 12 nicklas 755           <th class="subprompt"></th>
5922 11 Jan 12 nicklas 756           <td>One enumeration value per line</td>
5922 11 Jan 12 nicklas 757           <td></td>
5922 11 Jan 12 nicklas 758         </tr>
5922 11 Jan 12 nicklas 759         </table>
845 29 Jun 05 nicklas 760         <%
845 29 Jun 05 nicklas 761       }
936 14 Jul 05 nicklas 762       else if (valueType == Type.TEXT)
845 29 Jun 05 nicklas 763       {
845 29 Jun 05 nicklas 764         %>
5922 11 Jan 12 nicklas 765         <table class="fullform input100">
845 29 Jun 05 nicklas 766         <tr>
5922 11 Jan 12 nicklas 767           <th>Input box width</th>
845 29 Jun 05 nicklas 768           <td>
6294 13 Jun 13 nicklas 769             <input class="text auto-init" type="text" name="width" 
6294 13 Jun 13 nicklas 770               data-auto-init="integer-only" 
5922 11 Jan 12 nicklas 771               value="<%=annotationType == null ? "" : annotationType.getWidth()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 772               maxlength="10">
845 29 Jun 05 nicklas 773           </td>
845 29 Jun 05 nicklas 774         </tr>
845 29 Jun 05 nicklas 775         <tr>
5922 11 Jan 12 nicklas 776           <th>Input box height</th>
845 29 Jun 05 nicklas 777           <td>
6294 13 Jun 13 nicklas 778             <input class="text auto-init" type="text" name="width" 
6294 13 Jun 13 nicklas 779               data-auto-init="integer-only" 
5922 11 Jan 12 nicklas 780               value="<%=annotationType == null ? "" : annotationType.getHeight()%>" style="width: 15em;"
6294 13 Jun 13 nicklas 781               maxlength="10">
845 29 Jun 05 nicklas 782           </td>
845 29 Jun 05 nicklas 783         </tr>
5922 11 Jan 12 nicklas 784         <tr class="dynamic">
5922 11 Jan 12 nicklas 785           <th></th>
5922 11 Jan 12 nicklas 786           <td></td>
5922 11 Jan 12 nicklas 787         </tr>
5922 11 Jan 12 nicklas 788         </table>
845 29 Jun 05 nicklas 789         <%
845 29 Jun 05 nicklas 790       }
845 29 Jun 05 nicklas 791       %>
845 29 Jun 05 nicklas 792     </t:tab>
845 29 Jun 05 nicklas 793     
6294 13 Jun 13 nicklas 794     <t:tab id="items" title="Item types" helpid="annotationtype.edit.items">
5922 11 Jan 12 nicklas 795       <div style="padding: 2px;">
5922 11 Jan 12 nicklas 796       <table style="width: 100%;">
5922 11 Jan 12 nicklas 797       <tr>
5922 11 Jan 12 nicklas 798         <td style="width: 50%;">
5922 11 Jan 12 nicklas 799           <b>Enabled for</b><br>
6608 20 Nov 14 nicklas 800           <select name="enabled" id="enabled" multiple size="14" style="width: calc(100% - 10px);"
6294 13 Jun 13 nicklas 801             data-to-id="disabled" data-is-sorted="1">
6294 13 Jun 13 nicklas 802           <%
6294 13 Jun 13 nicklas 803           for (Item item : enabledForItems)
6294 13 Jun 13 nicklas 804           {
6294 13 Jun 13 nicklas 805             %>
6294 13 Jun 13 nicklas 806             <option value="<%=item.name()%>"><%=item.toString()%>
6294 13 Jun 13 nicklas 807             <%
6294 13 Jun 13 nicklas 808           }
6294 13 Jun 13 nicklas 809           %>
5922 11 Jan 12 nicklas 810           </select>
5922 11 Jan 12 nicklas 811         </td>
5922 11 Jan 12 nicklas 812         <td style="width: 20px; padding: 2px;">
5922 11 Jan 12 nicklas 813           <base:buttongroup vertical="true">
5922 11 Jan 12 nicklas 814             <base:button
6294 13 Jun 13 nicklas 815               id="btnMoveLeft"
6294 13 Jun 13 nicklas 816               data-from-id="disabled"
6294 13 Jun 13 nicklas 817               data-to-id="enabled"
5922 11 Jan 12 nicklas 818               image="move_left.png" 
5922 11 Jan 12 nicklas 819               tooltip="Enable the annotation type for the selected item(s)" 
5922 11 Jan 12 nicklas 820               subclass="square"
5922 11 Jan 12 nicklas 821             />
5922 11 Jan 12 nicklas 822             <base:button 
6294 13 Jun 13 nicklas 823               id="btnMoveRight"
6294 13 Jun 13 nicklas 824               data-from-id="enabled"
6294 13 Jun 13 nicklas 825               data-to-id="disabled"
5922 11 Jan 12 nicklas 826               image="move_right.png" 
5922 11 Jan 12 nicklas 827               subclass="square"
5922 11 Jan 12 nicklas 828               tooltip="Disable the annotation type for the selected item(s)" 
6294 13 Jun 13 nicklas 829             />
5922 11 Jan 12 nicklas 830           </base:buttongroup>
5922 11 Jan 12 nicklas 831         </td>
5922 11 Jan 12 nicklas 832         <td style="width: 50%;">
5922 11 Jan 12 nicklas 833           <b>Disabled for</b><br>
6608 20 Nov 14 nicklas 834           <select name="disabled" id="disabled" multiple size="14" style="width: calc(100% - 10px);"
6294 13 Jun 13 nicklas 835             data-to-id="enabled" data-is-sorted="1">
6294 13 Jun 13 nicklas 836             <%
6294 13 Jun 13 nicklas 837             for (Item item : Metadata.getAnnotatableItems())
6294 13 Jun 13 nicklas 838             {
6294 13 Jun 13 nicklas 839               if (!enabledForItems.contains(item))
6294 13 Jun 13 nicklas 840               {
6294 13 Jun 13 nicklas 841                 %>
6294 13 Jun 13 nicklas 842                 <option value="<%=item.name()%>"><%=item.toString()%>
6294 13 Jun 13 nicklas 843                 <%
6294 13 Jun 13 nicklas 844               }
6294 13 Jun 13 nicklas 845             }
6294 13 Jun 13 nicklas 846             %>
5922 11 Jan 12 nicklas 847           </select>
5922 11 Jan 12 nicklas 848         </td>
5922 11 Jan 12 nicklas 849       </tr>
5922 11 Jan 12 nicklas 850       </table>
5922 11 Jan 12 nicklas 851       </div>
836 28 Jun 05 nicklas 852     </t:tab>
2515 14 Aug 06 nicklas 853     
6294 13 Jun 13 nicklas 854     <t:tab id="units" title="Units" 
4544 25 Sep 08 nicklas 855       visible="<%=valueType.isNumerical()%>" helpid="annotationtype.edit.units">
4544 25 Sep 08 nicklas 856     
5922 11 Jan 12 nicklas 857       <table class="fullform input100">
5922 11 Jan 12 nicklas 858       <tr>
5922 11 Jan 12 nicklas 859         <th>Quantity</th>
4544 25 Sep 08 nicklas 860         <td>
6294 13 Jun 13 nicklas 861           <select name="quantity_id" id="quantity_id"
4544 25 Sep 08 nicklas 862             <%=!readCurrentQuantity || (annotationType != null && currentQuantityId != 0) ? 
5922 11 Jan 12 nicklas 863                 "disabled readonly class=\"disabled\"" : "class=\"unchangeable selectionlist\""%>>
4544 25 Sep 08 nicklas 864             <option value="">- do not use units -
4544 25 Sep 08 nicklas 865           </select>
4544 25 Sep 08 nicklas 866         </td>
4544 25 Sep 08 nicklas 867       </tr>
5922 11 Jan 12 nicklas 868       <tr>
5922 11 Jan 12 nicklas 869         <th>Default unit</th>
4544 25 Sep 08 nicklas 870         <td>
4544 25 Sep 08 nicklas 871           <select name="unit_id" 
5922 11 Jan 12 nicklas 872             <%=!readCurrentQuantity ? "disabled readonly class=\"disabled\"" : "class=\"selectionlist\""%>>
4544 25 Sep 08 nicklas 873           </select>
4544 25 Sep 08 nicklas 874         </td>
4544 25 Sep 08 nicklas 875       </tr>
5922 11 Jan 12 nicklas 876       <%
5922 11 Jan 12 nicklas 877       if (annotationType != null)
5922 11 Jan 12 nicklas 878       {
5922 11 Jan 12 nicklas 879         %>
5922 11 Jan 12 nicklas 880         <tr>
5922 11 Jan 12 nicklas 881           <th class="subprompt"></th>
5922 11 Jan 12 nicklas 882           <td>
5922 11 Jan 12 nicklas 883             <div class="messagecontainer help">
5922 11 Jan 12 nicklas 884             Changing the default unit triggers a conversion of existing annotation values
5922 11 Jan 12 nicklas 885             to the new unit. This may result in loss of precision due to rounding or 
5922 11 Jan 12 nicklas 886             truncation.
5922 11 Jan 12 nicklas 887             </div>
5922 11 Jan 12 nicklas 888           </td>
5922 11 Jan 12 nicklas 889         </tr>
5922 11 Jan 12 nicklas 890         <%
5922 11 Jan 12 nicklas 891       }
5922 11 Jan 12 nicklas 892       %>
5922 11 Jan 12 nicklas 893       <tr class="dynamic">
5922 11 Jan 12 nicklas 894         <th></th>
4544 25 Sep 08 nicklas 895         <td>
5922 11 Jan 12 nicklas 896           <table style="width: 100%;">
5922 11 Jan 12 nicklas 897           <tr>
5922 11 Jan 12 nicklas 898             <th>Use units</th>
5922 11 Jan 12 nicklas 899             <td></td>
5922 11 Jan 12 nicklas 900             <th>Do not use</th>
5922 11 Jan 12 nicklas 901           </tr>
5922 11 Jan 12 nicklas 902           <tr>
5922 11 Jan 12 nicklas 903             <td style="width: 50%;">
6294 13 Jun 13 nicklas 904               <select name="usableUnits" id="usableUnits" 
6294 13 Jun 13 nicklas 905                 class="auto-init"
6294 13 Jun 13 nicklas 906                 data-auto-init="link-container"
6294 13 Jun 13 nicklas 907                 data-initial-items="[<%=HTML.encodeTags(jsonUsableUnits.toJSONString()) %>]"
6294 13 Jun 13 nicklas 908                 data-remove-to="allUnits"
6684 14 Jan 15 nicklas 909                 size="10" multiple style="width: calc(100% - 10px);"
5922 11 Jan 12 nicklas 910                 title="If no unit is selected, all units can be used"
5922 11 Jan 12 nicklas 911               >
5922 11 Jan 12 nicklas 912               </select>
5922 11 Jan 12 nicklas 913             </td>
5922 11 Jan 12 nicklas 914             <td style="width: 20px; padding: 2px;">
5922 11 Jan 12 nicklas 915               <base:buttongroup vertical="true">
5922 11 Jan 12 nicklas 916                 <base:button
6294 13 Jun 13 nicklas 917                   id="btnAddUsableUnits"
5922 11 Jan 12 nicklas 918                   image="move_left.png"
5922 11 Jan 12 nicklas 919                   subclass="square"
5922 11 Jan 12 nicklas 920                   tooltip="Enable the annotation type for the selected unit(s)" 
5922 11 Jan 12 nicklas 921                 />
5922 11 Jan 12 nicklas 922                 <base:button 
6294 13 Jun 13 nicklas 923                   subclass="square auto-init"
6294 13 Jun 13 nicklas 924                   data-auto-init="remove-link"
6294 13 Jun 13 nicklas 925                   data-list-id="usableUnits"
6294 13 Jun 13 nicklas 926                   data-remove-to="allUnits"
6294 13 Jun 13 nicklas 927                   id="btnRemoveUsableUnits"
5922 11 Jan 12 nicklas 928                   image="move_right.png"
5922 11 Jan 12 nicklas 929                   tooltip="Disable the annotation type for the selected unit(s)" 
5922 11 Jan 12 nicklas 930                 />
5922 11 Jan 12 nicklas 931               </base:buttongroup>
5922 11 Jan 12 nicklas 932             </td>
5922 11 Jan 12 nicklas 933             <td style="width: 50%;">
6684 14 Jan 15 nicklas 934               <select name="allUnits" id="allUnits" size="10" multiple style="width: calc(100% - 10px);">
5922 11 Jan 12 nicklas 935               </select>
5922 11 Jan 12 nicklas 936             </td>
5922 11 Jan 12 nicklas 937           </tr>
5922 11 Jan 12 nicklas 938           </table>
4544 25 Sep 08 nicklas 939         </td>
4544 25 Sep 08 nicklas 940       </table>
4544 25 Sep 08 nicklas 941     </t:tab>
4544 25 Sep 08 nicklas 942
6294 13 Jun 13 nicklas 943     <t:tab id="categories" title="Categories" 
2515 14 Aug 06 nicklas 944       helpid="annotationtype.edit.categories">
5922 11 Jan 12 nicklas 945       <table class="fullform input100">
5922 11 Jan 12 nicklas 946       <tr class="dynamic">
5922 11 Jan 12 nicklas 947         <th>Categories</th>
5922 11 Jan 12 nicklas 948         <td>
5922 11 Jan 12 nicklas 949           <div class="selectionlist">
5922 11 Jan 12 nicklas 950             <table>
5922 11 Jan 12 nicklas 951             <tr>
5922 11 Jan 12 nicklas 952             <td>
6294 13 Jun 13 nicklas 953               <select name="categories" id="categories" 
6294 13 Jun 13 nicklas 954                 class="auto-init"
6294 13 Jun 13 nicklas 955                 data-auto-init="link-container"
6294 13 Jun 13 nicklas 956                 data-initial-items="[<%=HTML.encodeTags(jsonCategories.toJSONString()) %>]"
6294 13 Jun 13 nicklas 957                 size="14" multiple>
5922 11 Jan 12 nicklas 958               </select>
5922 11 Jan 12 nicklas 959             </td>
5922 11 Jan 12 nicklas 960             <td style="vertical-align: top;">
5922 11 Jan 12 nicklas 961               <base:buttongroup vertical="true">
5922 11 Jan 12 nicklas 962                 <base:button
6294 13 Jun 13 nicklas 963                   subclass="leftaligned auto-init"
6294 13 Jun 13 nicklas 964                   data-auto-init="add-link"
6294 13 Jun 13 nicklas 965                   data-list-id="categories"
6294 13 Jun 13 nicklas 966                   data-item-type="ANNOTATIONTYPECATEGORY" 
5922 11 Jan 12 nicklas 967                   style="width: 14em;"
5922 11 Jan 12 nicklas 968                   title="Add&nbsp;categories&hellip;" 
5922 11 Jan 12 nicklas 969                   tooltip="Add categories to this annotation type"
5922 11 Jan 12 nicklas 970                   />
5922 11 Jan 12 nicklas 971                 <base:button 
6294 13 Jun 13 nicklas 972                   subclass="leftaligned auto-init"
6294 13 Jun 13 nicklas 973                   data-auto-init="remove-link"
6294 13 Jun 13 nicklas 974                   data-list-id="categories"
5922 11 Jan 12 nicklas 975                   style="width: 14em;"
5922 11 Jan 12 nicklas 976                   title="Remove" 
5922 11 Jan 12 nicklas 977                   tooltip="Remove the selected categories from this annotation type"
5922 11 Jan 12 nicklas 978                 />
5922 11 Jan 12 nicklas 979               </base:buttongroup>
5922 11 Jan 12 nicklas 980             </td>
5922 11 Jan 12 nicklas 981             </tr>
5922 11 Jan 12 nicklas 982             </table>
5922 11 Jan 12 nicklas 983           </div>
5922 11 Jan 12 nicklas 984         </td>
2515 14 Aug 06 nicklas 985       </tr>
2515 14 Aug 06 nicklas 986       </table>
2515 14 Aug 06 nicklas 987     </t:tab>
5922 11 Jan 12 nicklas 988     </t:tabcontrol>
5922 11 Jan 12 nicklas 989     </form>
2515 14 Aug 06 nicklas 990     
5922 11 Jan 12 nicklas 991     <div class="legend">
5946 03 Feb 12 nicklas 992       <base:icon image="required.png" />= required information<br>
5967 16 Feb 12 nicklas 993       <base:icon image="unchangeable.png" />= can't be changed later
5922 11 Jan 12 nicklas 994     </div>
836 28 Jun 05 nicklas 995
5922 11 Jan 12 nicklas 996     <base:buttongroup subclass="dialogbuttons">
6294 13 Jun 13 nicklas 997       <base:button id="btnSave" title="Save" />
6294 13 Jun 13 nicklas 998       <base:button id="close" title="Cancel" />
5922 11 Jan 12 nicklas 999     </base:buttongroup>
836 28 Jun 05 nicklas 1000   </base:body>
836 28 Jun 05 nicklas 1001   </base:page>
836 28 Jun 05 nicklas 1002   <%
836 28 Jun 05 nicklas 1003 }
836 28 Jun 05 nicklas 1004 finally
836 28 Jun 05 nicklas 1005 {
836 28 Jun 05 nicklas 1006   if (dc != null) dc.close();
836 28 Jun 05 nicklas 1007 }
836 28 Jun 05 nicklas 1008 %>