Commit 3eedafc9 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5850-create-an-invitations-plugin' into '1.4-dev'

Resolve "Create an invitations plugin"

See merge request fusiondirectory/fd-plugins!364
parents 219d3975 46b86226
......@@ -73,7 +73,7 @@ class invitationPage extends standAlonePage
case 'filled':
throw new FusionDirectoryException(_('This invitation has already been filled and is waiting approval'));
case 'accepted':
throw new FusionDirectoryException(_('This invitation has already been filled and approved. If you lost your password, please use the password recovery system.'));
throw new FusionDirectoryException(_('This invitation has already been filled and approved'));
case 'rejected':
throw new FusionDirectoryException(_('This invitation has already been filled and rejected. Please contact your referent to get a new invitation if needed.'));
default:
......
......@@ -23,13 +23,6 @@ class privateFormPage extends publicFormPage
{
protected $prefill = TRUE;
function __construct($interactive = TRUE)
{
parent::__construct($interactive);
/* TODO POC providedMultiValueAttributes */
$this->providedMultiValueAttributes = array('eduPersonAffiliation');
}
protected function getPrefilledValues($values = array())
{
if ($this->prefill) {
......
......@@ -198,8 +198,9 @@ class publicFormPage extends standAlonePage
$values = $this->getPrefilledValues();
$this->alteredAttributes = array(array(),array(),array());
$this->providedAttributes = array();
$this->alteredAttributes = array(array(),array(),array());
$this->providedAttributes = array();
$this->providedMultiValueAttributes = array();
foreach ($this->form['fdPublicFormAlteredAttributes'] as $alteredAttribute) {
list($attribute, $mandatory, $readonly, $imported, $hidden) = explode('|', $alteredAttribute, 5);
$tab = $this->template->getAttributeTab($attribute);
......@@ -218,6 +219,9 @@ class publicFormPage extends standAlonePage
}
if ($imported) {
$this->providedAttributes[] = array($tab, $attribute);
if ($this->template->getAttribute($tab, $attribute) instanceof SetAttribute) {
$this->providedMultiValueAttributes[] = $attribute;
}
}
}
if ($hidden) {
......
Markdown is supported
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