Contacts: Add check for empty FN field.
This commit is contained in:
parent
69f3b5e2d2
commit
a34631f84e
1 changed files with 8 additions and 0 deletions
|
@ -1403,6 +1403,14 @@ $(document).ready(function(){
|
|||
Contacts.UI.Card.saveProperty(this);
|
||||
});
|
||||
|
||||
$('#fn').blur(function(){
|
||||
if($('#fn').val() == '') {
|
||||
OC.dialogs.alert(t('contacts','The name field cannot be empty. Please enter a name for this contact.'), t('contacts','Name is empty'), function() { $('#fn').focus(); });
|
||||
$('#fn').focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Name has changed. Update it and reorder.
|
||||
$('#fn').live('change',function(){
|
||||
var name = $('#fn').val();
|
||||
|
|
Loading…
Reference in a new issue