View | Details | Raw Unified | Return to bug 24899
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt (-538 / +524 lines)
Lines 4-78 Link Here
4
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Administration &rsaquo; Record matching rules
5
<title>Koha &rsaquo; Administration &rsaquo; Record matching rules
6
[% IF ( matching_rule_form ) %]
6
[% IF ( matching_rule_form ) %]
7
  [% IF ( edit_matching_rule ) %]
7
    [% IF ( edit_matching_rule ) %]
8
    &rsaquo; Modify record matching rule
8
        &rsaquo; Modify record matching rule
9
  [% ELSE %]
9
    [% ELSE %]
10
    &rsaquo; Add record matching rule
10
        &rsaquo; Add record matching rule
11
  [% END %]
11
    [% END %]
12
[% END %]
12
[% END %]
13
[% IF ( delete_matching_rule_form ) %]
13
[% IF ( delete_matching_rule_form ) %]
14
  &rsaquo; Confirm deletion of record matching rule &quot;[% code | html %]&quot;
14
    &rsaquo; Confirm deletion of record matching rule &quot;[% code | html %]&quot;
15
[% END %]
15
[% END %]
16
</title>
16
</title>
17
[% INCLUDE 'doc-head-close.inc' %]
17
[% INCLUDE 'doc-head-close.inc' %]
18
18
19
[% BLOCK norms_text %]
19
[% BLOCK norms_text %]
20
[%    SWITCH norm %]
20
    [% SWITCH norm %]
21
[%        CASE 'none'           %]None
21
        [% CASE 'none' %]None
22
[%        CASE 'remove_spaces'  %]Remove spaces
22
        [% CASE 'remove_spaces' %]Remove spaces
23
[%        CASE 'upper_case'     %]Uppercase
23
        [% CASE 'upper_case' %]Uppercase
24
[%        CASE 'lower_case'     %]Lowercase
24
        [% CASE 'lower_case' %]Lowercase
25
[%        CASE 'legacy_default' %]Legacy default
25
        [% CASE 'legacy_default' %]Legacy default
26
[%        CASE 'ISBN' %]ISBN
26
        [% CASE 'ISBN' %]ISBN
27
[%        CASE %][% norm | html %]
27
        [% CASE %][% norm | html %]
28
[%    END %]
28
    [% END %]
29
[% END %]
29
[% END %]
30
30
31
[% BLOCK norms_options %]
31
[% BLOCK norms_options %]
32
[%# PARAMS: selected_norm %]
32
    [%# PARAMS: selected_norm %]
33
[%    FOREACH norm IN valid_norms %]
33
    [% FOREACH norm IN valid_norms %]
34
[%        IF ( norm == selected_norm ) %]
34
        [% IF ( norm == selected_norm ) %]
35
        <option value="[% norm | html %]" selected="selected">[% PROCESS norms_text norm=norm %]</option>
35
            <option value="[% norm | html %]" selected="selected">[% PROCESS norms_text norm=norm %]</option>
36
[%        ELSE %]
36
        [% ELSE %]
37
        <option value="[% norm | html %]">[% PROCESS norms_text norm=norm %]</option>
37
            <option value="[% norm | html %]">[% PROCESS norms_text norm=norm %]</option>
38
[%        END %]
38
        [% END %]
39
[%    END %]
39
    [% END %]
40
[% END %]
40
[% END %]
41
41
42
[% BLOCK norms_select %]
42
[% BLOCK norms_select %]
43
[%# PARAMS: selected_norm, id, name %]
43
    [%# PARAMS: selected_norm, id, name %]
44
[%    UNLESS valid_norms.grep(selected_norm).size %]
44
    [% UNLESS valid_norms.grep(selected_norm).size %]
45
[%#       Fallback to 'none' %]
45
        [%# Fallback to 'none' %]
46
[% selected_norm = 'none' %]
46
        [% selected_norm = 'none' %]
47
[%    END %]
47
    [% END %]
48
    <select id="[% id | html %]" name="[% name | html %]">
48
    <select id="[% id | html %]" name="[% name | html %]">
49
[%    PROCESS norms_options selected_norm=selected_norm %]
49
        [% PROCESS norms_options selected_norm=selected_norm %]
50
    </select>
50
    </select>
51
[% END %]
51
[% END %]
52
52
53
<style>
53
<style>
54
  fieldset.rows fieldset.rows { border-width : 0; }
54
    fieldset.rows fieldset.rows { border-width : 0; }
55
  fieldset.rows fieldset.rows fieldset.rows { border-width : 1px; }
55
    fieldset.rows fieldset.rows fieldset.rows { border-width : 1px; }
56
  fieldset, fieldset.rows { width : 90%; padding: .3em .6em .3em .6em; }
56
    fieldset, fieldset.rows { width : 90%; padding: .3em .6em .3em .6em; }
57
	fieldset.rows fieldset {font-size:100%;}
57
    fieldset.rows fieldset {font-size:100%;}
58
  div.matchgroup { border:1px solid #DDD; border-left-width: 15px; padding:.4em; margin-bottom:.6em;}
58
    div.matchgroup { border:1px solid #DDD; border-left-width: 15px; padding:.4em; margin-bottom:.6em;}
59
</style>
59
</style>
60
</head>
60
</head>
61
<body id="admin_matching-rules" class="admin">
61
<body id="admin_matching-rules" class="admin">
62
[% INCLUDE 'header.inc' %]
62
[% INCLUDE 'header.inc' %]
63
[% INCLUDE 'prefs-admin-search.inc' %]
63
[% INCLUDE 'prefs-admin-search.inc' %]
64
64
65
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( display_list ) %]Record matching rules[% ELSE %]<a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a>[% END %]
65
<div id="breadcrumbs">
66
[% IF ( matching_rule_form ) %]
66
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
67
  [% IF ( edit_matching_rule ) %]
67
    <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
68
    &rsaquo; Modify record matching rule
68
    [% IF ( display_list ) %]
69
  [% ELSE %]
69
        Record matching rules
70
    &rsaquo; Add record matching rule
70
    [% ELSE %]
71
  [% END %]
71
        <a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a>
72
[% END %]
72
    [% END %]
73
[% IF ( delete_matching_rule_form ) %]
73
    [% IF ( matching_rule_form ) %]
74
  &rsaquo; Confirm deletion of record matching rule &quot;[% code | html %]&quot;
74
        [% IF ( edit_matching_rule ) %]
75
[% END %]
75
            &rsaquo; Modify record matching rule
76
        [% ELSE %]
77
            &rsaquo; Add record matching rule
78
        [% END %]
79
    [% END %]
80
    [% IF ( delete_matching_rule_form ) %]
81
        &rsaquo; Confirm deletion of record matching rule &quot;[% code | html %]&quot;
82
    [% END %]
76
</div>
83
</div>
77
84
78
<div class="main container-fluid">
85
<div class="main container-fluid">
Lines 80-577 Link Here
80
        <div class="col-sm-10 col-sm-push-2">
87
        <div class="col-sm-10 col-sm-push-2">
81
            <main>
88
            <main>
82
89
83
[% IF ( matching_rule_form ) %]
90
                [% IF ( matching_rule_form ) %]
84
  [% IF ( edit_matching_rule ) %]
91
                    [% IF ( edit_matching_rule ) %]
85
<h2>Modify record matching rule</h2>
92
                        <h2>Modify record matching rule</h2>
86
  [% ELSE %]
93
                    [% ELSE %]
87
<h2>Add record matching rule</h2>
94
                        <h2>Add record matching rule</h2>
88
  [% END %]
95
                    [% END %]
89
<form action="[% script_name | html %]" name="Aform" method="post">
96
                    <form action="[% script_name | html %]" name="Aform" method="post">
90
  <input type="hidden" name="op" value="[% confirm_op | html %]" />
97
                        <input type="hidden" name="op" value="[% confirm_op | html %]" />
91
  <fieldset class="rows">
98
                        <fieldset class="rows">
92
    <ol>
99
                            <ol>
93
      <li>
100
                                <li>
94
          [% IF ( edit_matching_rule ) %]
101
                                    [% IF ( edit_matching_rule ) %]
95
		  <span class="label">Matching rule code: </span>
102
                                        <span class="label">Matching rule code: </span>
96
            <input type="hidden" name="matcher_id" value="[% matcher_id | html %]" />
103
                                        <input type="hidden" name="matcher_id" value="[% matcher_id | html %]" />
97
            <input type="hidden" name="code" value="[% code | html %]" />
104
                                        <input type="hidden" name="code" value="[% code | html %]" />
98
            [% code | html %]
105
                                        [% code | html %]
99
          [% ELSE %]
106
                                    [% ELSE %]
100
		  <label for="code" class="required">Matching rule code: </label>
107
                                        <label for="code" class="required">Matching rule code: </label>
101
            <input type="text" id="code" name="code"  size="10" maxlength="10" /> <span class="required">Required</span>
108
                                        <input type="text" id="code" name="code"  size="10" maxlength="10" /> <span class="required">Required</span>
102
          [% END %]
109
                                    [% END %]
103
       </li>
110
                                </li>
104
       <li><label for="description" class="required">Description: </label>
111
                                <li>
105
           <input type="text" id="description" name="description" size="50" maxlength="250" 
112
                                    <label for="description" class="required">Description: </label>
106
                  value="[% description | html %]" /> <span class="required">Required</span>
113
                                    <input type="text" id="description" name="description" size="50" maxlength="250" value="[% description | html %]" /> <span class="required">Required</span>
107
       </li>
114
                                </li>
108
       <li><label for="threshold" class="required">Match threshold: </label>
115
                                <li>
109
           <input type="text" id="threshold" name="threshold" size="5" maxlength="5" 
116
                                    <label for="threshold" class="required">Match threshold: </label>
110
                  value="[% threshold | html %]" /> <span class="required">Required</span>
117
                                    <input type="text" id="threshold" name="threshold" size="5" maxlength="5" value="[% threshold | html %]" /> <span class="required">Required</span>
111
       </li>
118
                                </li>
112
       <li><label for="record_type" class="required">Record type: </label>
119
                                <li>
113
           <select id="record_type" name="record_type">
120
                                    <label for="record_type" class="required">Record type: </label>
114
               [% IF ( record_type == "authority" ) %]
121
                                    <select id="record_type" name="record_type">
115
                   <option value="biblio">Bibliographic record</option>
122
                                        [% IF ( record_type == "authority" ) %]
116
                   <option value="authority" selected="selected">Authority record</option>
123
                                            <option value="biblio">Bibliographic record</option>
117
               [% ELSE %]
124
                                            <option value="authority" selected="selected">Authority record</option>
118
                   <option value="biblio" selected="selected">Bibliographic record</option>
125
                                        [% ELSE %]
119
                   <option value="authority">Authority record</option>
126
                                            <option value="biblio" selected="selected">Bibliographic record</option>
120
               [% END %]
127
                                            <option value="authority">Authority record</option>
121
           </select><span class="required">Required</span>
128
                                        [% END %]
122
       </li>
129
                                    </select><span class="required">Required</span>
123
    </ol>
130
                                </li>
124
  </fieldset>
131
                            </ol>
125
132
                        </fieldset>
126
  <fieldset class="rows" id="match_points">
133
127
  <h4>Match points</h4>
134
                        <fieldset class="rows" id="match_points">
128
  [% IF ( edit_matching_rule ) %]
135
                            <h4>Match points</h4>
129
  [% IF ( matchpoints ) %]<p id="addMatchPoint" style="display:none;">[% ELSE %]<p id="addMatchPoint">[% END %]<a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a></p>
136
                            [% IF ( edit_matching_rule ) %]
130
  [% ELSE %]<p id="addMatchPoint" style="display:none;"><a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a></p>[% END %]
137
                                [% IF ( matchpoints ) %]
131
  [% IF ( edit_matching_rule ) %]
138
                                    <p id="addMatchPoint" style="display:none;">
132
  [% FOREACH matchpoint IN matchpoints %]
139
                                [% ELSE %]
133
  <div id="mp_[% matchpoint.mp_num | html %]" class="matchgroup">
140
                                    <p id="addMatchPoint">
134
  <fieldset class="rows">
141
                                [% END %]
135
    <legend>Match point [% matchpoint.mp_num | html %] | <a href="#" class="button" onclick="InsertMatchpoint('mp_[% matchpoint.mp_num | html %]', 'mp_template'); return false;">Add match point</a> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
142
                                    <a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a>
136
    <ol>
143
                                </p>
137
      <li>
144
                            [% ELSE %]
138
        <label for="mp_[% matchpoint.mp_num | html %]_search_index">Search index: </label>
145
                                <p id="addMatchPoint" style="display:none;"><a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">
139
        <input type ="text" id="mp_[% matchpoint.mp_num | html %]_search_index" 
146
                                    Add match point</a>
140
               name="mp_[% matchpoint.mp_num | html %]_search_index" size="20" 
147
                                </p>
141
               value="[% matchpoint.index | html %]"
148
                            [% END %]
142
          maxlength="30" />
149
143
      </li>
150
                            [% IF ( edit_matching_rule ) %]
144
      <li>
151
                                [% FOREACH matchpoint IN matchpoints %]
145
        <label for="mp_[% matchpoint.mp_num | html %]_score">Score: </label>
152
                                    <div id="mp_[% matchpoint.mp_num | html %]" class="matchgroup">
146
        <input type ="text" id="mp_[% matchpoint.mp_num | html %]_score" 
153
                                        <fieldset class="rows">
147
               name="mp_[% matchpoint.mp_num | html %]_score" size="5"
154
                                            <legend>Match point [% matchpoint.mp_num | html %] | <a href="#" class="button" onclick="InsertMatchpoint('mp_[% matchpoint.mp_num | html %]', 'mp_template'); return false;">Add match point</a> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
148
               value="[% matchpoint.score | html %]"
155
                                            <ol>
149
               maxlength="5" />
156
                                                <li>
150
      </li>
157
                                                    <label for="mp_[% matchpoint.mp_num | html %]_search_index">Search index: </label>
151
      </ol>
158
                                                    <input type ="text" id="mp_[% matchpoint.mp_num | html %]_search_index" name="mp_[% matchpoint.mp_num | html %]_search_index" size="20" value="[% matchpoint.index | html %]" maxlength="30" />
152
      [% FOREACH component IN matchpoint.components %]
159
                                                </li>
153
      <fieldset class="rows" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]">
160
                                                <li>
154
      <legend>Matchpoint components</legend>
161
                                                    <label for="mp_[% matchpoint.mp_num | html %]_score">Score: </label>
155
        <ol>
162
                                                    <input type ="text" id="mp_[% matchpoint.mp_num | html %]_score" name="mp_[% matchpoint.mp_num | html %]_score" size="5" value="[% matchpoint.score | html %]" maxlength="5" />
156
          <li>
163
                                                </li>
157
            <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_tag">Tag: </label>
164
                                            </ol>
158
            <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_tag" 
165
                                            [% FOREACH component IN matchpoint.components %]
159
                   name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_tag" 
166
                                                <fieldset class="rows" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]">
160
                   value="[% component.tag | html %]"
167
                                                    <legend>Matchpoint components</legend>
161
                   size="3" maxlength="3" />
168
                                                    <ol>
162
          </li>
169
                                                        <li>
163
          <li>
170
                                                            <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_tag">Tag: </label>
164
            <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_subfields">Subfields: </label>
171
                                                            <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_tag" name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_tag" value="[% component.tag | html %]" size="3" maxlength="3" />
165
            <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_subfields" 
172
                                                        </li>
166
                   name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_subfields" 
173
                                                        <li>
167
                   value="[% component.subfields | html %]"
174
                                                          <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_subfields">Subfields: </label>
168
                   size="10" maxlength="40" />
175
                                                          <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_subfields" name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_subfields" value="[% component.subfields | html %]"
169
          </li>
176
                                                                 size="10" maxlength="40" />
170
          <li>
177
                                                        </li>
171
            <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_offset">Offset: </label>
178
                                                        <li>
172
            <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_offset" 
179
                                                          <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_offset">Offset: </label>
173
                   name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_offset" 
180
                                                          <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_offset" name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_offset" value="[% component.offset | html %]"
174
                   value="[% component.offset | html %]"
181
                                                                 size="5" maxlength="5" />
175
                   size="5" maxlength="5" />
182
                                                        </li>
176
          </li>
183
                                                        <li>
177
          <li>
184
                                                          <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_length">Length: </label>
178
            <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_length">Length: </label>
185
                                                          <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_length" name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_length" value="[% component.length | html %]"
179
            <input type="text" id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_length" 
186
                                                                 size="5" maxlength="5" />
180
                   name="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_length" 
187
                                                        </li>
181
                   value="[% component.length | html %]"
188
                                                        [% FOREACH norm IN component.norms %]
182
                   size="5" maxlength="5" />
189
                                                            <li id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_n_[% norm.norm_num | html %]">
183
          </li>
190
                                                                <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_n__[% norm.norm_num | html %]_norm">Normalization rule: </label>
184
              [% FOREACH norm IN component.norms %]
191
                                                                [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %]
185
              <li id="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_n_[% norm.norm_num | html %]">
192
                                                                [% PROCESS norms_select selected_norm=norm.norm id="mp_${norm.mp_num}_c_${component.comp_num}_n__${norm.norm_num}_norm" name="mp_${matchpoint.mp_num}_c_${component.comp_num}_n_${norm.norm_num}_norm" %]
186
                <label for="mp_[% matchpoint.mp_num | html %]_c_[% component.comp_num | html %]_n__[% norm.norm_num | html %]_norm">Normalization rule: </label>
193
                                                            </li>
187
                [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %]
194
                                                        [% END %]
188
                [% PROCESS norms_select selected_norm=norm.norm id="mp_${norm.mp_num}_c_${component.comp_num}_n__${norm.norm_num}_norm" name="mp_${matchpoint.mp_num}_c_${component.comp_num}_n_${norm.norm_num}_norm" %]
195
                                                    </ol>
189
              </li>
196
                                                </fieldset>
190
              [% END %]
197
                                            [% END %]
191
        </ol>
198
                                        </fieldset>
192
      </fieldset>
199
                                        <br style="clear:both;" />
193
      [% END %]
200
                                    </div>
194
      </fieldset>
201
                                [% END %]
195
      <br style="clear:both;" />
202
                            [% ELSE %]
196
      </div>
203
                                <div id="mp_1" class="matchgroup">
197
  </fieldset>
204
                                    <fieldset class="rows">
198
205
                                        <legend>Match point 1 | <a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
199
  [% END %]
206
                                        <ol>
200
  [% ELSE %]
207
                                            <li>
201
  <div id="mp_1" class="matchgroup">
208
                                                <label for="mp_1_search_index">Search index: </label>
202
  <fieldset class="rows">
209
                                                <input type ="text" id="mp_1_search_index" name="mp_1_search_index" size="20" maxlength="30" />
203
    <legend>Match point 1 | <a href="#" class="button" onclick="InsertMatchpoint('mp_1', 'mp_template'); return false;">Add match point</a> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
210
                                            </li>
204
    <ol>
211
                                            <li>
205
      <li>
212
                                                <label for="mp_1_score">Score: </label>
206
        <label for="mp_1_search_index">Search index: </label>
213
                                                <input type ="text" id="mp_1_score" name="mp_1_score" size="5" maxlength="5" />
207
        <input type ="text" id="mp_1_search_index" name="mp_1_search_index" size="20" 
214
                                            </li>
208
          maxlength="30" />
215
                                        </ol>
209
      </li>
216
                                        <fieldset class="rows" id="mp_1_c_1">
210
      <li>
217
                                            <legend>Matchpoint components</legend>
211
        <label for="mp_1_score">Score: </label>
218
                                            <ol>
212
        <input type ="text" id="mp_1_score" name="mp_1_score" size="5" maxlength="5" />
219
                                                <li>
213
      </li>
220
                                                    <label for="mp_1_c_1_tag">Tag: </label>
214
    </ol>
221
                                                    <input type="text" id="mp_1_c_1_tag" name="mp_1_c_1_tag" size="3" maxlength="3" />
215
    <fieldset class="rows" id="mp_1_c_1">
222
                                                </li>
216
      <legend>Matchpoint components</legend>
223
                                                <li>
217
        <ol>
224
                                                    <label for="mp_1_c_1_subfields">Subfields: </label>
218
          <li>
225
                                                    <input type="text" id="mp_1_c_1_subfields" name="mp_1_c_1_subfields" size="10" maxlength="40" />
219
            <label for="mp_1_c_1_tag">Tag: </label>
226
                                                </li>
220
            <input type="text" id="mp_1_c_1_tag" name="mp_1_c_1_tag" size="3" maxlength="3" />
227
                                                <li>
221
          </li>
228
                                                    <label for="mp_1_c_1_offset">Offset: </label>
222
          <li>
229
                                                    <input type="text" id="mp_1_c_1_offset" name="mp_1_c_1_offset" size="5" maxlength="5" />
223
            <label for="mp_1_c_1_subfields">Subfields: </label>
230
                                                </li>
224
            <input type="text" id="mp_1_c_1_subfields" name="mp_1_c_1_subfields" size="10" maxlength="40" />
231
                                                <li>
225
          </li>
232
                                                    <label for="mp_1_c_1_length">Length: </label>
226
          <li>
233
                                                    <input type="text" id="mp_1_c_1_length" name="mp_1_c_1_length" size="5" maxlength="5" />
227
            <label for="mp_1_c_1_offset">Offset: </label>
234
                                                </li>
228
            <input type="text" id="mp_1_c_1_offset" name="mp_1_c_1_offset" size="5" maxlength="5" />
235
                                                <li id="mp_1_c_1_n_1">
229
          </li>
236
                                                    <label for="mp_1_c_1_n_1_norm">Normalization rule: </label>
230
          <li>
237
                                                    [% PROCESS norms_select selected_norm="none" id="mp_1_c_1_n_1_norm" name="mp_1_c_1_n_1_norm" %]
231
            <label for="mp_1_c_1_length">Length: </label>
238
                                                </li>
232
            <input type="text" id="mp_1_c_1_length" name="mp_1_c_1_length" size="5" maxlength="5" />
239
                                            </ol>
233
          </li>
240
                                        </fieldset>
234
            <li id="mp_1_c_1_n_1">
241
                                    </fieldset>
235
              <label for="mp_1_c_1_n_1_norm">Normalization rule: </label>
242
                                    <br style="clear:both;" />
236
                [% PROCESS norms_select selected_norm="none" id="mp_1_c_1_n_1_norm" name="mp_1_c_1_n_1_norm" %]
243
                                </div>
237
            </li>
244
                            [% END %]
238
        </ol>
245
                        </fieldset>
239
    </fieldset>
246
240
    </fieldset>
247
                        <fieldset class="rows" id="match_checks">
241
      <br style="clear:both;" />
248
                            <h4>Required match checks</h4>
242
      </div>
249
                            [% IF ( edit_matching_rule ) %]
243
250
                                [% IF ( matchchecks ) %]
244
  </fieldset>
251
                                    <p id="addMatchCheck" style="display:none;">
245
  [% END %]
252
                                [% ELSE %]
246
253
                                    <p id="addMatchCheck">
247
  <fieldset class="rows" id="match_checks">
254
                                [% END %]
248
  <h4>Required match checks</h4>
255
                                <a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p>
249
  [% IF ( edit_matching_rule ) %]
256
                            [% ELSE %]
250
  [% IF ( matchchecks ) %]<p id="addMatchCheck" style="display:none;">[% ELSE %]<p id="addMatchCheck">[% END %]<a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p>
257
                                <p id="addMatchCheck" style="display:none;"><a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p>
251
  [% ELSE %]<p id="addMatchCheck" style="display:none;"><a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a></p>[% END %]
258
                            [% END %]
252
  [% IF ( edit_matching_rule ) %]
259
253
  [% FOREACH matchcheck IN matchchecks %]
260
                            [% IF ( edit_matching_rule ) %]
254
  <div id="mc_[% matchcheck.mc_num | html %]" class="matchgroup">
261
                                [% FOREACH matchcheck IN matchchecks %]
255
  <fieldset class="rows">
262
                                    <div id="mc_[% matchcheck.mc_num | html %]" class="matchgroup">
256
    <legend>Match check [% matchcheck.mc_num | html %]<a href="#" class="button" onclick="InsertMatchcheck('mc_[% matchcheck.mc_num | html %]', 'mc_template'); return false;">Add match check</a> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
263
                                        <fieldset class="rows">
257
    <input type="hidden" id="mc_[% matchcheck.mc_num | html %]_id" name="mc_[% matchcheck.mc_num | html %]_id" value="1" />
264
                                            <legend>Match check [% matchcheck.mc_num | html %]<a href="#" class="button" onclick="InsertMatchcheck('mc_[% matchcheck.mc_num | html %]', 'mc_template'); return false;">Add match check</a> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
258
      [% FOREACH src_component IN matchcheck.src_components %]
265
                                            <input type="hidden" id="mc_[% matchcheck.mc_num | html %]_id" name="mc_[% matchcheck.mc_num | html %]_id" value="1" />
259
      <fieldset class="rows" id="mc_[% src_component.mc_num | html %]_src_c_[% src_component.comp_num | html %]">
266
                                            [% FOREACH src_component IN matchcheck.src_components %]
260
        <legend>Source (incoming) record check field</legend>
267
                                                <fieldset class="rows" id="mc_[% src_component.mc_num | html %]_src_c_[% src_component.comp_num | html %]">
261
        <ol>
268
                                                    <legend>Source (incoming) record check field</legend>
262
          <li>
269
                                                    <ol>
263
            <label for="mc_[% src_component.mc_num | html %]_src_c_[% src_component.comp_num | html %]_tag">Tag: </label>
270
                                                        <li>
264
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_tag" 
271
                                                            <label for="mc_[% src_component.mc_num | html %]_src_c_[% src_component.comp_num | html %]_tag">Tag: </label>
265
                   name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_tag" 
272
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_tag" name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_tag" value="[% src_component.tag | html %]" size="3" maxlength="3" />
266
                   value="[% src_component.tag | html %]"
273
                                                        </li>
267
                   size="3" maxlength="3" />
274
                                                        <li>
268
          </li>
275
                                                            <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_subfields">Subfields: </label>
269
          <li>
276
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_subfields" name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_subfields" value="[% src_component.subfields | html %]" size="10" maxlength="40" />
270
            <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_subfields">Subfields: </label>
277
                                                        </li>
271
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_subfields" 
278
                                                        <li>
272
                   name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_subfields" 
279
                                                            <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_offset">Offset: </label>
273
                   value="[% src_component.subfields | html %]"
280
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_offset" name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_offset" value="[% src_component.offset | html %]" size="5" maxlength="5" />
274
                   size="10" maxlength="40" />
281
                                                        </li>
275
          </li>
282
                                                        <li>
276
          <li>
283
                                                            <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_length">Length: </label>
277
            <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_offset">Offset: </label>
284
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_length" name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_length" value="[% src_component.length | html %]" size="5" maxlength="5" />
278
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_offset" 
285
                                                        </li>
279
                   name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_offset" 
286
                                                        [% FOREACH norm IN src_component.norms %]
280
                   value="[% src_component.offset | html %]"
287
                                                            <li id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_n_[% norm.norm_num | html %]">
281
                   size="5" maxlength="5" />
288
                                                                <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_n_[% norm.norm_num | html %]_norm">Normalization rule: </label>
282
          </li>
289
                                                                [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %]
283
          <li>
290
                                                                [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" %]
284
            <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_length">Length: </label>
291
                                                            </li>
285
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_length" 
292
                                                        [% END %]
286
                   name="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_length" 
293
                                                    </ol>
287
                   value="[% src_component.length | html %]"
294
                                                </fieldset>
288
                   size="5" maxlength="5" />
295
                                            [% END %]
289
          </li>
296
290
          [% FOREACH norm IN src_component.norms %]
297
                                            [% FOREACH tgt_component IN matchcheck.tgt_components %]
291
            <li id="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_n_[% norm.norm_num | html %]">
298
                                                <fieldset class="rows" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]">
292
              <label for="mc_[% matchcheck.mc_num | html %]_src_c_[% src_component.comp_num | html %]_n_[% norm.norm_num | html %]_norm">Normalization rule: </label>
299
                                                    <legend>Target (database) record check field</legend>
293
                [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %]
300
                                                    <ol>
294
                [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_src_c_${src_component.comp_num}_n_${norm.norm_num}_norm" %]
301
                                                        <li>
295
            </li>
302
                                                            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_tag">Tag: </label>
296
          [% END %]
303
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_tag" name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_tag" value="[% tgt_component.tag | html %]" size="3" maxlength="3" />
297
        </ol>
304
                                                        </li>
298
      </fieldset>
305
                                                        <li>
299
      [% END %]
306
                                                            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_subfields">Subfields: </label>
300
      [% FOREACH tgt_component IN matchcheck.tgt_components %]
307
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_subfields" name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_subfields" value="[% tgt_component.subfields | html %]" size="10" maxlength="40" />
301
      <fieldset class="rows" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]">
308
                                                        </li>
302
        <legend>Target (database) record check field</legend>
309
                                                        <li>
303
        <ol>
310
                                                            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_offset">Offset: </label>
304
          <li>
311
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_offset" name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_offset" value="[% tgt_component.offset | html %]" size="5" maxlength="5" />
305
            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_tag">Tag: </label>
312
                                                        </li>
306
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_tag" 
313
                                                        <li>
307
                   name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_tag" 
314
                                                            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_length">Length: </label>
308
                   value="[% tgt_component.tag | html %]"
315
                                                            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_length" name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_length" value="[% tgt_component.length | html %]" size="5" maxlength="5" />
309
                   size="3" maxlength="3" />
316
                                                        </li>
310
          </li>
317
                                                        [% FOREACH norm IN tgt_component.norms %]
311
          <li>
318
                                                            <li id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_n_[% norm.norm_num | html %]">
312
            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_subfields">Subfields: </label>
319
                                                                <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_n_[% norm.norm_num | html %]_norm">Normalization rule: </label>
313
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_subfields" 
320
                                                                [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %]
314
                   name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_subfields" 
321
                                                                [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" %]
315
                   value="[% tgt_component.subfields | html %]"
322
                                                            </li>
316
                   size="10" maxlength="40" />
323
                                                        [% END %]
317
          </li>
324
                                                    </ol>
318
          <li>
325
                                                </fieldset>
319
            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_offset">Offset: </label>
326
                                            [% END %]
320
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_offset" 
327
                                        </fieldset>
321
                   name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_offset" 
328
                                        <br style="clear:both;" />
322
                   value="[% tgt_component.offset | html %]"
329
                                    </div>
323
                   size="5" maxlength="5" />
330
                                [% END %]
324
          </li>
331
                            [% ELSE %]
325
          <li>
332
                                <div id="mc_1" class="matchgroup">
326
            <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_length">Length: </label>
333
                                    <fieldset class="rows">
327
            <input type="text" id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_length" 
334
                                        <legend>Match check 1 | <a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
328
                   name="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_length" 
335
                                        <input type="hidden" id="mc_1_id" name="mc_1_id" value="1" />
329
                   value="[% tgt_component.length | html %]"
336
                                        <fieldset class="rows" id="mc_1_src_c_1">
330
                   size="5" maxlength="5" />
337
                                            <legend>Source (incoming) record check field</legend>
331
          </li>
338
                                            <ol>
332
          [% FOREACH norm IN tgt_component.norms %]
339
                                                <li>
333
            <li id="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_n_[% norm.norm_num | html %]">
340
                                                    <label for="mc_1_src_c_1_tag">Tag: </label>
334
              <label for="mc_[% matchcheck.mc_num | html %]_tgt_c_[% tgt_component.comp_num | html %]_n_[% norm.norm_num | html %]_norm">Normalization rule: </label>
341
                                                    <input type="text" id="mc_1_src_c_1_tag" name="mc_1_src_c_1_tag" size="3" maxlength="3" />
335
                [%# Note: Following directive in one line, otherwise we have translatabiltiy problems %]
342
                                                </li>
336
                [% PROCESS norms_select selected_norm=norm.norm id="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" name="mc_${matchcheck.mc_num}_tgt_c_${tgt_component.comp_num}_n_${norm.norm_num}_norm" %]
343
                                                <li>
337
            </li>
344
                                                    <label for="mc_1_src_c_1_subfields">Subfields: </label>
338
          [% END %]
345
                                                    <input type="text" id="mc_1_src_c_1_subfields" name="mc_1_src_c_1_subfields" size="10" maxlength="40" />
339
        </ol>
346
                                                </li>
340
      </fieldset>
347
                                                <li>
341
      [% END %]
348
                                                    <label for="mc_1_src_c_1_offset">Offset: </label>
342
  </fieldset>
349
                                                    <input type="text" id="mc_1_src_c_1_offset" name="mc_1_src_c_1_offset" size="5" maxlength="5" />
343
  <br style="clear:both;" />
350
                                                </li>
344
  </div>
351
                                                <li>
345
  [% END %]
352
                                                    <label for="mc_1_src_c_1_length">Length: </label>
346
  [% ELSE %]
353
                                                    <input type="text" id="mc_1_src_c_1_length" name="mc_1_src_c_1_length" size="5" maxlength="5" />
347
  <div id="mc_1" class="matchgroup">
354
                                                </li>
348
  <fieldset class="rows">
355
                                                <li id="mc_1_src_c_1_n_1">
349
    <legend>Match check 1 | <a href="#" class="button" onclick="InsertMatchcheck('mc_1', 'mc_template'); return false;">Add match check</a> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
356
                                                    <label for="mc_1_src_c_1_n_1_norm">Normalization rule: </label>
350
    <input type="hidden" id="mc_1_id" name="mc_1_id" value="1" />
357
                                                    [% PROCESS norms_select selected_norm="none" id="mc_1_src_c_1_n_1_norm" name="mc_1_src_c_1_n_1_norm" %]
351
      <fieldset class="rows" id="mc_1_src_c_1">
358
                                                </li>
352
        <legend>Source (incoming) record check field</legend>
359
                                            </ol>
353
        <ol>
360
                                        </fieldset>
354
          <li>
361
355
            <label for="mc_1_src_c_1_tag">Tag: </label>
362
                                        <fieldset class="rows" id="mc_1_tgt_c_1">
356
            <input type="text" id="mc_1_src_c_1_tag" name="mc_1_src_c_1_tag" size="3" maxlength="3" />
363
                                            <legend>Target (database) record check field</legend>
357
          </li>
364
                                            <ol>
358
          <li>
365
                                                <li>
359
            <label for="mc_1_src_c_1_subfields">Subfields: </label>
366
                                                    <label for="mc_1_tgt_c_1_tag">Tag: </label>
360
            <input type="text" id="mc_1_src_c_1_subfields" name="mc_1_src_c_1_subfields" size="10" maxlength="40" />
367
                                                    <input type="text" id="mc_1_tgt_c_1_tag" name="mc_1_tgt_c_1_tag" size="3" maxlength="3" />
361
          </li>
368
                                                </li>
362
          <li>
369
                                                <li>
363
            <label for="mc_1_src_c_1_offset">Offset: </label>
370
                                                    <label for="mc_1_tgt_c_1_subfields">Subfields: </label>
364
            <input type="text" id="mc_1_src_c_1_offset" name="mc_1_src_c_1_offset" size="5" maxlength="5" />
371
                                                    <input type="text" id="mc_1_tgt_c_1_subfields" name="mc_1_tgt_c_1_subfields" size="10" maxlength="40" />
365
          </li>
372
                                                </li>
366
          <li>
373
                                                <li>
367
            <label for="mc_1_src_c_1_length">Length: </label>
374
                                                    <label for="mc_1_tgt_c_1_offset">Offset: </label>
368
            <input type="text" id="mc_1_src_c_1_length" name="mc_1_src_c_1_length" size="5" maxlength="5" />
375
                                                    <input type="text" id="mc_1_tgt_c_1_offset" name="mc_1_tgt_c_1_offset" size="5" maxlength="5" />
369
          </li>
376
                                                </li>
370
            <li id="mc_1_src_c_1_n_1">
377
                                                <li>
371
              <label for="mc_1_src_c_1_n_1_norm">Normalization rule: </label>
378
                                                    <label for="mc_1_tgt_c_1_length">Length: </label>
372
                [% PROCESS norms_select selected_norm="none" id="mc_1_src_c_1_n_1_norm" name="mc_1_src_c_1_n_1_norm" %]
379
                                                    <input type="text" id="mc_1_tgt_c_1_length" name="mc_1_tgt_c_1_length" size="5" maxlength="5" />
373
            </li>
380
                                                </li>
374
        </ol>
381
                                                <li id="mc_1_tgt_c_1_n_1">
375
      </fieldset>
382
                                                    <label for="mc_1_tgt_c_1_n_1_norm">Normalization rule: </label>
376
383
                                                    [% PROCESS norms_select selected_norm="none" id="mc_1_tgt_c_1_n_1_norm" name="mc_1_tgt_c_1_n_1_norm" %]
377
      <fieldset class="rows" id="mc_1_tgt_c_1">
384
                                                </li>
378
        <legend>Target (database) record check field</legend>
385
                                            </ol>
379
        <ol>
386
                                        </fieldset>
380
          <li>
387
                                    </fieldset>
381
            <label for="mc_1_tgt_c_1_tag">Tag: </label>
388
                                    <br style="clear:both;" />
382
            <input type="text" id="mc_1_tgt_c_1_tag" name="mc_1_tgt_c_1_tag" size="3" maxlength="3" />
389
                                </div>
383
          </li>
390
                            [% END %]
384
          <li>
391
                        </fieldset>
385
            <label for="mc_1_tgt_c_1_subfields">Subfields: </label>
392
                        <fieldset class="action">
386
            <input type="text" id="mc_1_tgt_c_1_subfields" name="mc_1_tgt_c_1_subfields" size="10" maxlength="40" />
393
                            [% IF ( edit_matching_rule ) %]
387
          </li>
394
                                <input type="button" value="Save" onclick="CheckMatchingRuleForm(this.form)" />
388
          <li>
395
                            [% ELSE %]
389
            <label for="mc_1_tgt_c_1_offset">Offset: </label>
396
                                <input type="button" value="Save" onclick="CheckMatchingRuleForm(this.form)" />
390
            <input type="text" id="mc_1_tgt_c_1_offset" name="mc_1_tgt_c_1_offset" size="5" maxlength="5" />
397
                            [% END %]
391
          </li>
398
                            <a class="cancel" href="/cgi-bin/koha/admin/matching-rules.pl">Cancel</a>
392
          <li>
399
                        </fieldset>
393
            <label for="mc_1_tgt_c_1_length">Length: </label>
400
                    </form>
394
            <input type="text" id="mc_1_tgt_c_1_length" name="mc_1_tgt_c_1_length" size="5" maxlength="5" />
401
                [% END %]
395
          </li>
402
396
            <li id="mc_1_tgt_c_1_n_1">
403
                [% IF ( delete_matching_rule_form ) %]
397
              <label for="mc_1_tgt_c_1_n_1_norm">Normalization rule: </label>
404
                    <div class="dialog alert">
398
                [% PROCESS norms_select selected_norm="none" id="mc_1_tgt_c_1_n_1_norm" name="mc_1_tgt_c_1_n_1_norm" %]
405
                        <h3>Confirm deletion of record matching rule <span class="ex">'[% code | html %]' ([% description | html %])</span>?</h3>
399
            </li>
406
                        <form action="[% script_name | html %]" name="Aform" method="post">
400
        </ol>
407
                            <input type="hidden" name="op" value="[% confirm_op | html %]" />
401
      </fieldset>
408
                            <input type="hidden" name="matcher_id" value="[% matcher_id | html %]" />
402
  </fieldset>
409
                            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete record matching rule</button>
403
  <br style="clear:both;" />
410
                        </form>
404
  </div>
411
                        <form action="[% script_name | html %]" method="get">
405
  [% END %]
412
                            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
406
  </fieldset>
413
                        </form>
407
  <fieldset class="action">
414
                    </div>
408
    [% IF ( edit_matching_rule ) %]
415
                [% END %]
409
    <input type="button" value="Save"
416
410
           onclick="CheckMatchingRuleForm(this.form)" />
417
                [% IF ( display_list ) %]
411
    [% ELSE %]
418
412
    <input type="button" value="Save"
419
                    <div id="toolbar" class="btn-toolbar">
413
           onclick="CheckMatchingRuleForm(this.form)" />
420
                        <a class="btn btn-default" id="newrule" href="[% script_name | url %]?op=add_matching_rule"><i class="fa fa-plus"></i> New record matching rule</a>
414
    [% END %]
421
                    </div>
415
    <a class="cancel" href="/cgi-bin/koha/admin/matching-rules.pl">Cancel</a>
422
416
  </fieldset>
423
                    <h2>Record matching rules</h2>
417
</form>
424
418
[% END %]
425
                    [% IF ( added_matching_rule ) %]
419
426
                        <div class="dialog message">Added record matching rule &quot;[% added_matching_rule | html %]&quot;</div>
420
[% IF ( delete_matching_rule_form ) %]
427
                    [% END %]
421
    <div class="dialog alert">
428
                    [% IF ( edited_matching_rule ) %]
422
        <h3>Confirm deletion of record matching rule <span class="ex">'[% code | html %]' ([% description | html %])</span>?</h3>
429
                        <div class="dialog message">Modified record matching rule &quot;[% edited_matching_rule | html %]&quot;</div>
423
        <form action="[% script_name | html %]" name="Aform" method="post">
430
                    [% END %]
424
            <input type="hidden" name="op" value="[% confirm_op | html %]" />
431
                    [% IF ( deleted_matching_rule ) %]
425
            <input type="hidden" name="matcher_id" value="[% matcher_id | html %]" />
432
                        <div class="dialog message">Deleted record matching rule &quot;[% deleted_matching_rule | html %]&quot;</div>
426
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete record matching rule</button>
433
                    [% END %]
427
        </form>
434
                    [% IF ( available_matching_rules ) %]
428
        <form action="[% script_name | html %]" method="get">
435
                        <table>
429
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
436
                            <tr>
430
        </form>
437
                                <th>#</th>
431
    </div>
438
                                <th>Code</th>
432
[% END %]
439
                                <th>Description</th>
433
440
                                <th>Actions</th>
434
[% IF ( display_list ) %]
441
                            </tr>
435
442
                            [% FOREACH available_matching_rule IN available_matching_rules %]
436
<div id="toolbar" class="btn-toolbar">
443
                                <tr>
437
    <a class="btn btn-default" id="newrule" href="[% script_name | url %]?op=add_matching_rule"><i class="fa fa-plus"></i> New record matching rule</a>
444
                                    <td>[% available_matching_rule.matcher_id | html %]</td>
438
</div>
445
                                    <td>[% available_matching_rule.code | html %]</td>
439
446
                                    <td>[% available_matching_rule.description | html %]</td>
440
<h2>Record matching rules</h2>
447
                                    <td class="actions">
441
[% IF ( added_matching_rule ) %]
448
                                        <a class="btn btn-default btn-xs" href="[% available_matching_rule.script_name | url %]?op=edit_matching_rule&amp;matcher_id=[% available_matching_rule.matcher_id | uri %]"><i class="fa fa-pencil"></i> Edit</a>
442
<div class="dialog message">Added record matching rule &quot;[% added_matching_rule | html %]&quot;</div>
449
                                        <a class="btn btn-default btn-xs" href="[% available_matching_rule.script_name | url %]?op=delete_matching_rule&amp;matcher_id=[% available_matching_rule.matcher_id | uri %]"><i class="fa fa-trash"></i> Delete</a>
443
[% END %]
450
                                    </td>
444
[% IF ( edited_matching_rule ) %]
451
                                </tr>
445
<div class="dialog message">Modified record matching rule &quot;[% edited_matching_rule | html %]&quot;</div>
452
                            [% END %]
446
[% END %]
453
                        </table>
447
[% IF ( deleted_matching_rule ) %]
454
                    [% ELSE %]
448
<div class="dialog message">Deleted record matching rule &quot;[% deleted_matching_rule | html %]&quot;</div>
455
                        <p>There are no saved matching rules.</p>
449
[% END %]
456
                    [% END %]
450
[% IF ( available_matching_rules ) %]<table>
457
451
  <tr>
458
                    <div class="pages">[% pagination_bar | $raw %]</div>
452
    <th>#</th>
459
                [% END %]
453
    <th>Code</th>
460
454
    <th>Description</th>
461
                [% IF ( matching_rule_form ) %]
455
    <th>Actions</th>
462
                    <div id="mp_template" class="matchgroup" style="display:none;">
456
  </tr>
463
                        <fieldset class="rows">
457
  [% FOREACH available_matching_rule IN available_matching_rules %]
464
                            <legend>Match point <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
458
  <tr>
465
                            <ol>
459
    <td>[% available_matching_rule.matcher_id | html %]</td>
466
                                <li>
460
    <td>[% available_matching_rule.code | html %]</td>
467
                                    <label for="mp_num_search_index">Search index: </label>
461
    <td>[% available_matching_rule.description | html %]</td>
468
                                    <input type ="text" id="mp_num_search_index" name="mp_num_search_index" size="20" maxlength="30" />
462
    <td class="actions">
469
                                </li>
463
      <a class="btn btn-default btn-xs" href="[% available_matching_rule.script_name | url %]?op=edit_matching_rule&amp;matcher_id=[% available_matching_rule.matcher_id | uri %]"><i class="fa fa-pencil"></i> Edit</a>
470
                                <li>
464
      <a class="btn btn-default btn-xs" href="[% available_matching_rule.script_name | url %]?op=delete_matching_rule&amp;matcher_id=[% available_matching_rule.matcher_id | uri %]"><i class="fa fa-trash"></i> Delete</a>
471
                                    <label for="mp_num_score">Score: </label>
465
    </td>
472
                                    <input type ="text" id="mp_num_score" name="mp_num_score" size="5" maxlength="5" />
466
  </tr>
473
                                </li>
467
  [% END %]
474
                            </ol>
468
</table>[% ELSE %]<p>There are no saved matching rules.</p>[% END %]
475
                            <fieldset id="mp_num_c_1" class="rows">
469
476
                                <legend>Matchpoint components</legend>
470
<div class="pages">[% pagination_bar | $raw %]</div>
477
                                <ol>
471
478
                                    <li>
472
[% END %]
479
                                        <label for="mp_num_c_1_tag">Tag: </label>
473
 [% IF ( matching_rule_form ) %]
480
                                        <input type="text" id="mp_num_c_1_tag" name="mp_num_c_1_tag" size="3" maxlength="3" />
474
<div id="mp_template" class="matchgroup" style="display:none;">
481
                                    </li>
475
  <fieldset class="rows">
482
                                    <li>
476
    <legend>Match point <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchpoint(this); return false;">Remove this match point</a></legend>
483
                                        <label for="mp_num_c_1_subfields">Subfields: </label>
477
    <ol>
484
                                        <input type="text" id="mp_num_c_1_subfields" name="mp_num_c_1_subfields" size="10" maxlength="40" />
478
      <li>
485
                                    </li>
479
        <label for="mp_num_search_index">Search index: </label>
486
                                    <li>
480
        <input type ="text" id="mp_num_search_index" name="mp_num_search_index" size="20" 
487
                                        <label for="mp_num_c_1_offset">Offset: </label>
481
          maxlength="30" />
488
                                        <input type="text" id="mp_num_c_1_offset" name="mp_num_c_1_offset" size="5" maxlength="5" />
482
      </li>
489
                                    </li>
483
      <li>
490
                                    <li>
484
        <label for="mp_num_score">Score: </label>
491
                                        <label for="mp_num_c_1_length">Length: </label>
485
        <input type ="text" id="mp_num_score" name="mp_num_score" size="5" maxlength="5" />
492
                                        <input type="text" id="mp_num_c_1_length" name="mp_num_c_1_length" size="5" maxlength="5" />
486
      </li>
493
                                    </li>
487
    </ol>
494
                                    <li id="mp_num_c_1_n_1">
488
      <fieldset id="mp_num_c_1" class="rows">
495
                                        <label for="mp_num_c_1_n_1_norm">Normalization rule: </label>
489
      <legend>Matchpoint components</legend>
496
                                        [% PROCESS norms_select selected_norm="none" id="mp_num_c_1_n_1_norm" name="mp_num_c_1_n_1_norm" %]
490
        <ol>
497
                                    </li>
491
          <li>
498
                                </ol>
492
            <label for="mp_num_c_1_tag">Tag: </label>
499
                            </fieldset>
493
            <input type="text" id="mp_num_c_1_tag" name="mp_num_c_1_tag" size="3" maxlength="3" />
500
                        </fieldset>
494
          </li>
501
                        <br style="clear:both;" />
495
          <li>
502
                    </div>
496
            <label for="mp_num_c_1_subfields">Subfields: </label>
503
497
            <input type="text" id="mp_num_c_1_subfields" name="mp_num_c_1_subfields" size="10" maxlength="40" />
504
                    <div id="mc_template" class="matchgroup" style="display:none">
498
          </li>
505
                        <fieldset class="rows">
499
          <li>
506
                            <legend>Match check <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
500
            <label for="mp_num_c_1_offset">Offset: </label>
507
                            <input type="hidden" id="mc_num_id" name="mc_num_id" value="1" />
501
            <input type="text" id="mp_num_c_1_offset" name="mp_num_c_1_offset" size="5" maxlength="5" />
508
                            <fieldset class="rows" id="mc_num_src_c_1">
502
          </li>
509
                                <legend>Source (incoming) record check field</legend>
503
          <li>
510
                                <ol>
504
            <label for="mp_num_c_1_length">Length: </label>
511
                                    <li>
505
            <input type="text" id="mp_num_c_1_length" name="mp_num_c_1_length" size="5" maxlength="5" />
512
                                        <label for="mc_num_src_c_1_tag">Tag: </label>
506
          </li>
513
                                        <input type="text" id="mc_num_src_c_1_tag" name="mc_num_src_c_1_tag" size="3" maxlength="3" />
507
            <li id="mp_num_c_1_n_1">
514
                                    </li>
508
              <label for="mp_num_c_1_n_1_norm">Normalization rule: </label>
515
                                    <li>
509
                [% PROCESS norms_select selected_norm="none" id="mp_num_c_1_n_1_norm" name="mp_num_c_1_n_1_norm" %]
516
                                        <label for="mc_num_src_c_1_subfields">Subfields: </label>
510
            </li>
517
                                        <input type="text" id="mc_num_src_c_1_subfields" name="mc_num_src_c_1_subfields" size="10" maxlength="40" />
511
        </ol>
518
                                    </li>
512
      </fieldset>
519
                                    <li>
513
  </fieldset>
520
                                        <label for="mc_num_src_c_1_offset">Offset: </label>
514
      <br style="clear:both;" />
521
                                        <input type="text" id="mc_num_src_c_1_offset" name="mc_num_src_c_1_offset" size="5" maxlength="5" />
515
      </div>
522
                                    </li>
516
523
                                    <li>
517
<div id="mc_template" class="matchgroup" style="display:none">
524
                                        <label for="mc_num_src_c_1_length">Length: </label>
518
<fieldset class="rows">
525
                                        <input type="text" id="mc_num_src_c_1_length" name="mc_num_src_c_1_length" size="5" maxlength="5" />
519
  <legend>Match check <span class="counter"></span> | <a href="#" class="button" onclick="DeleteMatchcheck(this); return false;">Remove this match check</a></legend>
526
                                    </li>
520
  <input type="hidden" id="mc_num_id" name="mc_num_id" value="1" />
527
                                    <li id="mc_num_src_c_1_n_1">
521
    <fieldset class="rows" id="mc_num_src_c_1">
528
                                        <label for="mc_num_src_c_1_n_1_norm">Normalization rule: </label>
522
      <legend>Source (incoming) record check field</legend>
529
                                        [% PROCESS norms_select selected_norm="none" id="mc_num_src_c_1_n_1_norm" name="mc_num_src_c_1_n_1_norm" %]
523
      <ol>
530
                                    </li>
524
        <li>
531
                                </ol>
525
          <label for="mc_num_src_c_1_tag">Tag: </label>
532
                            </fieldset>
526
          <input type="text" id="mc_num_src_c_1_tag" name="mc_num_src_c_1_tag" size="3" maxlength="3" />
533
                            <fieldset class="rows" id="mc_num_tgt_c_1">
527
        </li>
534
                                <legend>Target (database) record check field</legend>
528
        <li>
535
                                <ol>
529
          <label for="mc_num_src_c_1_subfields">Subfields: </label>
536
                                    <li>
530
          <input type="text" id="mc_num_src_c_1_subfields" name="mc_num_src_c_1_subfields" size="10" maxlength="40" />
537
                                        <label for="mc_num_tgt_c_1_tag">Tag: </label>
531
        </li>
538
                                        <input type="text" id="mc_num_tgt_c_1_tag" name="mc_num_tgt_c_1_tag" size="3" maxlength="3" />
532
        <li>
539
                                    </li>
533
          <label for="mc_num_src_c_1_offset">Offset: </label>
540
                                    <li>
534
          <input type="text" id="mc_num_src_c_1_offset" name="mc_num_src_c_1_offset" size="5" maxlength="5" />
541
                                        <label for="mc_num_tgt_c_1_subfields">Subfields: </label>
535
        </li>
542
                                        <input type="text" id="mc_num_tgt_c_1_subfields" name="mc_num_tgt_c_1_subfields" size="10" maxlength="40" />
536
        <li>
543
                                    </li>
537
          <label for="mc_num_src_c_1_length">Length: </label>
544
                                    <li>
538
          <input type="text" id="mc_num_src_c_1_length" name="mc_num_src_c_1_length" size="5" maxlength="5" />
545
                                        <label for="mc_num_tgt_c_1_offset">Offset: </label>
539
        </li>
546
                                        <input type="text" id="mc_num_tgt_c_1_offset" name="mc_num_tgt_c_1_offset" size="5" maxlength="5" />
540
          <li id="mc_num_src_c_1_n_1">
547
                                    </li>
541
            <label for="mc_num_src_c_1_n_1_norm">Normalization rule: </label>
548
                                    <li>
542
               [% PROCESS norms_select selected_norm="none" id="mc_num_src_c_1_n_1_norm" name="mc_num_src_c_1_n_1_norm" %]
549
                                        <label for="mc_num_tgt_c_1_length">Length: </label>
543
          </li>
550
                                        <input type="text" id="mc_num_tgt_c_1_length" name="mc_num_tgt_c_1_length" size="5" maxlength="5" />
544
      </ol>
551
                                    </li>
545
    </fieldset>
552
                                    <li id="mc_num_tgt_c_1_n_1">
546
    <fieldset class="rows" id="mc_num_tgt_c_1">
553
                                        <label for="mc_num_tgt_c_1_n_1_norm">Normalization rule: </label>
547
      <legend>Target (database) record check field</legend>
554
                                        [% PROCESS norms_select selected_norm="none" id="mc_num_tgt_c_1_n_1_norm" name="mc_num_tgt_c_1_n_1_norm" %]
548
      <ol>
555
                                    </li>
549
        <li>
556
                                </ol>
550
          <label for="mc_num_tgt_c_1_tag">Tag: </label>
557
                            </fieldset>
551
          <input type="text" id="mc_num_tgt_c_1_tag" name="mc_num_tgt_c_1_tag" size="3" maxlength="3" />
558
                        </fieldset>
552
        </li>
559
                        <br style="clear:both;" />
553
        <li>
560
                    </div>
554
          <label for="mc_num_tgt_c_1_subfields">Subfields: </label>
561
                [% END %]
555
          <input type="text" id="mc_num_tgt_c_1_subfields" name="mc_num_tgt_c_1_subfields" size="10" maxlength="40" />
556
        </li>
557
        <li>
558
          <label for="mc_num_tgt_c_1_offset">Offset: </label>
559
          <input type="text" id="mc_num_tgt_c_1_offset" name="mc_num_tgt_c_1_offset" size="5" maxlength="5" />
560
        </li>
561
        <li>
562
          <label for="mc_num_tgt_c_1_length">Length: </label>
563
          <input type="text" id="mc_num_tgt_c_1_length" name="mc_num_tgt_c_1_length" size="5" maxlength="5" />
564
        </li>
565
          <li id="mc_num_tgt_c_1_n_1">
566
            <label for="mc_num_tgt_c_1_n_1_norm">Normalization rule: </label>
567
               [% PROCESS norms_select selected_norm="none" id="mc_num_tgt_c_1_n_1_norm" name="mc_num_tgt_c_1_n_1_norm" %]
568
          </li>
569
      </ol>
570
    </fieldset>
571
</fieldset>
572
<br style="clear:both;" />
573
</div>
574
[% END %]
575
562
576
            </main>
563
            </main>
577
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
564
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
578
- 

Return to bug 24899