~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorForm.vm

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<h3>$i18n.getString( "create_new_indicator" )</h3>
 
3
 
 
4
<form id="addIndicatorForm" action="addIndicator.action" method="post" onsubmit="return validateAddIndicator()">
 
5
 
 
6
<div>
 
7
        <input type="hidden" id="numerator" name="numerator">
 
8
        <input type="hidden" id="numeratorDescription" name="numeratorDescription">
 
9
        <input type="hidden" id="numeratorAggregationOperator" name="numeratorAggregationOperator">
 
10
        <input type="hidden" id="denominator" name="denominator">
 
11
        <input type="hidden" id="denominatorDescription" name="denominatorDescription">
 
12
        <input type="hidden" id="denominatorAggregationOperator" name="denominatorAggregationOperator">
 
13
</div>
 
14
 
 
15
<table>
 
16
        <tr>
 
17
                <th colspan="2">$i18n.getString( "details" )</th>
 
18
        </tr>
 
19
        <tr>
 
20
                <td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
21
                <td><input type="text" id="name" name="name" onchange="nameChanged()" style="width:20em"></td>
 
22
        </tr>
 
23
        <tr>
 
24
                <td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
25
                <td><input type="text" id="shortName" name="shortName" maxlength="20" style="width:20em"></td>
 
26
        </tr>
 
27
        <tr>
 
28
                <td><label for="alternativeName">$i18n.getString( "alternative_name" )</label></td>
 
29
                <td><input type="text" id="alternativeName" name="alternativeName" style="width:20em"></td>
 
30
        </tr>
 
31
        <tr>
 
32
                <td><label for="code">$i18n.getString( "code" )</label></td>
 
33
                <td><input type="text" id="code" name="code" style="width:20em"></td>
 
34
        </tr>
 
35
        <tr>
 
36
                <td><label for="description">$i18n.getString( "description" )</label></td>
 
37
                <td><textarea id="description" name="description" style="width:20em; height:8em"></textarea></td>
 
38
        </tr>
 
39
        <tr>
 
40
                <td><label for="annualized">$i18n.getString( "annualized" )</label></td>
 
41
                <td>
 
42
                        <select id="annualized" name="annualized" style="width:20em">
 
43
                                <option value="false">$i18n.getString( "no" )</option>
 
44
                                <option value="true">$i18n.getString( "yes" )</option>
 
45
                        </select>
 
46
                </td>
 
47
        </tr>
 
48
        <tr>
 
49
                <td><label for="indicatorTypeId">$i18n.getString( "indicator_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
50
                <td>
 
51
                        <select id="indicatorTypeId" name="indicatorTypeId" style="min-width:20em">
 
52
                                <option value="null">[$i18n.getString( "select" )]</option>
 
53
                        #foreach( $indicatorType in $indicatorTypes )
 
54
                                <option value="$indicatorType.id">$encoder.htmlEncode( $indicatorType.name )</option>
 
55
                        #end
 
56
                        </select>
 
57
                </td>
 
58
        </tr>
 
59
        <tr>
 
60
                <td></td>
 
61
                <td><input type="button" value="$i18n.getString( 'edit_numerator' )" onclick="showEditNumeratorForm()" style="width:10em"><input
 
62
                                type="button" value="$i18n.getString( 'edit_denominator' )" onclick="showEditDenominatorForm()" style="width:10em"></td>
 
63
        </tr>
 
64
        <tr>
 
65
                <td></td>
 
66
                <td><input type="submit" value="$i18n.getString( "add" )" style="width:10em"><input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='indicator.action'" style="width:10em"></td>
 
67
        </tr>
 
68
</table>
 
69
 
 
70
</form>
 
71
 
 
72
<span id="message"></span>
 
73
 
 
74
<script type="text/javascript">
 
75
 
 
76
        var previousName = '';
 
77
        
 
78
        var nameField = document.getElementById( 'name' );
 
79
        nameField.select();
 
80
        nameField.focus();
 
81
 
 
82
</script>