Ignore:
Timestamp:
02/05/07 16:17:07 (7 years ago)
Author:
ckb6
Message:

Added validation for graph parts and added some memory to the form so that a failed send causes the data not to be lost

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccsweb/trunk/ccs_mods/graphs/config-part-div.tpl

    r1341 r1342  
    2323 
    2424<tr>  
    25     <th width="200" >Type</th><td> 
     25    <th width="200">Type</th><td> 
    2626        <select id="type" name="type" /> 
    2727            <option value="DEF" {if $part.type == "DEF"}selected="selected"{/if}>DEF</option> 
     
    3535            <option value="LINE2" {if $part.type == "LINE2"}selected="selected"{/if}>LINE2</option> 
    3636            <option value="LINE3" {if $part.type == "LINE3"}selected="selected"{/if}>LINE3</option> 
    37             <option value="SHIFT" {if $part.type == "SHIFT"}selected="selected"{/if}>SHIFT</option> 
    3837            <option value="STACK" {if $part.type == "STACK"}selected="selected"{/if}>STACK</option> 
    3938            <option value="AREA" {if $part.type == "AREA"}selected="selected"{/if}>AREA</option> 
     
    4140</tr> 
    4241<tr>     
    43     <th width="200">Order</th> 
     42    <th width="200" id="order-header">Order</th> 
    4443    <td><input type="text" name="graph_order" id="graph_order" value="{$part.graph_order}"/>This field controls the order in which they are used during rendering. If two numbers are the same it is undefined what order they will be used.</td> 
    4544</tr> 
    46 {if $part.type == "LINE1" || $part.type == "LINE2" || $part.type == "LINE2" || $part.type == "AREA" || $part.type == "STACK"} 
     45{if $part.type == "LINE1" || $part.type == "LINE2" || $part.type == "LINE3" || $part.type == "AREA" || $part.type == "STACK"} 
    4746<tr>     
    48     <th width="200">Variable</th><td> 
     47    <th width="200" id="varname-header">Variable</th><td> 
    4948        <select name="varname" id="varname"> 
    5049        {foreach from=$vars item=var} 
     
    5453</td></tr> 
    5554<tr>     
    56     <th width="200">Colour</th> 
    57     <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour</td> 
     55    <th width="200" id="colour-header">Colour</th> 
     56    <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour in hex (RRGGBB eg FF0000 is red)</td> 
    5857</tr> 
    5958<tr>     
     
    6564{if $part.type == "HRULE"} 
    6665<tr>     
    67     <th width="200">Value</th> 
     66    <th width="200" id="varname-header">Value</th> 
    6867    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/></td> 
    6968</tr> 
    7069<tr>     
    71     <th width="200">Colour</th> 
    72     <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour</td> 
     70    <th width="200" id="colour-header">Colour</th> 
     71    <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour in hex (RRGGBB eg FF0000 is red)</td> 
    7372</tr> 
    7473<tr>     
     
    7978{if $part.type == "VRULE"} 
    8079<tr>     
    81     <th width="200">Time</th> 
     80    <th width="200" id="varname-header">Time</th> 
    8281    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/>In seconds since 1 Jan 1970</td> 
    8382</tr> 
    8483<tr>     
    85     <th width="200">Colour</th> 
    86     <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour</td> 
     84    <th width="200" id="colour-header">Colour</th> 
     85    <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour in hex (RRGGBB eg FF0000 is red)</td> 
    8786</tr> 
    8887<tr>     
     
    9493{if $part.type == "PRINT" || $part.type == "GPRINT"} 
    9594<tr>     
    96     <th width="200">Variable</th><td> 
     95    <th width="200" id="varname-header">Variable</th><td> 
    9796        <select name="varname" id="varname"> 
    9897        {foreach from=$vars item=var} 
     
    111110</tr> 
    112111<tr>     
    113     <th width="200">Statement</th> 
     112    <th width="200" id="text-header">Statement</th> 
    114113    <td><input type="text" name="text" id="text" value="{$part.text}"/></td> 
    115114</tr> 
     
    117116{if $part.type == "COMMENT"} 
    118117<tr>     
    119     <th width="200">Comment</th> 
     118    <th width="200" id="text-header">Comment</th> 
    120119    <td><input type="text" name="text" id="text" value="{$part.text}"/></td> 
    121120</tr> 
     
    123122{if $part.type == "DEF"} 
    124123<tr>     
    125     <th width="200">Variable</th> 
     124    <th width="200" id="varname-header">Variable</th> 
    126125    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/>The variable name</td> 
    127126</tr> 
     
    147146{if $part.type == "CDEF"} 
    148147<tr>     
    149     <th width="200">Variable</th> 
     148    <th width="200" id="varname-header">Variable</th> 
    150149    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/>The variable name</td> 
    151150</tr> 
    152151<tr>     
    153     <th width="200">Chain</th> 
     152    <th width="200" id="text-header">Chain</th> 
    154153    <td><input type="text" name="text" id="text" value="{$part.text}"/></td> 
    155154</td></tr>   
Note: See TracChangeset for help on using the changeset viewer.