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

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/dhis-web-validationrule/updateValidationRuleForm.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>$encoder.htmlEncode( $i18n.getString( "edit_validation_rule" ) )</h3>
 
3
 
 
4
<form id="updateValidationRuleForm" action="updateValidationRule.action" method="post" onsubmit="return validateUpdateValidationRule()">
 
5
 
 
6
<div>
 
7
        <input type="hidden" id="id" name="id" value="$!validationRule.id">
 
8
        <input type="hidden" id="leftSideDescription" name="leftSideDescription" value="$!validationRule.leftSide.description">
 
9
        <input type="hidden" id="leftSideExpression" name="leftSideExpression" value="$!validationRule.leftSide.expression">
 
10
        <input type="hidden" id="leftSideTextualExpression" name="leftSideTextualExpression" value="$!leftSideTextualExpression">
 
11
        <input type="hidden" id="rightSideDescription" name="rightSideDescription" value="$!validationRule.rightSide.description">
 
12
        <input type="hidden" id="rightSideExpression" name="rightSideExpression" value="$!validationRule.rightSide.expression">
 
13
        <input type="hidden" id="rightSideTextualExpression" name="rightSideTextualExpression" value="$!rightSideTextualExpression">
 
14
</div>
 
15
 
 
16
<table>
 
17
        <tr>
 
18
                <th colspan="2">$i18n.getString( "details" )</th>
 
19
        </tr>
 
20
        <tr>
 
21
                <td><label for="name">$encoder.htmlEncode( $i18n.getString( "name" ) ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
22
                <td><input type="text" id="name" name="name" value="$!encoder.htmlEncode( $validationRule.name )" style="width:20em"></td>
 
23
        </tr>
 
24
        <tr>
 
25
                <td><label for="description">$encoder.htmlEncode( $i18n.getString( "description" ) )</label></td>
 
26
                <td><input type="text" id="description" name="description" value="$!encoder.htmlEncode( $validationRule.description )" style="width:20em"></td>
 
27
        </tr>
 
28
        <tr>
 
29
                <td><label for="operatorId">$encoder.htmlEncode( $i18n.getString( "operator" ) ) <em title="$i18n.getString( "required" )" class="required">*</em></label></td>
 
30
                <td>
 
31
                        <select id="operator" name="operator" style="width:20em">
 
32
                                <option value="equal_to" #if ( $validationRule.operator == 'equal_to' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "equal_to" ) )</option>
 
33
                                <option value="not_equal_to" #if ( $validationRule.operator == 'not_equal_to' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "not_equal_to" ) )</option>
 
34
                                <option value="greater_than" #if ( $validationRule.operator == 'greater_than' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "greater_than" ) )</option>
 
35
                                <option value="greater_than_or_equal_to" #if ( $validationRule.operator == 'greater_than_or_equal_to' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "greater_than_or_equal_to" ) )</option>
 
36
                                <option value="less_than" #if ( $validationRule.operator == 'less_than' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "less_than" ) )</option>
 
37
                                <option value="less_than_or_equal_to" #if ( $validationRule.operator == 'less_than_or_equal_to' )selected="selected"#end>$encoder.htmlEncode( $i18n.getString( "less_than_or_equal_to" ) )</option>
 
38
                        </select>
 
39
                </td>
 
40
        </tr>
 
41
        <tr>
 
42
                <td></td>
 
43
                <td><input type="button" value="$i18n.getString( 'edit_left_side' )" style="width:10em" onclick="showEditLeftSideExpressionForm()"><input 
 
44
                                type="button" value="$i18n.getString( 'edit_right_side' )" style="width:10em" onclick="showEditRightSideExpressionForm()"></td>
 
45
        </tr>
 
46
        <tr>
 
47
                <td></td>
 
48
                <td><input type="submit" value="$i18n.getString( 'save' )" style="width:10em"><input 
 
49
                                type="button" value="$i18n.getString( 'cancel' )" id="cancel" name="cancel" onclick="window.location.href='showValidationRuleForm.action'" style="width:10em"></td>             
 
50
        </tr>
 
51
</table>
 
52
 
 
53
</form>
 
54
 
 
55
<span id="message"></span>
 
56
 
 
57
<script type="text/javascript">
 
58
 
 
59
        var nameField = document.getElementById( 'name' );
 
60
        nameField.select();
 
61
        nameField.focus();
 
62
 
 
63
</script>