NIHVIVO-3213: Added alert when user doesn't select a proxy or a profile

This commit is contained in:
manolobevia 2011-11-08 20:42:37 +00:00
parent fad4fd6c11
commit 717fb46864
3 changed files with 40 additions and 41 deletions

View file

@ -1,7 +1,22 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
$(document).ready(function(){
//Remove initial value of input text 'Select an existing last name'
$('input[name="proxySelectorAC"]').click(function(){
$(this).val('');
})
});
});
//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;
}
});
});