Lines 237-247
Link Here
|
237 |
</li> |
237 |
</li> |
238 |
</ol> |
238 |
</ol> |
239 |
</fieldset> |
239 |
</fieldset> |
|
|
240 |
|
241 |
<fieldset class="rows" id="save_profile"> |
242 |
<legend>Save profile</legend> |
243 |
<ol> |
244 |
<li> |
245 |
<label for="profile_name">Profile name:</label> |
246 |
<input type="text" id="profile_name" name="profile_name" /> |
247 |
<button class="btn btn-default btn-xs" id="add_profile" disabled>Save profile</button> |
248 |
<button class="btn btn-link" id="del_profile" disabled><i class="fa fa-trash"></i> <span>Remove profile</span></button> |
249 |
</li> |
250 |
</ol> |
251 |
</fieldset> |
252 |
|
240 |
<fieldset class="action"> |
253 |
<fieldset class="action"> |
241 |
<input type="button" id="mainformsubmit" value="Stage for import" /> |
254 |
<input type="button" id="mainformsubmit" value="Stage for import" /> |
242 |
<button id="add_profile" disabled>Save profile</button> |
|
|
243 |
<input type="text" id="profile_name" name="profile_name" placeholder="Profile name"/> |
244 |
<button id="del_profile" disabled>Remove profile</button> |
245 |
</fieldset> |
255 |
</fieldset> |
246 |
|
256 |
|
247 |
<div id="jobpanel"><div id="jobstatus" class="progress_panel">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div> |
257 |
<div id="jobpanel"><div id="jobstatus" class="progress_panel">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div> |
Lines 306-315
Link Here
|
306 |
$("#parse_itemsyes").prop("checked", true).change(); |
316 |
$("#parse_itemsyes").prop("checked", true).change(); |
307 |
$("#item_action").val('always_add').change(); |
317 |
$("#item_action").val('always_add').change(); |
308 |
$("#profile_name").val('').keyup(); |
318 |
$("#profile_name").val('').keyup(); |
|
|
319 |
$("#del_profile span").text( _("Remove profile") ); |
309 |
} else { |
320 |
} else { |
310 |
const profile = $('option:selected', this).data('profile'); |
321 |
const profile = $('option:selected', this).data('profile'); |
311 |
$("#profile_id").val(profile.profile_id); |
322 |
$("#profile_id").val(profile.profile_id); |
312 |
$("#mod_profile, #del_profile").prop("disabled", null); |
323 |
$("#mod_profile, #del_profile").prop("disabled", null); |
|
|
324 |
$("#del_profile span").text( _("Remove profile") + ": " + profile.name ); |
313 |
$("#comments").val(profile.comments); |
325 |
$("#comments").val(profile.comments); |
314 |
$("#record_type").val(profile.record_type).change(); |
326 |
$("#record_type").val(profile.record_type).change(); |
315 |
$("#encoding").val(profile.encoding).change(); |
327 |
$("#encoding").val(profile.encoding).change(); |
Lines 324-330
Link Here
|
324 |
} |
336 |
} |
325 |
}); |
337 |
}); |
326 |
|
338 |
|
327 |
$("#profile_name").keyup(function(){ |
339 |
$("#profile_name").on("change keyup", function(){ |
328 |
$("#add_profile").prop("disabled", this.value.trim()==''); |
340 |
$("#add_profile").prop("disabled", this.value.trim()==''); |
329 |
}); |
341 |
}); |
330 |
|
342 |
|
331 |
- |
|
|