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(){
|
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-11-08 20:42:37 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
//Alert when user doesn't select an editor and a profile
|
|
|
|
$('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');
|
|
|
|
$('#error-alert p').append("<strong>You must select a minimum of 1 editor and profile.</strong>");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|