2011-10-31 22:05:57 +00:00
|
|
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
2013-06-11 12:25:01 -04:00
|
|
|
// Get the i18n variables from the template
|
|
|
|
$.extend(this, i18nStrings);
|
2011-11-08 20:42:37 +00:00
|
|
|
//Remove initial value of input text 'Select an existing last name'
|
2011-10-31 22:05:57 +00:00
|
|
|
$('input[name="proxySelectorAC"]').click(function(){
|
|
|
|
$(this).val('');
|
2011-12-09 18:51:22 +00:00
|
|
|
$("span[name='proxySelectorSearchStatus']").text('')
|
2011-11-08 20:42:37 +00:00
|
|
|
});
|
|
|
|
|
2011-11-11 15:15:05 +00:00
|
|
|
//Alert when user doesn't select an editor and a profile after submitting from for relating proxy-profiles
|
2011-11-08 20:42:37 +00:00
|
|
|
$('input[name="createRelationship"]').click(function(){
|
|
|
|
var $proxyUri = $('#add-relation input[name="proxyUri"]').val();
|
|
|
|
var $profileUri = $('#add-relation input[name="profileUri"]').val();
|
|
|
|
|
|
|
|
if ($proxyUri == undefined || $profileUri == undefined){
|
|
|
|
$('#error-alert').removeClass('hidden');
|
2011-11-09 20:52:49 +00:00
|
|
|
|
|
|
|
var $errorAlert = $('#error-alert p').html();
|
|
|
|
|
|
|
|
if ($errorAlert !=""){
|
|
|
|
return false;
|
|
|
|
}else{
|
2013-06-11 12:25:01 -04:00
|
|
|
$('#error-alert p').append(i18nStrings.selectEditorAndProfile);
|
2011-11-09 20:52:49 +00:00
|
|
|
return false;
|
|
|
|
}
|
2011-11-08 20:42:37 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|