3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class gets the name of the file to upload.
21 class CRM_Activity_Import_Form_DataSource
extends CRM_Import_Form_DataSource
{
23 const PATH
= 'civicrm/import/activity';
25 const IMPORT_ENTITY
= 'Activity';
28 * Build the form object.
30 public function buildQuickForm() {
31 parent
::buildQuickForm();
33 // FIXME: This 'onDuplicate' form element is never used -- copy/paste error?
34 $duplicateOptions = [];
35 $duplicateOptions[] = $this->createElement('radio',
36 NULL, NULL, ts('Skip'), CRM_Import_Parser
::DUPLICATE_SKIP
38 $duplicateOptions[] = $this->createElement('radio',
39 NULL, NULL, ts('Update'), CRM_Import_Parser
::DUPLICATE_UPDATE
41 $duplicateOptions[] = $this->createElement('radio',
42 NULL, NULL, ts('Fill'), CRM_Import_Parser
::DUPLICATE_FILL
45 $this->addGroup($duplicateOptions, 'onDuplicate',
46 ts('On duplicate entries')
51 * Process the uploaded file.
53 public function postProcess() {
54 $this->storeFormValues([
60 $this->submitFileForMapping('CRM_Activity_Import_Parser_Activity');