Skip to content

Commit

Permalink
Merge branch 'pu/cf/rt/243811' into 'main'
Browse files Browse the repository at this point in the history
tweak(Addressbook/List): email cannot empyt

See merge request tine20/tine20!6216
  • Loading branch information
ccheng-dev committed Nov 13, 2024
2 parents c933bfd + cf353c4 commit 7fb489d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tine20/Addressbook/js/ListEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Tine.Addressbook.ListEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
fieldLabel: this.app.i18n._('E-Mail'),
name: 'email',
maxLength: 255,
allowBlank: true,
allowBlank: false,
checkState: function (editDialog, field) {
if (editDialog?.mailingListPanel) {
const checked = editDialog.mailingListPanel.isMailinglistCheckbox.checked;
Expand All @@ -103,6 +103,9 @@ Tine.Addressbook.ListEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
}
},
validator: function (value) {
if(!value) {
return false;
}
return Tine.Tinebase.common.checkEmailDomain(value);
},
disabled: ! Tine.Tinebase.common.hasRight('manage_list_email_options', 'Addressbook'),
Expand Down
1 change: 1 addition & 0 deletions tine20/Addressbook/js/MailinglistPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Tine.Addressbook.MailinglistPanel = Ext.extend(Ext.Panel, {
name: 'email',
maxLength: 128,
disabled: ! Tine.Tinebase.common.hasRight('manage_list_email_options', 'Addressbook'),
allowBlank: false,
checkState: function (editDialog, record) {
this.validate();
},
Expand Down

0 comments on commit 7fb489d

Please sign in to comment.