Lines 15-35
function reloadPage(p) {
Link Here
|
15 |
$("#profile_type").change(function(){ |
15 |
$("#profile_type").change(function(){ |
16 |
if ( $(this).find("option:selected").val() == "marc" ) { |
16 |
if ( $(this).find("option:selected").val() == "marc" ) { |
17 |
$("#csvnew li.marc_specific").show(); |
17 |
$("#csvnew li.marc_specific").show(); |
|
|
18 |
$("#new_profile_marc_content").attr("required", "required"); |
18 |
$("#csvnew li.sql_specific").hide(); |
19 |
$("#csvnew li.sql_specific").hide(); |
|
|
20 |
$("#new_profile_sql_content").removeAttr("required"); |
19 |
} else { |
21 |
} else { |
20 |
$("#csvnew li.marc_specific").hide(); |
22 |
$("#csvnew li.marc_specific").hide(); |
|
|
23 |
$("#new_profile_marc_content").removeAttr("required"); |
21 |
$("#csvnew li.sql_specific").show(); |
24 |
$("#csvnew li.sql_specific").show(); |
|
|
25 |
$("#new_profile_sql_content").attr("required", "required"); |
22 |
} |
26 |
} |
23 |
}); |
27 |
}); |
24 |
$("#modify_profile_type").change(function(){ |
28 |
$("#modify_profile_type").change(function(){ |
25 |
if ( $(this).find("option:selected").val() == "marc" ) { |
29 |
if ( $(this).find("option:selected").val() == "marc" ) { |
26 |
$("#csvedit li.marc_specific").show(); |
30 |
$("#csvedit li.marc_specific").show(); |
|
|
31 |
$("#modify_profile_marc_content").attr("required", "required"); |
27 |
$("#csvedit li.sql_specific").hide(); |
32 |
$("#csvedit li.sql_specific").hide(); |
|
|
33 |
$("#modify_profile_sql_content").removeAttr("required"); |
28 |
} else { |
34 |
} else { |
29 |
$("#csvedit li.marc_specific").hide(); |
35 |
$("#csvedit li.marc_specific").hide(); |
|
|
36 |
$("#modify_profile_marc_content").removeAttr("required"); |
30 |
$("#csvedit li.sql_specific").show(); |
37 |
$("#csvedit li.sql_specific").show(); |
|
|
38 |
$("#modify_profile_sql_content").attr("required", "required"); |
31 |
} |
39 |
} |
32 |
}); |
40 |
}); |
|
|
41 |
$("#profile_type").change(); |
33 |
$("#modify_profile_type").change(); |
42 |
$("#modify_profile_type").change(); |
34 |
}); |
43 |
}); |
35 |
//]]> |
44 |
//]]> |
Lines 79-85
function reloadPage(p) {
Link Here
|
79 |
<fieldset class="rows"> |
88 |
<fieldset class="rows"> |
80 |
<ol> |
89 |
<ol> |
81 |
<li><label for="profile_name" class="required">Profile name: </label> |
90 |
<li><label for="profile_name" class="required">Profile name: </label> |
82 |
<input type="text" id="profile_name" name="profile_name" /></li> |
91 |
<input type="text" id="profile_name" name="profile_name" required="required" /></li> |
83 |
|
92 |
|
84 |
<li> |
93 |
<li> |
85 |
<label for="profile_type" class="required">Profile type: </label> |
94 |
<label for="profile_type" class="required">Profile type: </label> |
Lines 143-156
function reloadPage(p) {
Link Here
|
143 |
</select></li> |
152 |
</select></li> |
144 |
|
153 |
|
145 |
|
154 |
|
146 |
<li class="marc_specific"><label for="new_profile_marc_content">Profile MARC fields: </label> |
155 |
<li class="marc_specific"><label for="new_profile_marc_content" class="required">Profile MARC fields: </label> |
147 |
<textarea cols="50" rows="2" name="profile_marc_content" id="new_profile_marc_content"></textarea> |
156 |
<textarea cols="50" rows="2" name="profile_marc_content" id="new_profile_marc_content"></textarea> |
148 |
<p>You have to define which fields or subfields you want to export, separated by pipes.</p> |
157 |
<p>You have to define which fields or subfields you want to export, separated by pipes.</p> |
149 |
<p>You can also use your own headers (instead of the ones from Koha) by prefixing the field number with an header, followed by the equal sign.</p> |
158 |
<p>You can also use your own headers (instead of the ones from Koha) by prefixing the field number with an header, followed by the equal sign.</p> |
150 |
<p>Example: Personal name=200|Entry element=210$a|300|009</p> |
159 |
<p>Example: Personal name=200|Entry element=210$a|300|009</p> |
151 |
</li> |
160 |
</li> |
152 |
<li class="sql_specific"> |
161 |
<li class="sql_specific"> |
153 |
<label for="new_profile_sql_content">Profile SQL fields: </label> |
162 |
<label for="new_profile_sql_content" class="required">Profile SQL fields: </label> |
154 |
<textarea cols="50" rows="2" name="profile_sql_content" id="new_profile_sql_content"></textarea> |
163 |
<textarea cols="50" rows="2" name="profile_sql_content" id="new_profile_sql_content"></textarea> |
155 |
<p>You have to define which fields you want to export, separated by pipes.</p> |
164 |
<p>You have to define which fields you want to export, separated by pipes.</p> |
156 |
<p>You can also use your own headers (instead of the ones from Koha) by prefixing the field name with an header, followed by the equal sign.</p> |
165 |
<p>You can also use your own headers (instead of the ones from Koha) by prefixing the field name with an header, followed by the equal sign.</p> |
Lines 170-176
function reloadPage(p) {
Link Here
|
170 |
<form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post"> |
179 |
<form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post"> |
171 |
<fieldset class="rows"> |
180 |
<fieldset class="rows"> |
172 |
<ol> |
181 |
<ol> |
173 |
<li><label for="modify_profile_name">Profile name: </label> |
182 |
<li><label for="modify_profile_name" class="required">Profile name: </label> |
174 |
<select id="modify_profile_name" name="profile_name" onchange="javascript:reloadPage(this)"> |
183 |
<select id="modify_profile_name" name="profile_name" onchange="javascript:reloadPage(this)"> |
175 |
<option value="0">-- Choose One --</option> |
184 |
<option value="0">-- Choose One --</option> |
176 |
[% FOREACH existing_profile IN existing_profiles %] |
185 |
[% FOREACH existing_profile IN existing_profiles %] |
Lines 183-189
function reloadPage(p) {
Link Here
|
183 |
</select></li> |
192 |
</select></li> |
184 |
|
193 |
|
185 |
<li> |
194 |
<li> |
186 |
<label for="modify_profile_type">Profile type: </label> |
195 |
<label for="modify_profile_type" class="required">Profile type: </label> |
187 |
<select id="modify_profile_type" name="profile_type"> |
196 |
<select id="modify_profile_type" name="profile_type"> |
188 |
<option value="marc">MARC</option> |
197 |
<option value="marc">MARC</option> |
189 |
[% IF selected_profile_type == "sql" %] |
198 |
[% IF selected_profile_type == "sql" %] |
Lines 343-353
function reloadPage(p) {
Link Here
|
343 |
[% END %] |
352 |
[% END %] |
344 |
</select></li> |
353 |
</select></li> |
345 |
|
354 |
|
346 |
<li class="marc_specific"><label for="modify_profile_marc_content">Profile MARC fields: </label> |
355 |
<li class="marc_specific"><label for="modify_profile_marc_content" class="required">Profile MARC fields: </label> |
347 |
<textarea cols="50" rows="2" name="profile_marc_content" id="modify_profile_marc_content">[% selected_profile_content %]</textarea></li> |
356 |
<textarea cols="50" rows="2" name="profile_marc_content" id="modify_profile_marc_content">[% selected_profile_content %]</textarea></li> |
348 |
|
357 |
|
349 |
<li class="sql_specific"> |
358 |
<li class="sql_specific"> |
350 |
<label for="modify_profile_sql_content">Profile SQL fields: </label> |
359 |
<label for="modify_profile_sql_content" class="required">Profile SQL fields: </label> |
351 |
<textarea cols="50" rows="2" name="profile_sql_content" id="modify_profile_sql_content">[% selected_profile_content %]</textarea> |
360 |
<textarea cols="50" rows="2" name="profile_sql_content" id="modify_profile_sql_content">[% selected_profile_content %]</textarea> |
352 |
</li> |
361 |
</li> |
353 |
|
362 |
|
354 |
- |
|
|