Verified Commit 389377f7 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(MailTemplate) - Removes mail list

Mail list will be implemented within Task object
Showing with 4 additions and 40 deletions
+4 -40
......@@ -251,12 +251,6 @@ attributetype ( 1.3.6.1.4.1.38414.88.1.26 NAME 'fdMTInvitationReplyTo'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.38414.88.1.27 NAME 'fdMTInvitationEmailList'
DESC 'FusionDirectory - Lists of emails registered - received'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
# Classes
objectclass ( 1.3.6.1.4.1.10098.1.2.1.19.4 NAME 'gosaDepartment' SUP top AUXILIARY
......@@ -329,4 +323,4 @@ objectclass ( 1.3.6.1.4.1.38414.88.2.5 NAME 'fdMailTemplateInvitations'
DESC 'FusionDirectory mail template Invitations'
SUP top AUXILIARY
MUST ( cn $ fdMTInvitationEmailSubject $ fdMTInvitationEmailContent)
MAY ( fdMTInvitationReplyTo $ fdMTInvitationEmailList ) )
MAY ( fdMTInvitationReplyTo ) )
......@@ -52,24 +52,14 @@ class mailTemplateInvitations extends simplePlugin
new TextAreaAttribute(
_('Email content'), _('Content of the email sent for this invitation'),
'fdMTInvitationEmailContent', TRUE,
'A default Email here - was previously fetched by default configuration'
'A default Email here - was previously fetched by default configuration - %token%'
),
]
],
'emails' => [
'name' => _('Emails'),
'attrs' => [
new StringAttribute(
new StringAttribute(
_('Reply to'), _('Email address set as "Reply to" in the sent emails'),
'fdMTInvitationReplyTo', FALSE
),
new FileTextAreaAttribute(
_('Emails'), _('List of email adresses of people to invite - one per line'),
'fdMTInvitationEmailList', FALSE,
'.txt', TRUE, FALSE
),
]
]
],
];
}
......@@ -79,24 +69,4 @@ class mailTemplateInvitations extends simplePlugin
parent::__construct($dn, $object, $parent, $mainTab);
}
/*
* Used to verify if the list of emails imported by the mails_file are correct emails format.
*
*/
function check (): array
{
$errors = parent::check();
$emails = explode("\n", $this->fdMTInvitationEmailList);
foreach ($emails as $email) {
if (!tests::is_email($email)) {
$errors[] = new SimplePluginCheckError(
$this->attributesAccess['fdMTInvitationEmailList'],
htmlescape(sprintf(_('"%s" is not a valid email address'), $email))
);
}
}
return $errors;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment