~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/updateExtendedDataElementForm.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( "edit_data_element" )</h3>
 
3
 
 
4
<form id="updateExtendedDataElementForm" action="updateExtendedDataElement.action" method="post" onsubmit="return validateUpdateExtendedDataElement()">
 
5
 
 
6
<div>
 
7
        <input type="hidden" id="id" name="id" value="$dataElement.id">
 
8
</div>
 
9
 
 
10
<table>
 
11
        <tr>
 
12
                <th colspan="2">$i18n.getString( "identifying_and_definitional_atts" )</th>
 
13
        </tr>
 
14
        <tr>
 
15
                <td><label for="name">$i18n.getString( "name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
16
                <td><input type="text" id="name" name="name" value="$!encoder.htmlEncode( $dataElement.name )" onchange="nameChanged()" style="width:20em"></td>
 
17
        </tr>
 
18
        <tr>
 
19
                <td><label for="shortName">$i18n.getString( "short_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
20
                <td><input type="text" id="shortName" name="shortName" value="$!encoder.htmlEncode( $dataElement.shortName )" maxlength="20" style="width:20em"></td>
 
21
        </tr>
 
22
        <tr>
 
23
                <td><label for="alternativeName">$i18n.getString( "alternative_name" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
24
                <td><input type="text" id="alternativeName" name="alternativeName" value="$!encoder.htmlEncode( $dataElement.alternativeName )" maxlength="20" style="width:20em"></td>
 
25
        </tr>
 
26
        <tr>
 
27
                <td><label for="code">$i18n.getString( "code" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
28
                <td><input type="text" id="code" name="code" value="$!encoder.htmlEncode( $dataElement.code )" style="width:20em"></td>
 
29
        </tr>
 
30
        <tr>
 
31
                <td><label for="description">$i18n.getString( "description" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
32
                <td><textarea id="description" name="description" style="width:20em">$!encoder.htmlEncode( $dataElement.description )</textarea></td>
 
33
        </tr>
 
34
        <tr>
 
35
        <td><label for="active">$i18n.getString( "active" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
36
        <td>
 
37
            <select id="active" name="active" style="min-width:20em">
 
38
                <option value="true" #if( $dataElement.active ) selected="selected" #end>$i18n.getString( "yes" )</option>
 
39
                <option value="false" #if( !$dataElement.active ) selected="selected" #end>$i18n.getString( "no" )</option>
 
40
            </select>
 
41
        </td>
 
42
    </tr>
 
43
    <tr>
 
44
        <td><label for="type">$i18n.getString( "type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
45
        <td>
 
46
            <select id="type" name="type" style="min-width:20em">
 
47
                <option value="int" #if( $dataElement.type == 'int' ) selected="selected" #end>$i18n.getString( "number" )</option>
 
48
                <option value="string" #if( $dataElement.type == 'string' ) selected="selected" #end>$i18n.getString( "text" )</option>
 
49
                <option value="bool" #if( $dataElement.type == 'bool' ) selected="selected" #end>$i18n.getString( "yes_no" )</option>
 
50
            </select>
 
51
        </td>
 
52
    </tr>
 
53
    <tr>
 
54
        <td><label for="aggregationOperator">$i18n.getString( "aggregation_operator" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
55
        <td>
 
56
            <select id="aggregationOperator" name="aggregationOperator" style="min-width:20em">
 
57
                <option value="sum" #if( $dataElement.aggregationOperator == 'sum' ) selected="selected" #end>$i18n.getString( "sum" )</option>
 
58
                <option value="average" #if( $dataElement.aggregationOperator == 'average' ) selected="selected" #end>$i18n.getString( "average" )</option>
 
59
            </select>
 
60
        </td>
 
61
    </tr>
 
62
        <tr>
 
63
                <td><label for="mnemonic">$i18n.getString( "mnemonic" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
64
                <td><input type="text" id="mnemonic" name="mnemonic" value="$!encoder.htmlEncode( $dataElement.extended.mnemonic )" style="width:20em"></td>
 
65
        </tr>
 
66
        <tr>
 
67
                <td><label for="version">$i18n.getString( "version" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
68
                <td><textarea id="version" name="version" style="width:20em">$!encoder.htmlEncode( $dataElement.extended.version )</textarea></td>
 
69
        </tr>
 
70
        <tr>
 
71
                <td><label for="context">$i18n.getString( "context" )</label></td>
 
72
                <td><input type="text" id="context" name="context" value="$!encoder.htmlEncode( $dataElement.extended.context )" style="width:20em"></td>
 
73
        </tr>
 
74
        <tr>
 
75
                <td><label for="synonyms">$i18n.getString( "synonyms" )</label></td>
 
76
                <td><input type="text" id="synonyms" name="synonyms" value="$!encoder.htmlEncode( $dataElement.extended.synonyms )" style="width:20em"></td>
 
77
        </tr>
 
78
        <tr>
 
79
                <td><label for="hononyms">$i18n.getString( "hononyms" )</label></td>
 
80
                <td><input type="text" id="hononyms" name="hononyms" value="$!encoder.htmlEncode( $dataElement.extended.hononyms )" style="width:20em"></td>
 
81
        </tr>
 
82
        <tr>
 
83
                <td><label for="keywords">$i18n.getString( "keywords" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
84
                <td><input type="text" id="keywords" name="keywords" value="$!encoder.htmlEncode( $dataElement.extended.keywords )" style="width:20em"></td>
 
85
        </tr>
 
86
        <tr>
 
87
                <td><label for="status">$i18n.getString( "status" ) </label></td>
 
88
                <td>
 
89
                        <select id="status" name="status" style="width:20em">
 
90
                                <option value="None">[$i18n.getString( "select" )]</option>
 
91
                                <option value="Current" #if( $dataElement.extended.status == 'Current' ) selected="selected" #end>$i18n.getString( "current" )</option>
 
92
                                <option value="Past" #if( $dataElement.extended.status == 'Past' ) selected="selected" #end>$i18n.getString( "past" )</option>
 
93
                        </select>
 
94
                </td>
 
95
        </tr>
 
96
        <tr>
 
97
                <td><label for="statusDate">$i18n.getString( "status_date" ) ($i18n.getString( "format.date.label" ))</label></td>
 
98
                <td><input type="text" id="statusDate" name="statusDate" value="$!format.formatDate( $!dataElement.extended.statusDate )" style="width:20em"></td>
 
99
                <td><img src="../images/calendar_icon.gif" width="16" height="16" id="getStatusDate" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( "status_date" )"></td>
 
100
        </tr>
 
101
        
 
102
        <script type="text/javascript">
 
103
        Calendar.setup({
 
104
            inputField     :    "statusDate",      // id of the input field
 
105
            ifFormat       :    "$i18n.getString("format.date.label")",       // format of the input field
 
106
            button         :    "getStatusDate"   // trigger for the calendar (button ID)
 
107
        });
 
108
        </script>
 
109
        
 
110
        <tr>
 
111
                <td><label for="dataElementType">$i18n.getString( "data_element_type" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
112
                <td>
 
113
                        <select id="dataElementType" name="dataElementType" style="width:20em">
 
114
                                <option value="None" selected="selected">[$i18n.getString( "select" )]</option>
 
115
                                <option value="DataElement" #if ( $dataElement.extended.dataElementType == 'DataElement' ) selected="selected" #end>$i18n.getString( "data_element" )</option>
 
116
                                <option value="Concept" #if ( $dataElement.extended.dataElementType == 'Concept' ) selected="selected" #end>$i18n.getString( "data_element_concept" )</option>
 
117
                        </select>
 
118
                </td>
 
119
        </tr>
 
120
        <tr>
 
121
                <td colspan="2">&nbsp;</td>
 
122
        </tr>
 
123
        <tr>
 
124
                <th colspan="2">$i18n.getString( "relational_and_representational_atts" )</th>
 
125
        </tr>
 
126
        <tr>
 
127
                <td><label for="dataType">$i18n.getString( "data_type" )</label></td>
 
128
                <td>
 
129
                        <select id="dataType" name="dataType" style="width:20em">
 
130
                                <option value="None">[$i18n.getString( "select" )]</option>
 
131
                                <option value="Alphabetic" #if( $dataElement.extended.dataType == 'Alphabetic' ) selected="selected" #end>$i18n.getString( "alphabetic" )</option>
 
132
                                <option value="Alphanumeric" #if( $dataElement.extended.dataType == 'Alphanumeric' ) selected="selected" #end>$i18n.getString( "alphanumeric" )</option>
 
133
                                <option value="Numeric" #if( $dataElement.extended.dataType == 'Numeric' ) selected="selected" #end>$i18n.getString( "numeric" )</option>
 
134
                        </select>
 
135
                </td>
 
136
        </tr>
 
137
        <tr>
 
138
                <td><label for="representationalForm">$i18n.getString( "representational_form" )</label></td>
 
139
                <td>
 
140
                        <select id="representationalForm" name="representationalForm" style="width:20em">
 
141
                                <option value="None">[$i18n.getString( "select" )]</option>
 
142
                                <option value="Text" #if( $dataElement.extended.representationalForm == 'Text' ) selected="selected" #end>$i18n.getString( "text" )</option>
 
143
                                <option value="Code" #if( $dataElement.extended.representationalForm == 'Code' ) selected="selected" #end>$i18n.getString( "code" )</option>
 
144
                                <option value="Quantitative" #if( $dataElement.extended.representationalForm == 'Quantitative' ) selected="selected" #end>$i18n.getString( "quantitative" )</option>
 
145
                                <option value="Date" #if( $dataElement.extended.representationalForm == 'Date' ) selected="selected" #end>$i18n.getString( "date" )</option>
 
146
                                <option value="Identification" #if( $dataElement.extended.representationalForm == 'Identification' ) selected="selected" #end>$i18n.getString( "identification" )</option>                              
 
147
                        </select>
 
148
                </td>
 
149
        </tr>
 
150
        <tr>
 
151
                <td><label for="representationalLayout">$i18n.getString( "representational_layout" )</label></td>
 
152
                <td><input type="text" id="representationalLayout" name="representationalLayout" value="$!encoder.htmlEncode( $dataElement.extended.representationalLayout )" style="width:20em"></td>
 
153
        </tr>
 
154
        <tr>
 
155
                <td><label for="minimumSize">$i18n.getString( "minimum_size" )</label></td>
 
156
                <td><input type="text" id="minimumSize" name="minimumSize" value="$!encoder.htmlEncode( $dataElement.extended.minimumSize )" style="width:20em"></td>
 
157
        </tr>
 
158
        <tr>
 
159
                <td><label for="maximumSize">$i18n.getString( "maximum_size" )</label></td>
 
160
                <td><input type="text" id="maximumSize" name="maximumSize" value="$!encoder.htmlEncode( $dataElement.extended.maximumSize )" style="width:20em"></td>
 
161
        </tr>
 
162
        <tr>
 
163
                <td><label for="dataDomain">$i18n.getString( "data_domain" )</label></td>
 
164
                <td><textarea id="dataDomain" name="dataDomain" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.dataDomain )</textarea></td>
 
165
        </tr>
 
166
        <tr>
 
167
                <td><label for="validationRules">$i18n.getString( "validation_rules" )</label></td>
 
168
                <td><textarea id="validationRules" name="validationRules" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.validationRules )</textarea></td>
 
169
        </tr>
 
170
        <tr>
 
171
                <td><label for="relatedDataReferences">$i18n.getString( "related_data_references" )</label></td>
 
172
                <td><textarea id="relatedDataReferences" name="relatedDataReferences" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.relatedDataReferences )</textarea></td>
 
173
        </tr>
 
174
        <tr>
 
175
                <td><label for="guideForUse">$i18n.getString( "guide_for_use" )</label></td>
 
176
                <td><textarea id="guideForUse" name="guideForUse" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.guideForUse )</textarea></td>
 
177
        </tr>
 
178
        <tr>
 
179
                <td><label for="collectionMethods">$i18n.getString( "collection_methods" )</label></td>
 
180
                <td><textarea id="collectionMethods" name="collectionMethods" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.collectionMethods )</textarea></td>
 
181
        </tr>
 
182
        <tr>
 
183
                <td colspan="2">&nbsp;</td>
 
184
        </tr>
 
185
        <tr>
 
186
                <th colspan="2">$i18n.getString( "administrative_atts" )</th>
 
187
        </tr>
 
188
        <tr>
 
189
                <td><label for="responsibleAuthority">$i18n.getString( "responsible_authority" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
190
                <td><input type="text" id="responsibleAuthority" name="responsibleAuthority" value="$!encoder.htmlEncode( $dataElement.extended.responsibleAuthority )" style="width:20em"></td>
 
191
        </tr>
 
192
        <tr>
 
193
                <td><label for="updateRules">$i18n.getString( "update_rules" )</label></td>
 
194
                <td><textarea id="updateRules" name="updateRules" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.updateRules )</textarea></td>
 
195
        </tr>
 
196
        <tr>
 
197
                <td><label for="accessAuthority">$i18n.getString( "access_authority" )</label></td>
 
198
                <td><input type="text" id="accessAuthority" name="accessAuthority" value="$!encoder.htmlEncode( $dataElement.extended.accessAuthority )" style="width:20em"></td>
 
199
        </tr>
 
200
        <tr>
 
201
                <td><label for="updateFrequency">$i18n.getString( "update_frequency" )</label></td>
 
202
                <td><input type="text" id="updateFrequency" name="updateFrequency" value="$!encoder.htmlEncode( $dataElement.extended.updateFrequency )" style="width:20em"></td>
 
203
        </tr>
 
204
        <tr>
 
205
                <td><label for="location">$i18n.getString( "location" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
206
                <td><input type="text" id="location" name="location" value="$!encoder.htmlEncode( $dataElement.extended.location )" style="width:20em"></td>
 
207
        </tr>
 
208
        <tr>
 
209
                <td><label for="reportingMethods">$i18n.getString( "reporting_methods" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
210
                <td><textarea id="reportingMethods" name="reportingMethods" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.reportingMethods )</textarea></td>
 
211
        </tr>
 
212
        <tr>
 
213
                <td><label for="versionStatus">$i18n.getString( "version_status" ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
214
                <td><input type="text" id="versionStatus" name="versionStatus" value="$!encoder.htmlEncode( $dataElement.extended.versionStatus )" style="width:20em"></td>
 
215
        </tr>
 
216
        <tr>
 
217
                <td><label for="previousVersionReferences">$i18n.getString( "previous_version_references" )</label></td>
 
218
                <td><textarea id="previousVersionReferences" name="previousVersionReferences" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.previousVersionReferences )</textarea></td>
 
219
        </tr>
 
220
        <tr>
 
221
                <td><label for="sourceDocument">$i18n.getString( "source_document" )</label></td>
 
222
                <td><input type="text" id="sourceDocument" name="sourceDocument" value="$!encoder.htmlEncode( $dataElement.extended.sourceDocument )" style="width:20em"></td>
 
223
        </tr>
 
224
        <tr>
 
225
                <td><label for="sourceOrganisation">$i18n.getString( "source_organisation" )</label></td>
 
226
                <td><input type="text" id="sourceOrganisation" name="sourceOrganisation" value="$!encoder.htmlEncode( $dataElement.extended.sourceOrganisation )" style="width:20em"></td>
 
227
        </tr>
 
228
        <tr>
 
229
                <td><label for="comment">$i18n.getString( "comment" )</label></td>
 
230
                <td><textarea id="comment" name="comment" style="width:20em; height:6em">$!encoder.htmlEncode( $dataElement.extended.comment )</textarea></td>
 
231
        </tr>
 
232
        <tr>
 
233
                <td></td>
 
234
                <td><input type="submit" value="$i18n.getString( "save" )" style="width:10em"><input 
 
235
                        type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='dataElement.action'" style="width:10em"></td>
 
236
        </tr>
 
237
</table>
 
238
 
 
239
</form>
 
240
 
 
241
<span id="message"></span>
 
242
 
 
243
<script type="text/javascript">
 
244
 
 
245
        var previousName = '$encoder.jsEscape( $dataElement.name, "'" )';
 
246
        
 
247
        var nameField = document.getElementById( 'name' );
 
248
        nameField.select();
 
249
        nameField.focus();
 
250
 
 
251
</script>