summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/contacts/js/contacts.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 5f2bd6e9df9..e5b34e241cb 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -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();