Commit 1122327e authored by Kristin Riebe's avatar Kristin Riebe
Browse files

On request of local organizers, switch off email validation; add export of...

On request of local organizers, switch off email validation; add export of contributions to csv and json
parent 484d83e3
......@@ -75,6 +75,7 @@ class Meetings_Form_Element_Email extends Daiquiri_Form_Element_Text {
$this->addValidator('emailAddress');
// add validator for beeing unique in the database
/* switch off this validator on request of LOC; 19.04.2017
$validator = new Zend_Validate();
$message = 'The email is already in the database, please check if you are already registered.';
......@@ -92,5 +93,6 @@ class Meetings_Form_Element_Email extends Daiquiri_Form_Element_Text {
// chainvalidators and add to field
$validator->addValidator($participantsTableValidator)->addValidator($registrationTableValidator);
$this->addValidator($validator);
*/
}
}
......@@ -30,6 +30,24 @@
<?php endforeach; ?>
<?php endforeach; ?>
\end{document}
<?php elseif ($this->mode == 'csv'): ?>
<?php foreach ($this->rows as $contributionType => $rows): ?>
<?php echo ucfirst($contributionType) . "\n"; ?>
<?php foreach ($rows as $row): ?>
<?php echo '"' . $row['participant_lastname'] . '","' . $row['participant_firstname'] . '","' . $row['title'] . '","' . str_replace(PHP_EOL, "<br>", $this->escape($row['abstract'])) . '"' . "\n"; ?>
<?php endforeach; ?>
<?php echo "\n"; ?>
<?php endforeach; ?>
<?php elseif ($this->mode == 'json'): ?>
<?php echo '{'; ?>
<?php foreach ($this->rows as $contributionType => $rows): ?>
<?php echo '"' . ucfirst($contributionType) . '": {' . "\n"; ?>
<?php foreach ($rows as $row): ?>
<?php echo '"' . $row['participant_firstname'] . ' ' . $row['participant_lastname'] . '": {"title": "' . $row['title'] . '", "abstract": "' . str_replace(PHP_EOL, "<br>", $this->escape($row['abstract'])) . '"' . '},' . "\n"; ?>
<?php endforeach; ?>
<?php echo "},\n"; ?>
<?php endforeach; ?>
<?php echo "}\n"; ?>
<?php else: ?>
<?php foreach ($this->rows as $contributionType => $rows): ?>
<?php echo ucfirst($contributionType) . "\n"; ?>
......
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