[FEATURE] initial push 89/17689/2 master
authorBastian Bringenberg <mail@bastian-bringenberg.de>
Thu, 24 Jan 2013 14:07:55 +0000 (15:07 +0100)
committerBastian Bringenberg <mail@bastian-bringenberg.de>
Thu, 24 Jan 2013 14:11:23 +0000 (15:11 +0100)
Change-Id: I00af5b0c848aeea9bddfb865e67debd38b7c7aab
Reviewed-on: https://review.typo3.org/17689
Reviewed-by: Bastian Bringenberg
Tested-by: Bastian Bringenberg
32 files changed:
Classes/Controller/PetitionsEntryController.php [new file with mode: 0644]
Classes/Domain/Model/Petition.php [new file with mode: 0755]
Classes/Domain/Model/PetitionsEntry.php [new file with mode: 0755]
Classes/Domain/Repository/PetitionRepository.php [new file with mode: 0755]
Classes/Domain/Repository/PetitionsEntryRepository.php [new file with mode: 0755]
Configuration/FlexForms/flexform_default.xml [new file with mode: 0755]
Configuration/FlexForms/flexform_list.xml [new file with mode: 0755]
Configuration/TCA/Petition.php [new file with mode: 0755]
Configuration/TCA/PetitionsEntry.php [new file with mode: 0755]
Configuration/TypoScript/constants.txt [new file with mode: 0755]
Configuration/TypoScript/setup.txt [new file with mode: 0755]
Resources/Private/.htaccess [new file with mode: 0755]
Resources/Private/Language/locallang.xml [new file with mode: 0644]
Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petition.xml [new file with mode: 0755]
Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petitionsentry.xml [new file with mode: 0644]
Resources/Private/Language/locallang_db.xml [new file with mode: 0755]
Resources/Private/Layouts/Default.html [new file with mode: 0755]
Resources/Private/Templates/PetitionsEntry/Confirm.html [new file with mode: 0755]
Resources/Private/Templates/PetitionsEntry/Count.html [new file with mode: 0755]
Resources/Private/Templates/PetitionsEntry/Create.html [new file with mode: 0755]
Resources/Private/Templates/PetitionsEntry/List.html [new file with mode: 0755]
Resources/Private/Templates/PetitionsEntry/MailText.txt [new file with mode: 0644]
Resources/Private/Templates/PetitionsEntry/New.html [new file with mode: 0755]
Resources/Public/Icons/relation.gif [new file with mode: 0755]
Resources/Public/Icons/tx_petition_domain_model_petition.gif [new file with mode: 0755]
Resources/Public/Icons/tx_petition_domain_model_petitionsentry.gif [new file with mode: 0755]
doc/manual.sxw [new file with mode: 0644]
ext_emconf.php [new file with mode: 0755]
ext_icon.gif [new file with mode: 0755]
ext_localconf.php [new file with mode: 0755]
ext_tables.php [new file with mode: 0755]
ext_tables.sql [new file with mode: 0755]

diff --git a/Classes/Controller/PetitionsEntryController.php b/Classes/Controller/PetitionsEntryController.php
new file mode 100644 (file)
index 0000000..e6f9d52
--- /dev/null
@@ -0,0 +1,213 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Guy Sinden <sinden@abis-freiburg.de>
+ *  Bastian Bringenberg <typo3@bastian-bringenberg.de>, Bastian Bringenberg
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ *
+ *
+ * @package petition
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
+ *
+ */
+class Tx_Petition_Controller_PetitionsEntryController extends Tx_Extbase_MVC_Controller_ActionController {
+
+        /**
+         * formIDSafe
+         *
+         * @var String
+         */
+         protected $formIDSafe = '';
+
+       /**
+        * petitionsEntryRepository
+        *
+        * @var Tx_Petition_Domain_Repository_PetitionsEntryRepository
+        */
+       protected $petitionsEntryRepository;
+
+    /**
+        * petitionRepository
+        *
+        * @var Tx_Petition_Domain_Repository_PetitionRepository
+        */
+       protected $petitionRepository;
+
+   /**
+    * errorString_noPetition
+    *
+    * @var string
+    */
+    protected $errorString_noPetition = 'You have not set up a right Petition for this.';
+
+    /**
+        * injectPetitionsEntryRepository
+        *
+        * @param Tx_Petition_Domain_Repository_PetitionsEntryRepository $petitionsEntryRepository
+        * @return void
+        */
+       public function injectPetitionsEntryRepository(Tx_Petition_Domain_Repository_PetitionsEntryRepository $petitionsEntryRepository) {
+               $this->petitionsEntryRepository = $petitionsEntryRepository;
+       }
+
+    /**
+        * injectPetitionRepository
+        *
+        * @param Tx_Petition_Domain_Repository_PetitionRepository $petitionRepository
+        * @return void
+        */
+       public function injectPetitionRepository(Tx_Petition_Domain_Repository_PetitionRepository $petitionRepository) {
+               $this->petitionRepository = $petitionRepository;
+       }
+
+        /**
+         * Overwritten to createIDs for the labels
+         *
+         * @param Tx_Extbase_View_ViewInterface $view The view to be initialized
+         * @return void
+         */
+        protected function initializeView(Tx_Extbase_MVC_View_ViewInterface $view) {
+           $result = "";
+           $charPool = '0123456789abcdefghijklmnopqrstuvwxyz';
+           for($p = 0; $p<6; $p++) $result .= $charPool[mt_rand(0,strlen($charPool)-1)];
+           $this->formIDSafe = sha1($result);
+           $this->view->assign('formIDSafe', $this->formIDSafe);
+        }
+
+       /**
+        * action list
+        *
+        * @return void
+        */
+       public function listAction() {
+            $petition = $this->petitionRepository->findByUid($this->settings['flexform']['petition']);
+            if($petition == NULL) return $this->errorString_noPetition;
+            $entries = $this->petitionsEntryRepository->findByPetition($petition);
+            $this->view->assign('entries', $entries);
+       }
+
+       /**
+        * action new
+        *
+        * @param Tx_Petition_Domain_Model_PetitionsEntry $newPetitionsEntry
+        * @dontvalidate $newPetitionsEntry
+        * @return void
+        */
+       public function newAction(Tx_Petition_Domain_Model_PetitionsEntry $newPetitionsEntry = NULL) {
+                $petition = $this->petitionRepository->findByUid($this->settings['flexform']['petition']);
+                if($petition == NULL) return $this->errorString_noPetition;
+               $this->view->assign('newPetitionsEntry', $newPetitionsEntry);
+       }
+
+       /**
+        * action create
+        *
+        * @param Tx_Petition_Domain_Model_PetitionsEntry $newPetitionsEntry
+        * @return void
+        */
+       public function createAction(Tx_Petition_Domain_Model_PetitionsEntry $newPetitionsEntry) {
+            $petition = $this->petitionRepository->findByUid($this->settings['flexform']['petition']);
+            $newPetitionsEntry->setPetition($petition);
+            $newPetitionsEntry->setHidden(1);
+            $this->petitionsEntryRepository->add($newPetitionsEntry);
+            /* @var $persistenceManager Tx_Extbase_Persistence_Manager */
+            $persistenceManager = t3lib_div::makeInstance('Tx_Extbase_Persistence_Manager');
+            $persistenceManager->persistAll();
+            $this->view->assign('entry', $newPetitionsEntry);
+            $this->sendEmail($newPetitionsEntry);
+       }
+
+       /**
+        * action count
+        *
+        * @return void
+        */
+       public function countAction() {
+            $petition = $this->petitionRepository->findByUid($this->settings['flexform']['petition']);
+            if($petition == NULL) return $this->errorString_noPetition;
+            $entries = $this->petitionsEntryRepository->findByPetition($petition);
+            $this->view->assign('entries', $entries);
+       }
+
+    /**
+        * action configm
+     *
+        * @param String $verification
+     * @param Tx_Petition_Domain_Model_PetitionsEntry $entry
+        * @dontvalidate $entry
+        * @return void
+        */
+       public function confirmAction($verification, Tx_Petition_Domain_Model_PetitionsEntry $entry = NULL) {
+                       $entry = $this->petitionsEntryRepository->findHiddenByUid(intval($this->request->getArgument('entry')));
+                       $entry = $entry->getFirst();
+            if($entry == NULL ) $this->redirect('');
+                       $status = 0;
+            if($verification == $entry->getVerification()){
+                $status = 1;
+                $entry->setHidden(0);
+            }
+            $this->view->assign('status', $status);
+       }
+
+        /**
+        * function send Email
+        *
+        * @param Tx_Petition_Domain_Model_PetitionsEntry $entry
+        */
+        protected function sendEmail(Tx_Petition_Domain_Model_PetitionsEntry $entry){
+            $mailbody = $this->getEmailText($entry);
+            $mail = t3lib_div::makeInstance('t3lib_mail_Message');
+            $mail->setFrom(array($this->settings['flexform']['fromMail'] => $this->settings['flexform']['fromName']));
+            $mail->addTo($entry->getEmailadress());
+            $mail->setSubject('[Petition] '.$this->settings['flexform']['fromHeadline'].' '.$entry->getPetition()->getTitle());
+            $mail->setBody($mailbody);
+            $mail->send();
+        }
+
+
+        /**
+         * function getEmailText
+         *
+         * @param Tx_Petition_Domain_Model_PetitionsEntry $entry
+         * @param String $templateName
+         * @return String
+         */
+        protected function getEmailText(Tx_Petition_Domain_Model_PetitionsEntry $entry, $templateName = 'MailText'){
+            $emailView = $this->objectManager->create('Tx_Fluid_View_StandaloneView');
+            $emailView->setFormat('txt');
+            $templateRootPath = t3lib_extMgm::extPath('petition').'/Resources/Private/Templates/';
+            $templatePathAndFilename = $templateRootPath . $this->request->getControllerName().'/' . $templateName . '.txt';
+            $emailView->setTemplatePathAndFilename($templatePathAndFilename);
+            $this->uriBuilder->setCreateAbsoluteUri(true);
+            $this->uriBuilder->setArguments(array('tx_petition_petition' => array('action' => 'confirm','verification' => $entry->getVerification(), 'entry' => $entry->getUid())));
+            $link = $this->uriBuilder->buildFrontendUri();
+            $emailView->assign('link', $link);
+            $emailView->assign('settings', $this->settings);
+            $emailView->assign('entry', $entry);
+            return $emailView->render();
+        }
+
+}
+?>
diff --git a/Classes/Domain/Model/Petition.php b/Classes/Domain/Model/Petition.php
new file mode 100755 (executable)
index 0000000..718cc45
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Guy Sinden <sinden@abis-freiburg.de>
+ *  Bastian Bringenberg <typo3@bastian-bringenberg.de>, Bastian Bringenberg
+ *  
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ *
+ *
+ * @package petiton
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
+ *
+ */
+class Tx_Petition_Domain_Model_Petition extends Tx_Extbase_DomainObject_AbstractEntity {
+
+       /**
+        * title
+        *
+        * @var string
+        * @validate NotEmpty
+        */
+       protected $title;
+
+       /**
+        * Returns the title
+        *
+        * @return string $title
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Sets the title
+        *
+        * @param string $title
+        * @return void
+        */
+       public function setTitle($title) {
+               $this->title = $title;
+       }
+
+}
+?>
\ No newline at end of file
diff --git a/Classes/Domain/Model/PetitionsEntry.php b/Classes/Domain/Model/PetitionsEntry.php
new file mode 100755 (executable)
index 0000000..b19625b
--- /dev/null
@@ -0,0 +1,328 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Guy Sinden <sinden@abis-freiburg.de>
+ *  Bastian Bringenberg <typo3@bastian-bringenberg.de>, Bastian Bringenberg
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ *
+ *
+ * @package petition
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
+ *
+ */
+class Tx_Petition_Domain_Model_PetitionsEntry extends Tx_Extbase_DomainObject_AbstractEntity {
+
+       /**
+        * firstname
+        *
+        * @var string
+        */
+       protected $firstname;
+
+       /**
+        * lastname
+        *
+        * @var string
+        * @validate NotEmpty
+        */
+       protected $lastname;
+
+       /**
+        * emailadress
+        *
+        * @var string
+        * @validate NotEmpty
+        */
+       protected $emailadress;
+
+       /**
+        * country
+        *
+        * @var string
+        */
+       protected $country;
+
+       /**
+        * town
+        *
+        * @var string
+        */
+       protected $town;
+
+       /**
+        * zip
+        *
+        * @var string
+        */
+       protected $zip;
+
+       /**
+        * street
+        *
+        * @var string
+        */
+       protected $street;
+
+       /**
+        * petition
+        *
+        * @var Tx_Petition_Domain_Model_Petition
+        * @lazy
+        */
+       protected $petition;
+
+        /**
+         * tstamp
+         *
+         * @var DateTime
+         */
+        protected $tstamp;
+
+       /**
+        * hide
+        *
+        * @var int
+        */
+        protected $hidden;
+
+       /**
+        * message
+        *
+        * @var string
+        */
+       protected $message;
+
+       /**
+        * Returns the firstname
+        *
+        * @return string $firstname
+        */
+       public function getFirstname() {
+               return $this->firstname;
+       }
+
+       /**
+        * Sets the firstname
+        *
+        * @param string $firstname
+        * @return void
+        */
+       public function setFirstname($firstname) {
+               $this->firstname = $firstname;
+       }
+
+       /**
+        * Returns the lastname
+        *
+        * @return string $lastname
+        */
+       public function getLastname() {
+               return $this->lastname;
+       }
+
+       /**
+        * Sets the lastname
+        *
+        * @param string $lastname
+        * @return void
+        */
+       public function setLastname($lastname) {
+               $this->lastname = $lastname;
+       }
+
+       /**
+        * Returns the emailadress
+        *
+        * @return string $emailadress
+        */
+       public function getEmailadress() {
+               return $this->emailadress;
+       }
+
+       /**
+        * Sets the emailadress
+        *
+        * @param string $emailadress
+        * @return void
+        */
+       public function setEmailadress($emailadress) {
+               $this->emailadress = $emailadress;
+       }
+
+       /**
+        * Returns the country
+        *
+        * @return string $country
+        */
+       public function getCountry() {
+               return $this->country;
+       }
+
+       /**
+        * Sets the country
+        *
+        * @param string $country
+        * @return void
+        */
+       public function setCountry($country) {
+               $this->country = $country;
+       }
+
+       /**
+        * Returns the town
+        *
+        * @return string $town
+        */
+       public function getTown() {
+               return $this->town;
+       }
+
+       /**
+        * Sets the town
+        *
+        * @param string $town
+        * @return void
+        */
+       public function setTown($town) {
+               $this->town = $town;
+       }
+
+       /**
+        * Returns the zip
+        *
+        * @return string $zip
+        */
+       public function getZip() {
+               return $this->zip;
+       }
+
+       /**
+        * Sets the zip
+        *
+        * @param string $zip
+        * @return void
+        */
+       public function setZip($zip) {
+               $this->zip = $zip;
+       }
+
+       /**
+        * Returns the street
+        *
+        * @return string $street
+        */
+       public function getStreet() {
+               return $this->street;
+       }
+
+       /**
+        * Sets the street
+        *
+        * @param string $street
+        * @return void
+        */
+       public function setStreet($street) {
+               $this->street = $street;
+       }
+
+       /**
+        * Returns the petition
+        *
+        * @return Tx_Petition_Domain_Model_Petition $petition
+        */
+       public function getPetition() {
+               return $this->petition;
+       }
+
+       /**
+        * Sets the petition
+        *
+        * @param Tx_Petition_Domain_Model_Petition $petition
+        * @return void
+        */
+       public function setPetition(Tx_Petition_Domain_Model_Petition $petition) {
+               $this->petition = $petition;
+       }
+
+        public function getTstamp() {
+            return $this->tstamp;
+        }
+
+        public function setTstamp($tstamp) {
+            $this->tstamp = $tstamp;
+        }
+
+        /**
+        * Get the Hide
+        *
+        * return int $hidden
+        */
+        public function getHidden() {
+            return $this->hidden;
+        }
+
+        /**
+        * Set the Hide
+        *
+        * @param int $hidden
+        * @return void
+        */
+        public function setHidden($hidden) {
+            $this->hidden = $hidden;
+        }
+
+        /**
+        * Get the Message
+        *
+        * return string $message
+        */
+        public function getMessage() {
+            return $this->message;
+        }
+
+        /**
+        * Set the Message
+        *
+        * @param string $message
+        * @return void
+        */
+        public function setMessage($message) {
+            $this->message = $message;
+        }
+
+
+        /**
+         * Gets the Verification
+         *
+         * @return String
+         */
+        public function getVerification(){
+            return sha1('Petition' . $this->getUid(). $this->getFirstname());
+        }
+
+
+
+}
+?>
diff --git a/Classes/Domain/Repository/PetitionRepository.php b/Classes/Domain/Repository/PetitionRepository.php
new file mode 100755 (executable)
index 0000000..1837e35
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Guy Sinden <sinden@abis-freiburg.de>
+ *  Bastian Bringenberg <typo3@bastian-bringenberg.de>, Bastian Bringenberg
+ *  
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ *
+ *
+ * @package petiton
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
+ *
+ */
+class Tx_Petition_Domain_Repository_PetitionRepository extends Tx_Extbase_Persistence_Repository {
+
+}
+?>
\ No newline at end of file
diff --git a/Classes/Domain/Repository/PetitionsEntryRepository.php b/Classes/Domain/Repository/PetitionsEntryRepository.php
new file mode 100755 (executable)
index 0000000..4675992
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Guy Sinden <sinden@abis-freiburg.de>
+ *  Bastian Bringenberg <typo3@bastian-bringenberg.de>, Bastian Bringenberg
+ *
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ *
+ *
+ * @package petiton
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
+ *
+ */
+class Tx_Petition_Domain_Repository_PetitionsEntryRepository extends Tx_Extbase_Persistence_Repository {
+    protected $defaultOrderings = array ('uid' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING);
+
+    public function findByPetition($petition){
+        $query = $this->createQuery();
+        $query->matching($query->logicalAnd($query->equals('hidden', '0'), $query->equals('petition', $petition)));
+        $query->setOrderings($this->defaultOrderings);
+        return $query->execute();
+    }
+
+       /**
+        * Find hidden petitionsEntry by UID
+        *
+        * @var int $uid The entries UID
+       **/
+    public function findHiddenByUid($uid){
+        $query = $this->createQuery();
+               $query->getQuerySettings()->setRespectEnableFields(false);
+        $query->matching($query->logicalAnd($query->equals('hidden', '1'), $query->equals('uid', $uid)));
+        $query->setOrderings($this->defaultOrderings);
+        return $query->execute();
+    }
+}
+?>
diff --git a/Configuration/FlexForms/flexform_default.xml b/Configuration/FlexForms/flexform_default.xml
new file mode 100755 (executable)
index 0000000..a516657
--- /dev/null
@@ -0,0 +1,66 @@
+
+<T3DataStructure>
+    <meta>
+        <langDisable>1</langDisable>
+    </meta>
+    <sheets>
+        <sDEF>
+            <ROOT>
+                <TCEforms>
+                    <sheetTitle>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_title</sheetTitle>
+                </TCEforms>
+                <type>array</type>
+                <el>
+                    <settings.flexform.petition>
+                        <TCEforms>
+                            <exclude>0</exclude>
+                            <label>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_petition</label>
+                            <config>
+                                <type>group</type>
+                                <internal_type>db</internal_type>
+                                <allowed>tx_petition_domain_model_petition</allowed>
+                                <size>1</size>
+                                <maxitems>1</maxitems>
+                                <minitems>0</minitems>
+                                <show_thumbs>1</show_thumbs>
+                            </config>           
+                        </TCEforms>
+                    </settings.flexform.petition>
+                    <settings.flexform.fromMail>
+                        <TCEforms>
+                            <label>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_frommail</label>
+                            <config>
+                                <type>input</type>
+                                <size>10</size>
+                                <max>255</max>
+                                <eval>trim</eval>
+                            </config>
+                        </TCEforms>
+                    </settings.flexform.fromMail>
+                    <settings.flexform.fromName>
+                        <TCEforms>
+                            <label>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_fromname</label>
+                            <config>
+                                <type>input</type>
+                                <size>10</size>
+                                <max>255</max>
+                                <eval>trim</eval>
+                            </config>
+                        </TCEforms>
+                    </settings.flexform.fromName>
+                    <settings.flexform.fromHeadline>
+                        <TCEforms>
+                            <label>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_fromheadline</label>
+                            <config>
+                                <type>input</type>
+                                <size>10</size>
+                                <max>255</max>
+                                <eval>trim</eval>
+                            </config>
+                        </TCEforms>
+                    </settings.flexform.fromHeadline>
+                </el>
+            </ROOT>
+        </sDEF>
+    </sheets>
+</T3DataStructure>
\ No newline at end of file
diff --git a/Configuration/FlexForms/flexform_list.xml b/Configuration/FlexForms/flexform_list.xml
new file mode 100755 (executable)
index 0000000..ca01774
--- /dev/null
@@ -0,0 +1,50 @@
+<T3DataStructure>
+    <meta>
+        <langDisable>1</langDisable>
+    </meta>
+    <sheets>
+        <sDEF>
+            <ROOT>
+                <TCEforms>
+                    <sheetTitle>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_title</sheetTitle>
+                </TCEforms>
+                <type>array</type>
+                <el>
+                    <switchableControllerActions>
+                        <TCEforms>
+                            <label>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_controller</label>
+                            <config>
+                                <type>select</type>
+                                <items type="array">
+                                    <numIndex index="0" type="array">
+                                        <numIndex index="0">LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_listAction</numIndex>
+                                        <numIndex index="1">PetitionsEntry->list</numIndex>
+                                    </numIndex>
+                                    <numIndex index="1" type="array">
+                                        <numIndex index="0">LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_countAction</numIndex>
+                                        <numIndex index="1">PetitionsEntry->count</numIndex>
+                                    </numIndex>
+                                </items>
+                            </config>
+                        </TCEforms>
+                    </switchableControllerActions>
+                    <settings.flexform.petition>
+                        <TCEforms>
+                            <exclude>0</exclude>
+                            <label>LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_flexform_petition</label>
+                            <config>
+                                <type>group</type>
+                                <internal_type>db</internal_type>
+                                <allowed>tx_petition_domain_model_petition</allowed>
+                                <size>1</size>
+                                <maxitems>1</maxitems>
+                                <minitems>0</minitems>
+                                <show_thumbs>1</show_thumbs>
+                            </config>           
+                        </TCEforms>
+                    </settings.flexform.petition>
+                </el>
+            </ROOT>
+        </sDEF>
+    </sheets>
+</T3DataStructure>
\ No newline at end of file
diff --git a/Configuration/TCA/Petition.php b/Configuration/TCA/Petition.php
new file mode 100755 (executable)
index 0000000..d82c7ad
--- /dev/null
@@ -0,0 +1,125 @@
+<?php
+if (!defined ('TYPO3_MODE')) {
+       die ('Access denied.');
+}
+
+$TCA['tx_petition_domain_model_petition'] = array(
+       'ctrl' => $TCA['tx_petition_domain_model_petition']['ctrl'],
+       'interface' => array(
+               'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, petitionsentries',
+       ),
+       'types' => array(
+               '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title, petitionsentries, --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'),
+       ),
+       'palettes' => array(
+               '1' => array('showitem' => ''),
+       ),
+       'columns' => array(
+               'sys_language_uid' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
+                       'config' => array(
+                               'type' => 'select',
+                               'foreign_table' => 'sys_language',
+                               'foreign_table_where' => 'ORDER BY sys_language.title',
+                               'items' => array(
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
+                               ),
+                       ),
+               ),
+               'l10n_parent' => array(
+                       'displayCond' => 'FIELD:sys_language_uid:>:0',
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
+                       'config' => array(
+                               'type' => 'select',
+                               'items' => array(
+                                       array('', 0),
+                               ),
+                               'foreign_table' => 'tx_petition_domain_model_petition',
+                               'foreign_table_where' => 'AND tx_petition_domain_model_petition.pid=###CURRENT_PID### AND tx_petition_domain_model_petition.sys_language_uid IN (-1,0)',
+                       ),
+               ),
+               'l10n_diffsource' => array(
+                       'config' => array(
+                               'type' => 'passthrough',
+                       ),
+               ),
+               't3ver_label' => array(
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'max' => 255,
+                       )
+               ),
+               'hidden' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
+                       'config' => array(
+                               'type' => 'check',
+                       ),
+               ),
+               'starttime' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 13,
+                               'max' => 20,
+                               'eval' => 'datetime',
+                               'checkbox' => 0,
+                               'default' => 0,
+                               'range' => array(
+                                       'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
+                               ),
+                       ),
+               ),
+               'endtime' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 13,
+                               'max' => 20,
+                               'eval' => 'datetime',
+                               'checkbox' => 0,
+                               'default' => 0,
+                               'range' => array(
+                                       'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
+                               ),
+                       ),
+               ),
+               'title' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petition.title',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim,required'
+                       ),
+               ),
+               'petitionsentries' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petition.petitionsentries',
+                       'config' => array(
+                               'type' => 'inline',
+                               'foreign_table' => 'tx_petition_domain_model_petitionsentry',
+                               'foreign_field' => 'petition',
+                               'minitems' => 0,
+                               'appearance' => array(
+                                       'collapseAll' => 1,
+                                       'levelLinksPosition' => 'top',
+                                       'showSynchronizationLink' => 1,
+                                       'showPossibleLocalizationRecords' => 1,
+                                       'showAllLocalizationLink' => 1
+                               ),
+                       ),
+               ),
+       ),
+);
+
+?>
diff --git a/Configuration/TCA/PetitionsEntry.php b/Configuration/TCA/PetitionsEntry.php
new file mode 100755 (executable)
index 0000000..b7e83b6
--- /dev/null
@@ -0,0 +1,205 @@
+<?php
+if (!defined ('TYPO3_MODE')) {
+       die ('Access denied.');
+}
+
+$TCA['tx_petition_domain_model_petitionsentry'] = array(
+       'ctrl' => $TCA['tx_petition_domain_model_petitionsentry']['ctrl'],
+       'interface' => array(
+               'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, firstname, lastname, emailadress, country, town, zip, street, message, petition',
+       ),
+       'types' => array(
+               '1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, firstname, lastname, emailadress, country, town, zip, street, message, petition,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'),
+       ),
+       'palettes' => array(
+               '1' => array('showitem' => ''),
+       ),
+       'columns' => array(
+               'sys_language_uid' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
+                       'config' => array(
+                               'type' => 'select',
+                               'foreign_table' => 'sys_language',
+                               'foreign_table_where' => 'ORDER BY sys_language.title',
+                               'items' => array(
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
+                               ),
+                       ),
+               ),
+               'l10n_parent' => array(
+                       'displayCond' => 'FIELD:sys_language_uid:>:0',
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
+                       'config' => array(
+                               'type' => 'select',
+                               'items' => array(
+                                       array('', 0),
+                               ),
+                               'foreign_table' => 'tx_petition_domain_model_petitionsentry',
+                               'foreign_table_where' => 'AND tx_petition_domain_model_petitionsentry.pid=###CURRENT_PID### AND tx_petition_domain_model_petitionsentry.sys_language_uid IN (-1,0)',
+                       ),
+               ),
+               'l10n_diffsource' => array(
+                       'config' => array(
+                               'type' => 'passthrough',
+                       ),
+               ),
+               't3ver_label' => array(
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'max' => 255,
+                       )
+               ),
+               'hidden' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
+                       'config' => array(
+                               'type' => 'check',
+                       ),
+               ),
+               'starttime' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 13,
+                               'max' => 20,
+                               'eval' => 'datetime',
+                               'checkbox' => 0,
+                               'default' => 0,
+                               'range' => array(
+                                       'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
+                               ),
+                       ),
+               ),
+            'endtime' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 13,
+                               'max' => 20,
+                               'eval' => 'datetime',
+                               'checkbox' => 0,
+                               'default' => 0,
+                               'range' => array(
+                                       'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
+                               ),
+                       ),
+               ),
+               'tstamp' => array(
+                       'exclude' => 1,
+                       'l10n_mode' => 'mergeIfNotBlank',
+                       'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.tstamp',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 13,
+                               'max' => 20,
+                               'eval' => 'datetime',
+                               'checkbox' => 0,
+                               'default' => 0,
+                               'range' => array(
+                                       'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
+                               ),
+                       ),
+               ),
+               'firstname' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.firstname',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'lastname' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.lastname',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim,required'
+                       ),
+               ),
+               'emailadress' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.emailadress',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim,required'
+                       ),
+               ),
+               'country' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.country',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'town' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.town',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'zip' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.zip',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+               'street' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.street',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => 30,
+                               'eval' => 'trim'
+                       ),
+               ),
+                'message' => array(
+                                       'exclude' => 0,
+                                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.message',
+                                       'config' => array(
+                                               'type' => 'text',
+                                               'cols' => 40,
+                                               'rows' => 15,
+                                               'eval' => 'trim'
+                                       ),
+                               ),
+               'petition' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry.petition',
+                       'config' => array(
+                               'type' => 'select',
+                               'foreign_table' => 'tx_petition_domain_model_petition',
+                               'minitems' => 0,
+                               'maxitems' => 1,
+/*                             'appearance' => array(
+                                       'collapseAll' => 0,
+                                       'levelLinksPosition' => 'top',
+                                       'showSynchronizationLink' => 1,
+                                       'showPossibleLocalizationRecords' => 1,
+                                       'showAllLocalizationLink' => 1
+                               ),*/
+                       ),
+               ),
+       ),
+);
+
+?>
diff --git a/Configuration/TypoScript/constants.txt b/Configuration/TypoScript/constants.txt
new file mode 100755 (executable)
index 0000000..6f4e913
--- /dev/null
@@ -0,0 +1,14 @@
+plugin.tx_petition {
+       view {
+               # cat=plugin.tx_petition/file; type=string; label=Path to template root (FE)
+               templateRootPath = EXT:petition/Resources/Private/Templates/
+               # cat=plugin.tx_petition/file; type=string; label=Path to template partials (FE)
+               partialRootPath = EXT:petition/Resources/Private/Partials/
+               # cat=plugin.tx_petition/file; type=string; label=Path to template layouts (FE)
+               layoutRootPath = EXT:petition/Resources/Private/Layouts/
+       }
+       persistence {
+               # cat=plugin.tx_petition//a; type=string; label=Default storage PID
+               storagePid = 0
+       }
+}
\ No newline at end of file
diff --git a/Configuration/TypoScript/setup.txt b/Configuration/TypoScript/setup.txt
new file mode 100755 (executable)
index 0000000..90b359d
--- /dev/null
@@ -0,0 +1,25 @@
+plugin.tx_petition {
+       view {
+               templateRootPath = {$plugin.tx_petition.view.templateRootPath}
+               partialRootPath = {$plugin.tx_petition.view.partialRootPath}
+               layoutRootPath = {$plugin.tx_petition.view.layoutRootPath}
+       }
+       persistence {
+               storagePid = {$plugin.tx_petition.persistence.storagePid}
+       }
+       features {
+               # uncomment the following line to enable the new Property Mapper.
+               # rewrittenPropertyMapper = 1
+       }
+}
+
+plugin.tx_petition._CSS_DEFAULT_STYLE (
+       input.f3-form-error {
+               background-color:#FF9F9F;
+               border: 1px #FF0000 solid;
+       }
+
+       .tx-petiton .petitionsListTable .row{clear: both;}
+        .tx-petiton .petitionsListTable .cell{float: left; width: 32%;}
+        .tx-petiton label.hidden{display: none;}
+)
\ No newline at end of file
diff --git a/Resources/Private/.htaccess b/Resources/Private/.htaccess
new file mode 100755 (executable)
index 0000000..dfc0272
--- /dev/null
@@ -0,0 +1 @@
+deny  from all
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang.xml b/Resources/Private/Language/locallang.xml
new file mode 100644 (file)
index 0000000..bfb27f8
--- /dev/null
@@ -0,0 +1,154 @@
+
+<T3locallang>
+    <meta type="array">
+        <type>module</type>
+        <description>Language labels for the Petition extension in the FRONTEND</description>
+    </meta>
+    <data type="array">
+        <languageKey index="default" type="array">
+            <label index="tx_petition_domain_model_petitionsentry">PetitionsEntry</label>
+            <label index="tx_petition_domain_model_petitionsentry.firstname">firstname</label>
+            <label index="tx_petition_domain_model_petitionsentry.lastname">lastname</label>
+            <label index="tx_petition_domain_model_petitionsentry.emailadress">emailadress</label>
+            <label index="tx_petition_domain_model_petitionsentry.country">country</label>
+            <label index="tx_petition_domain_model_petitionsentry.town">town</label>
+            <label index="tx_petition_domain_model_petitionsentry.zip">zip</label>
+            <label index="tx_petition_domain_model_petitionsentry.street">street</label>
+            <label index="tx_petition_domain_model_petitionsentry.petition">petition</label>
+            <label index="tx_petition_domain_model_petition">Petition</label>
+            <label index="tx_petition_domain_model_petition.title">title</label>
+                        
+            <label index="tx_petition_list_title">Petition List</label>
+            <label index="tx_petition_list_name">Subscriber Name</label>
+            <label index="tx_petition_list_place">Subscriber Location</label>
+            <label index="tx_petition_list_date">Subscribe Date</label>
+                         
+            <label index="tx_petition_createform_confirm">Confirm</label>
+            <label index="tx_petition_createform_confirmsuccess">Thanks for subscribing.</label>
+            <label index="tx_petition_createform_confirmerror">An error occured, please try again.</label>
+                         
+            <label index="tx_petition_count_title">Counter</label>
+            <label index="tx_petition_count_text_before">Right now there are</label>
+            <label index="tx_petition_count_text_after">Petitions entries!</label>
+                         
+            <label index="tx_petition_success_title">Success</label>
+            <label index="tx_petition_success_message">You just got a message in your mailbox. Please check it and follow the steps.</label>
+               
+            <label index="tx_petition_email_start">Hello,
+
+you just subscribed a petition. Please click the link below to confirm, that you wanted to subscribe. If you do not click the button, your vote cannot be registered.
+            </label>
+            <label index="tx_petition_email_stop">Have a nice Day,
+
+Petition Service
+            </label>
+
+            <label index="tx_petition_createform_title">Create New Entry</label>
+            <label index="tx_petition_createform_firstname">Firstname</label>
+            <label index="tx_petition_createform_lastname">Lastname</label>
+            <label index="tx_petition_createform_emailadress">Email</label>
+            <label index="tx_petition_createform_country">Country</label>
+            <label index="tx_petition_createform_town">Town</label>
+            <label index="tx_petition_createform_zip">Zip-Code</label>
+            <label index="tx_petition_createform_street">Street</label>
+            <label index="tx_petition_createform_submit">Submit</label>
+        </languageKey>
+            
+        <languageKey index="fr" type="array">
+            <label index="tx_petition_domain_model_petitionsentry">Je signe cette pétition !</label>
+            <label index="tx_petition_domain_model_petitionsentry.firstname">Prénom</label>
+            <label index="tx_petition_domain_model_petitionsentry.lastname">Nom</label>
+            <label index="tx_petition_domain_model_petitionsentry.emailadress">adresse électronique</label>
+            <label index="tx_petition_domain_model_petitionsentry.country">Pays</label>
+            <label index="tx_petition_domain_model_petitionsentry.town">Ville</label>
+            <label index="tx_petition_domain_model_petitionsentry.zip">CP</label>
+            <label index="tx_petition_domain_model_petitionsentry.street">Rue</label>
+            <label index="tx_petition_domain_model_petitionsentry.petition">Pétition</label>
+            <label index="tx_petition_domain_model_petition">Pétition</label>
+            <label index="tx_petition_domain_model_petition.title">Titre</label>
+                        
+            <label index="tx_petition_list_title">Liste des signataires</label>
+            <label index="tx_petition_list_name">Nom</label>
+            <label index="tx_petition_list_place">Lieu</label>
+            <label index="tx_petition_list_date">Date de signature</label>
+                         
+            <label index="tx_petition_createform_confirm">OK; envoyer</label>
+            <label index="tx_petition_createform_confirmsuccess">Merci pour votre signature</label>
+            <label index="tx_petition_createform_confirmerror">Erreur. Merci de recommencer</label>
+                         
+            <label index="tx_petition_count_title">Compteur</label>
+            <label index="tx_petition_count_text_before">Les voici !</label>
+            <label index="tx_petition_count_text_after">Liste des signataires</label>
+                         
+            <label index="tx_petition_success_title">Merci!</label>
+            <label index="tx_petition_success_message">Vous allez recevoir un message par mél, pour confirmer votre signature.</label>
+               
+            <label index="tx_petition_email_start">Bonjour,
+
+Vous venez de signer une pétition. Merci de confirmer votre signature en cliquant sur le lien ci-dessous, pour confirmer votre identité.
+            </label>
+            <label index="tx_petition_email_stop">Nous vous souhaitons une bonne journée,
+
+Le service Pétition
+            </label>
+
+            <label index="tx_petition_createform_title">Ajouter une signature</label>
+            <label index="tx_petition_createform_firstname">Vorname</label>
+            <label index="tx_petition_createform_lastname">Nom</label>
+            <label index="tx_petition_createform_emailadress">adresse électronique</label>
+            <label index="tx_petition_createform_country">Payes</label>
+            <label index="tx_petition_createform_town">Ville</label>
+            <label index="tx_petition_createform_zip">CP</label>
+            <label index="tx_petition_createform_street">Rue</label>
+            <label index="tx_petition_createform_submit">OK - envoyer</label>
+        </languageKey> 
+        <languageKey index="de" type="array">
+            <label index="tx_petition_domain_model_petitionsentry">Petition</label>
+            <label index="tx_petition_domain_model_petitionsentry.firstname">Vorname</label>
+            <label index="tx_petition_domain_model_petitionsentry.lastname">nachname</label>
+            <label index="tx_petition_domain_model_petitionsentry.emailadress">Mailadresse</label>
+            <label index="tx_petition_domain_model_petitionsentry.country">Land</label>
+            <label index="tx_petition_domain_model_petitionsentry.town">Stadt</label>
+            <label index="tx_petition_domain_model_petitionsentry.zip">PLZ</label>
+            <label index="tx_petition_domain_model_petitionsentry.street">Strasse</label>
+            <label index="tx_petition_domain_model_petitionsentry.petition">Petition</label>
+            <label index="tx_petition_domain_model_petition">Petition</label>
+            <label index="tx_petition_domain_model_petition.title">Titel</label>
+                        
+            <label index="tx_petition_list_title">Petitions-Liste</label>
+            <label index="tx_petition_list_name">Name</label>
+            <label index="tx_petition_list_place">Ort</label>
+            <label index="tx_petition_list_date">Datum der Unterschrift</label>
+                         
+            <label index="tx_petition_createform_confirm">OK - abschicken</label>
+            <label index="tx_petition_createform_confirmsuccess">Danke für Ihre Beteiligung.</label>
+            <label index="tx_petition_createform_confirmerror">Fehler. Bitte Daten erneut erfassen.</label>
+                         
+            <label index="tx_petition_count_title">Zähler</label>
+            <label index="tx_petition_count_text_before">Aktueller Stand</label>
+            <label index="tx_petition_count_text_after">Unterschriften!</label>
+                         
+            <label index="tx_petition_success_title">Ihre Unterschrift ist eingegangen</label>
+            <label index="tx_petition_success_message">Sie erhalten nun eine e-mail. Bitte folgen Sie den Anweisungen darin, um Ihre Unterschrift zu bestätigen.</label>
+               
+            <label index="tx_petition_email_start">Guten Tag,
+
+Sie haben eben eine Petition unterzeichnet. Bitte klicken Sie auf den untenstehenden Link, um Ihre Identität zu bestätigen, da andernfalls Ihre Unterschrift nicht gezählt wird.
+            </label>
+            <label index="tx_petition_email_stop">Einen schönen Tag noch !
+
+Die Abteilung Petitionen
+            </label>
+
+            <label index="tx_petition_createform_title">Ich unterschreibe!</label>
+            <label index="tx_petition_createform_firstname">Vorname</label>
+            <label index="tx_petition_createform_lastname">Nachname</label>
+            <label index="tx_petition_createform_emailadress">E-mail</label>
+            <label index="tx_petition_createform_country">Land</label>
+            <label index="tx_petition_createform_town">Stadt</label>
+            <label index="tx_petition_createform_zip">PLZ</label>
+            <label index="tx_petition_createform_street">Strasse</label>
+            <label index="tx_petition_createform_submit">OK - Abschicken</label>
+        </languageKey>
+    </data>
+</T3locallang>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petition.xml b/Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petition.xml
new file mode 100755 (executable)
index 0000000..25c387d
--- /dev/null
@@ -0,0 +1,22 @@
+<T3locallang>
+    <meta type="array">
+        <description>Context Sensitive Help (CSH) for table tx_petition_domain_model_petition</description>
+        <type>CSH</type>
+        <csh_table>tx_petition_domain_model_petition</csh_table>
+       </meta>
+        <data type="array">
+            
+            <languageKey index="default" type="array">
+                <label index="title.description">title</label>
+            </languageKey>
+            
+            <languageKey index="de" type="array">
+                <label index="title.description">Titel</label>
+            </languageKey>
+            
+            <languageKey index="fr" type="array">
+                <label index="title.description">Titre</label>
+            </languageKey>
+            
+        </data>
+    </T3locallang>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petitionsentry.xml b/Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petitionsentry.xml
new file mode 100644 (file)
index 0000000..1c69864
--- /dev/null
@@ -0,0 +1,45 @@
+
+<T3locallang>
+    <meta type="array">
+        <description>Context Sensitive Help (CSH) for table tx_petition_domain_model_petitionsentry</description>
+        <type>CSH</type>
+        <csh_table>tx_petition_domain_model_petitionsentry</csh_table>
+    </meta>
+    <data type="array">
+        
+        <languageKey index="default" type="array">
+            <label index="firstname.description">firstname</label>
+            <label index="lastname.description">lastname</label>
+            <label index="emailadress.description">emailadress</label>
+            <label index="country.description">country</label>
+            <label index="town.description">town</label>
+            <label index="zip.description">zip</label>
+            <label index="street.description">street</label>
+            <label index="petition.description">petition</label>
+        </languageKey>
+            
+        <languageKey index="de" type="array">
+            <label index="firstname.description">Vorname</label>
+            <label index="lastname.description">Nachname</label>
+            <label index="emailadress.description">Mailadresse</label>
+            <label index="country.description">Land</label>
+            <label index="town.description">Stadt</label>
+            <label index="zip.description">PLZ</label>
+            <label index="street.description">Strasse</label>
+            <label index="petition.description">Petition</label>
+        </languageKey>
+        
+        <languageKey index="fr" type="array">
+                  
+            <label index="firstname.description">Prénom</label>
+            <label index="lastname.description">Nom</label>
+            <label index="emailadress.description">Adresse électronique</label>
+            <label index="country.description">Pays</label>
+            <label index="town.description">Ville</label>
+            <label index="zip.description">CP</label>
+            <label index="street.description">Rue</label>
+            <label index="petition.description">Pétition</label>
+        </languageKey> 
+        
+    </data>
+</T3locallang>
\ No newline at end of file
diff --git a/Resources/Private/Language/locallang_db.xml b/Resources/Private/Language/locallang_db.xml
new file mode 100755 (executable)
index 0000000..da618e3
--- /dev/null
@@ -0,0 +1,87 @@
+<T3locallang>
+    <meta type="array">
+        <type>database</type>
+        <description>Language labels for database tables/fields belonging to extension 'petition'</description>
+       </meta>
+        <data type="array">
+            <languageKey index="default" type="array">
+            
+                <label index="tx_petition_domain_model_petitionsentry">Petitions Entry</label>
+                <label index="tx_petition_domain_model_petitionsentry.firstname">Firstname</label>
+                <label index="tx_petition_domain_model_petitionsentry.lastname">Lastname</label>
+                <label index="tx_petition_domain_model_petitionsentry.emailadress">Emailadress</label>
+                <label index="tx_petition_domain_model_petitionsentry.country">Country</label>
+                <label index="tx_petition_domain_model_petitionsentry.town">Town</label>
+                <label index="tx_petition_domain_model_petitionsentry.zip">Zip</label>
+                <label index="tx_petition_domain_model_petitionsentry.street">Street</label>
+                <label index="tx_petition_domain_model_petitionsentry.petition">Petition</label>
+                <label index="tx_petition_domain_model_petitionsentry.message">Message</label>
+
+                <label index="tx_petition_domain_model_petition">Petition</label>
+                <label index="tx_petition_domain_model_petition.title">Title</label>
+                        
+                <label index="tx_petition_flexform_title">Petition</label>
+                <label index="tx_petition_flexform_controller">Select View</label>
+                <label index="tx_petition_flexform_petition">Related Petition</label>
+                <label index="tx_petition_flexform_createAction">Create Form</label>
+                <label index="tx_petition_flexform_countAction">Show Counter</label>
+                <label index="tx_petition_flexform_listAction">Show List</label>
+                <label index="tx_petition_flexform_fromname">Emailsenders Name</label>
+                <label index="tx_petition_flexform_fromemail">Emailsenders Email</label>
+                <label index="tx_petition_flexform_fromheadline">Email Headline</label>
+            </languageKey>
+            
+            <languageKey index="de" type="array">   
+                <label index="tx_petition_domain_model_petitionsentry">Erfasste Daten</label>
+                <label index="tx_petition_domain_model_petitionsentry.firstname">Vorname</label>
+                <label index="tx_petition_domain_model_petitionsentry.lastname">Name</label>
+                <label index="tx_petition_domain_model_petitionsentry.emailadress">Mailadresse</label>
+                <label index="tx_petition_domain_model_petitionsentry.country">Land</label>
+                <label index="tx_petition_domain_model_petitionsentry.town">Stadt</label>
+                <label index="tx_petition_domain_model_petitionsentry.zip">PLZ</label>
+                <label index="tx_petition_domain_model_petitionsentry.street">Strasse</label>
+                <label index="tx_petition_domain_model_petitionsentry.petition">Petition</label>
+                <label index="tx_petition_domain_model_petitionsentry.message">Nachricht</label>
+
+                <label index="tx_petition_domain_model_petition">Petition</label>
+                <label index="tx_petition_domain_model_petition.title">Titel</label>
+                        
+                <label index="tx_petition_flexform_title">Petition</label>
+                <label index="tx_petition_flexform_controller">Auswahl der Anzeige</label>
+                <label index="tx_petition_flexform_petition">Betrifft Petition</label>
+                <label index="tx_petition_flexform_createAction">Formularerzeugung</label>
+                <label index="tx_petition_flexform_countAction">mit Zähler</label>
+                <label index="tx_petition_flexform_listAction">mit Liste</label>
+                <label index="tx_petition_flexform_fromname">Name des Absenders</label>
+                <label index="tx_petition_flexform_fromemail">Mailadresse des Absenders</label>
+                <label index="tx_petition_flexform_fromheadline">Betreffzeile</label>
+            </languageKey>
+            
+            <languageKey index="fr" type="array">
+            
+                <label index="tx_petition_domain_model_petitionsentry">Données saisies</label>
+                <label index="tx_petition_domain_model_petitionsentry.firstname">Prénom</label>
+                <label index="tx_petition_domain_model_petitionsentry.lastname">Nom</label>
+                <label index="tx_petition_domain_model_petitionsentry.emailadress">Adresse mail</label>
+                <label index="tx_petition_domain_model_petitionsentry.country">Pays</label>
+                <label index="tx_petition_domain_model_petitionsentry.town">Ville</label>
+                <label index="tx_petition_domain_model_petitionsentry.zip">CP</label>
+                <label index="tx_petition_domain_model_petitionsentry.street">Rue</label>
+                <label index="tx_petition_domain_model_petitionsentry.petition">Pétition</label>
+                <label index="tx_petition_domain_model_petitionsentry.message">Message</label>
+
+                <label index="tx_petition_domain_model_petition">Pétition</label>
+                <label index="tx_petition_domain_model_petition.title">Titre</label>
+                        
+                <label index="tx_petition_flexform_title">Pétition</label>
+                <label index="tx_petition_flexform_controller">Select View</label>
+                <label index="tx_petition_flexform_petition">Pétition concernée</label>
+                <label index="tx_petition_flexform_createAction">Création de formulaire</label>
+                <label index="tx_petition_flexform_countAction">Afficher le compteur</label>
+                <label index="tx_petition_flexform_listAction">Afficher la liste</label>
+                <label index="tx_petition_flexform_fromname">Nom de l'expéditeur</label>
+                <label index="tx_petition_flexform_fromemail">Adresse mail de l'expéditeur</label>
+                <label index="tx_petition_flexform_fromheadline">Intitulé du mail de confirmation</label>
+            </languageKey>
+        </data>
+    </T3locallang>
diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html
new file mode 100755 (executable)
index 0000000..79f472a
--- /dev/null
@@ -0,0 +1,3 @@
+<div class="tx-petiton">
+       <f:render section="main" />
+</div>
\ No newline at end of file
diff --git a/Resources/Private/Templates/PetitionsEntry/Confirm.html b/Resources/Private/Templates/PetitionsEntry/Confirm.html
new file mode 100755 (executable)
index 0000000..cc971b0
--- /dev/null
@@ -0,0 +1,12 @@
+<f:layout name="Default" />
+<f:section name="main">
+    <h1 class="confirm"><f:translate key="tx_petition_createform_confirm">Confirm</f:translate></h1>
+    <f:if condition="{status} == 1">
+        <f:then>
+            <p><f:translate key="tx_petition_createform_confirmsuccess">Thanks for subscribing.</f:translate></p>
+        </f:then>
+        <f:else>
+            <p><f:translate key="tx_petition_createform_confirmerror">Oooppps, an error occured.</f:translate></p>
+        </f:else>
+    </f:if>
+</f:section>
\ No newline at end of file
diff --git a/Resources/Private/Templates/PetitionsEntry/Count.html b/Resources/Private/Templates/PetitionsEntry/Count.html
new file mode 100755 (executable)
index 0000000..ac5855c
--- /dev/null
@@ -0,0 +1,5 @@
+<f:layout name="Default" />
+<f:section name="main">
+    <h1 class="count"><f:translate key="tx_petition_count_title">Petition Counter</f:translate></h1>
+    <p><f:translate key="tx_petition_count_text_before">Right now there are</f:translate> <f:count subject='{entries}' /> <f:translate key="tx_petition_count_text_after">Petitions entries!</f:translate></p>
+</f:section>
\ No newline at end of file
diff --git a/Resources/Private/Templates/PetitionsEntry/Create.html b/Resources/Private/Templates/PetitionsEntry/Create.html
new file mode 100755 (executable)
index 0000000..3e37a4e
--- /dev/null
@@ -0,0 +1,5 @@
+<f:layout name="Default" />
+<f:section name="main">
+    <h1 class="create"><f:translate key="tx_petition_success_title">Success</f:translate></h1>
+    <p><f:translate key="tx_petition_success_message">You just got a message in your mailbox. Please check it and follow the steps.</f:translate></p>
+</f:section>
\ No newline at end of file
diff --git a/Resources/Private/Templates/PetitionsEntry/List.html b/Resources/Private/Templates/PetitionsEntry/List.html
new file mode 100755 (executable)
index 0000000..c5309dd
--- /dev/null
@@ -0,0 +1,23 @@
+<f:layout name="Default" />
+
+<f:section name="main">
+    <h1 class="list"><f:translate key="tx_petition_list_title">Petition List</f:translate></h1>
+        <f:if condition="{entries}">
+            <f:widget.paginate objects="{entries}" as="entries_" configuration="{itemsPerPage: 30, insertAbove: 1, insertBelow: 1}">
+                <div class="petitionsListTable">
+                    <div class="row">
+                        <div class="name head cell"><f:translate key="tx_petition_list_name">Subscriber Name</f:translate></div>
+                        <div class="date head cell"><f:translate key="tx_petition_list_place">Subscribe Location</f:translate></div>
+                        <div class="date head cell"><f:translate key="tx_petition_list_date">Subscribe Date</f:translate></div>
+                    </div>
+                    <f:for each="{entries_}" as="entry">
+                        <div class="row">
+                            <div class="name cell">{entry.firstname} {entry.lastname}</div>
+                            <div class="name cell">{entry.country}, {entry.town}</div>
+                            <div class="date cell"><f:format.date format="d.m.Y">{entry.tstamp}</f:format.date></div>
+                        </div>
+                    </f:for>
+                </div>
+            </f:widget.paginate> 
+        </f:if>
+</f:section>
\ No newline at end of file
diff --git a/Resources/Private/Templates/PetitionsEntry/MailText.txt b/Resources/Private/Templates/PetitionsEntry/MailText.txt
new file mode 100644 (file)
index 0000000..15c0e6f
--- /dev/null
@@ -0,0 +1,8 @@
+<f:translate key="LLL:EXT:petition/Resources/Private/Language/locallang.xml:tx_petition_email_start">Hello,
+
+you just subscribed a petition. Please click the link below to confirm, that you wanted to subscribe. If you do not click the button, your vote cannot be registered.</f:translate>
+{link}
+
+<f:translate key="LLL:EXT:petition/Resources/Private/Language/locallang.xml:tx_petition_email_stop">Have a nice Day,
+
+Petition Service</f:translate>
\ No newline at end of file
diff --git a/Resources/Private/Templates/PetitionsEntry/New.html b/Resources/Private/Templates/PetitionsEntry/New.html
new file mode 100755 (executable)
index 0000000..c786e76
--- /dev/null
@@ -0,0 +1,38 @@
+<f:layout name="Default" />
+<f:section name="main">
+    <h1 class="new"><f:translate key="tx_petition_createform_title">Create New Entry</f:translate></h1>
+    <f:form action="create" class="create" name="newPetitionsEntry" object="{newPetitionsEntry}">
+        <div>
+            <label id="firstname_{formIDSafe}"><f:translate key="tx_petition_createform_firstname">Firstname</f:translate></label>
+            <f:form.textfield id="firstname_{formIDSafe}" property="firstname" value="" />
+        </div>
+        <div>
+            <label id="lastname_{formIDSafe}"><f:translate key="tx_petition_createform_lastname">Lastname</f:translate></label>
+            <f:form.textfield id="lastname_{formIDSafe}" property="lastname" value="" />
+        </div>
+        <div>
+            <label id="emailadress_{formIDSafe}"><f:translate key="tx_petition_createform_emailadress">Email</f:translate></label>
+            <f:form.textfield id="emailadress_{formIDSafe}" property="emailadress" value="" />
+        </div>
+        <div>
+            <label id="country_{formIDSafe}"><f:translate key="tx_petition_createform_country">Country</f:translate></label>
+            <f:form.textfield id="country_{formIDSafe}" property="country" value="" />
+        </div>
+        <div>
+            <label id="town_{formIDSafe}"><f:translate key="tx_petition_createform_town">Town</f:translate></label>
+            <f:form.textfield id="town_{formIDSafe}" property="town" value="" />
+        </div>
+        <div>
+            <label id="zip_{formIDSafe}"><f:translate key="tx_petition_createform_zip">Zip-Code</f:translate></label>
+            <f:form.textfield id="zip_{formIDSafe}" property="zip" value="" />
+        </div>
+        <div>
+            <label id="street_{formIDSafe}"><f:translate key="tx_petition_createform_street">Street</f:translate></label>
+            <f:form.textfield id="street_{formIDSafe}" property="street" value="" />
+        </div>
+        <div>
+            <label id="createSubmit_{formIDSafe}" class="hidden"><f:translate key="tx_petition_createform_submit">Submit</f:translate></label>
+            <f:form.submit id="createSubmit_{formIDSafe}" value="{f:translate(key:'tx_petition_createform_submit')}" />
+        </div>
+    </f:form>
+</f:section>
\ No newline at end of file
diff --git a/Resources/Public/Icons/relation.gif b/Resources/Public/Icons/relation.gif
new file mode 100755 (executable)
index 0000000..db61d7e
Binary files /dev/null and b/Resources/Public/Icons/relation.gif differ
diff --git a/Resources/Public/Icons/tx_petition_domain_model_petition.gif b/Resources/Public/Icons/tx_petition_domain_model_petition.gif
new file mode 100755 (executable)
index 0000000..6cc5f16
Binary files /dev/null and b/Resources/Public/Icons/tx_petition_domain_model_petition.gif differ
diff --git a/Resources/Public/Icons/tx_petition_domain_model_petitionsentry.gif b/Resources/Public/Icons/tx_petition_domain_model_petitionsentry.gif
new file mode 100755 (executable)
index 0000000..6cc5f16
Binary files /dev/null and b/Resources/Public/Icons/tx_petition_domain_model_petitionsentry.gif differ
diff --git a/doc/manual.sxw b/doc/manual.sxw
new file mode 100644 (file)
index 0000000..746d1e4
Binary files /dev/null and b/doc/manual.sxw differ
diff --git a/ext_emconf.php b/ext_emconf.php
new file mode 100755 (executable)
index 0000000..3e98323
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+
+########################################################################
+# Extension Manager/Repository config file for ext "petition".
+#
+# Auto generated 23-01-2013 18:58
+#
+# Manual updates:
+# Only the data in the array - everything else is removed by next
+# writing. "version" and "dependencies" must not be touched!
+########################################################################
+
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'Petition',
+       'description' => 'Petitions Tool by Bastian Bringenberg for Beschneidung-von-Jungen.de ( a german platform agains circumcision ) planed by abis-freiburg.de
+
+If you need additional content please say a word!',
+       'category' => 'plugin',
+       'author' => 'Guy Sinden, Bastian Bringenberg',
+       'author_email' => 'sinden@abis-freiburg.de, typo3@bastian-bringenberg.de',
+       'author_company' => ', Bastian Bringenberg',
+       'shy' => '',
+       'priority' => '',
+       'module' => '',
+       'state' => 'beta',
+       'internal' => '',
+       'uploadfolder' => 0,
+       'createDirs' => '',
+       'modify_tables' => '',
+       'clearCacheOnLoad' => 0,
+       'lockType' => '',
+       'version' => '1.1.0',
+       'constraints' => array(
+               'depends' => array(
+                       'extbase' => '1.3',
+                       'fluid' => '1.3',
+                       'typo3' => '4.5-0.0.0',
+               ),
+               'conflicts' => array(
+               ),
+               'suggests' => array(
+               ),
+       ),
+       '_md5_values_when_last_written' => 'a:30:{s:12:"ext_icon.gif";s:4:"e922";s:17:"ext_localconf.php";s:4:"98e8";s:14:"ext_tables.php";s:4:"a502";s:14:"ext_tables.sql";s:4:"dbd0";s:47:"Classes/Controller/PetitionsEntryController.php";s:4:"ecde";s:33:"Classes/Domain/Model/Petition.php";s:4:"f9e8";s:39:"Classes/Domain/Model/PetitionsEntry.php";s:4:"b5a0";s:48:"Classes/Domain/Repository/PetitionRepository.php";s:4:"c6ec";s:54:"Classes/Domain/Repository/PetitionsEntryRepository.php";s:4:"67f5";s:44:"Configuration/FlexForms/flexform_default.xml";s:4:"c1e8";s:41:"Configuration/FlexForms/flexform_list.xml";s:4:"8316";s:30:"Configuration/TCA/Petition.php";s:4:"49f4";s:36:"Configuration/TCA/PetitionsEntry.php";s:4:"9f2e";s:38:"Configuration/TypoScript/constants.txt";s:4:"d5ae";s:34:"Configuration/TypoScript/setup.txt";s:4:"dd70";s:40:"Resources/Private/Language/locallang.xml";s:4:"1e88";s:77:"Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petition.xml";s:4:"3e7d";s:83:"Resources/Private/Language/locallang_csh_tx_petiton_domain_model_petitionsentry.xml";s:4:"5a6e";s:43:"Resources/Private/Language/locallang_db.xml";s:4:"9de0";s:38:"Resources/Private/Layouts/Default.html";s:4:"3246";s:55:"Resources/Private/Templates/PetitionsEntry/Confirm.html";s:4:"3f7a";s:53:"Resources/Private/Templates/PetitionsEntry/Count.html";s:4:"b922";s:54:"Resources/Private/Templates/PetitionsEntry/Create.html";s:4:"ad6c";s:52:"Resources/Private/Templates/PetitionsEntry/List.html";s:4:"7569";s:55:"Resources/Private/Templates/PetitionsEntry/MailText.txt";s:4:"2de6";s:51:"Resources/Private/Templates/PetitionsEntry/New.html";s:4:"3f0d";s:35:"Resources/Public/Icons/relation.gif";s:4:"e615";s:60:"Resources/Public/Icons/tx_petition_domain_model_petition.gif";s:4:"905a";s:66:"Resources/Public/Icons/tx_petition_domain_model_petitionsentry.gif";s:4:"905a";s:14:"doc/manual.sxw";s:4:"5d90";}',
+);
+
+?>
\ No newline at end of file
diff --git a/ext_icon.gif b/ext_icon.gif
new file mode 100755 (executable)
index 0000000..1a832d4
Binary files /dev/null and b/ext_icon.gif differ
diff --git a/ext_localconf.php b/ext_localconf.php
new file mode 100755 (executable)
index 0000000..a00f4d8
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+if (!defined('TYPO3_MODE')) {
+       die ('Access denied.');
+}
+
+Tx_Extbase_Utility_Extension::configurePlugin(
+       $_EXTKEY,
+       'Petition',
+       array(
+               'PetitionsEntry' => 'new, create, confirm',     
+       ),
+       // non-cacheable actions
+       array(
+               'PetitionsEntry' => 'create, ',
+       )
+);
+
+Tx_Extbase_Utility_Extension::configurePlugin(
+       $_EXTKEY,
+       'List',
+       array(
+               'PetitionsEntry' => 'list, count',      
+       ),
+       // non-cacheable actions
+       array(
+               'PetitionsEntry' => '',
+       )
+);
+
+?>
\ No newline at end of file
diff --git a/ext_tables.php b/ext_tables.php
new file mode 100755 (executable)
index 0000000..9a802fd
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+if (!defined('TYPO3_MODE')) {
+       die ('Access denied.');
+}
+
+Tx_Extbase_Utility_Extension::registerPlugin(
+       $_EXTKEY,
+       'Petition',
+       'Petitions Form'
+);
+
+$pluginSignature = str_replace('_','',$_EXTKEY) . '_petition';
+$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
+t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_default.xml');
+
+Tx_Extbase_Utility_Extension::registerPlugin(
+       $_EXTKEY,
+       'List',
+       'Petitions List'
+);
+
+$pluginSignature = str_replace('_','',$_EXTKEY) . '_list';
+$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
+t3lib_extMgm::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_list.xml');
+
+t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Petition');
+
+t3lib_extMgm::addLLrefForTCAdescr('tx_petition_domain_model_petitionsentry', 'EXT:petition/Resources/Private/Language/locallang_csh_tx_petition_domain_model_petitionsentry.xml');
+t3lib_extMgm::allowTableOnStandardPages('tx_petition_domain_model_petitionsentry');
+$TCA['tx_petition_domain_model_petitionsentry'] = array(
+       'ctrl' => array(
+               'title' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petitionsentry',
+               'label' => 'firstname',
+               'tstamp' => 'tstamp',
+               'crdate' => 'crdate',
+               'cruser_id' => 'cruser_id',
+               'dividers2tabs' => TRUE,
+
+               'versioningWS' => 2,
+               'versioning_followPages' => TRUE,
+               'origUid' => 't3_origuid',
+               'languageField' => 'sys_language_uid',
+               'transOrigPointerField' => 'l10n_parent',
+               'transOrigDiffSourceField' => 'l10n_diffsource',
+               'delete' => 'deleted',
+               'enablecolumns' => array(
+                       'disabled' => 'hidden',
+                       'starttime' => 'starttime',
+                       'endtime' => 'endtime',
+               ),
+               'searchFields' => 'firstname,lastname,emailadress,country,town,zip,street,petition,',
+               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/PetitionsEntry.php',
+               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_petition_domain_model_petitionsentry.gif'
+       ),
+);
+
+t3lib_extMgm::addLLrefForTCAdescr('tx_petition_domain_model_petition', 'EXT:petition/Resources/Private/Language/locallang_csh_tx_petition_domain_model_petition.xml');
+t3lib_extMgm::allowTableOnStandardPages('tx_petition_domain_model_petition');
+$TCA['tx_petition_domain_model_petition'] = array(
+       'ctrl' => array(
+               'title' => 'LLL:EXT:petition/Resources/Private/Language/locallang_db.xml:tx_petition_domain_model_petition',
+               'label' => 'title',
+               'tstamp' => 'tstamp',
+               'crdate' => 'crdate',
+               'cruser_id' => 'cruser_id',
+               'dividers2tabs' => TRUE,
+
+               'versioningWS' => 2,
+               'versioning_followPages' => TRUE,
+               'origUid' => 't3_origuid',
+               'languageField' => 'sys_language_uid',
+               'transOrigPointerField' => 'l10n_parent',
+               'transOrigDiffSourceField' => 'l10n_diffsource',
+               'delete' => 'deleted',
+               'enablecolumns' => array(
+                       'disabled' => 'hidden',
+                       'starttime' => 'starttime',
+                       'endtime' => 'endtime',
+               ),
+               'searchFields' => 'title,',
+               'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/Petition.php',
+               'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/tx_petition_domain_model_petition.gif'
+       ),
+);
+
+?>
\ No newline at end of file
diff --git a/ext_tables.sql b/ext_tables.sql
new file mode 100755 (executable)
index 0000000..b4ad2f2
--- /dev/null
@@ -0,0 +1,87 @@
+#
+# Table structure for table 'tx_petition_domain_model_petitionsentry'
+#
+CREATE TABLE tx_petition_domain_model_petitionsentry (
+
+       uid int(11) NOT NULL auto_increment,
+       pid int(11) DEFAULT '0' NOT NULL,
+
+       firstname varchar(255) DEFAULT '' NOT NULL,
+       lastname varchar(255) DEFAULT '' NOT NULL,
+       emailadress varchar(255) DEFAULT '' NOT NULL,
+       country varchar(255) DEFAULT '' NOT NULL,
+       town varchar(255) DEFAULT '' NOT NULL,
+       zip varchar(255) DEFAULT '' NOT NULL,
+       street varchar(255) DEFAULT '' NOT NULL,
+       petition int(11) unsigned DEFAULT '0',
+       message longtext,
+
+       tstamp int(11) unsigned DEFAULT '0' NOT NULL,
+       crdate int(11) unsigned DEFAULT '0' NOT NULL,
+       cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
+       deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       starttime int(11) unsigned DEFAULT '0' NOT NULL,
+       endtime int(11) unsigned DEFAULT '0' NOT NULL,
+
+       t3ver_oid int(11) DEFAULT '0' NOT NULL,
+       t3ver_id int(11) DEFAULT '0' NOT NULL,
+       t3ver_wsid int(11) DEFAULT '0' NOT NULL,
+       t3ver_label varchar(255) DEFAULT '' NOT NULL,
+       t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
+       t3ver_stage int(11) DEFAULT '0' NOT NULL,
+       t3ver_count int(11) DEFAULT '0' NOT NULL,
+       t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
+       t3ver_move_id int(11) DEFAULT '0' NOT NULL,
+
+       t3_origuid int(11) DEFAULT '0' NOT NULL,
+       sys_language_uid int(11) DEFAULT '0' NOT NULL,
+       l10n_parent int(11) DEFAULT '0' NOT NULL,
+       l10n_diffsource mediumblob,
+
+       PRIMARY KEY (uid),
+       KEY parent (pid),
+       KEY t3ver_oid (t3ver_oid,t3ver_wsid),
+       KEY language (l10n_parent,sys_language_uid)
+
+);
+
+#
+# Table structure for table 'tx_petition_domain_model_petition'
+#
+CREATE TABLE tx_petition_domain_model_petition (
+
+       uid int(11) NOT NULL auto_increment,
+       pid int(11) DEFAULT '0' NOT NULL,
+
+       title varchar(255) DEFAULT '' NOT NULL,
+
+       tstamp int(11) unsigned DEFAULT '0' NOT NULL,
+       crdate int(11) unsigned DEFAULT '0' NOT NULL,
+       cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
+       deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
+       starttime int(11) unsigned DEFAULT '0' NOT NULL,
+       endtime int(11) unsigned DEFAULT '0' NOT NULL,
+
+       t3ver_oid int(11) DEFAULT '0' NOT NULL,
+       t3ver_id int(11) DEFAULT '0' NOT NULL,
+       t3ver_wsid int(11) DEFAULT '0' NOT NULL,
+       t3ver_label varchar(255) DEFAULT '' NOT NULL,
+       t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
+       t3ver_stage int(11) DEFAULT '0' NOT NULL,
+       t3ver_count int(11) DEFAULT '0' NOT NULL,
+       t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
+       t3ver_move_id int(11) DEFAULT '0' NOT NULL,
+
+       t3_origuid int(11) DEFAULT '0' NOT NULL,
+       sys_language_uid int(11) DEFAULT '0' NOT NULL,
+       l10n_parent int(11) DEFAULT '0' NOT NULL,
+       l10n_diffsource mediumblob,
+
+       PRIMARY KEY (uid),
+       KEY parent (pid),
+       KEY t3ver_oid (t3ver_oid,t3ver_wsid),
+       KEY language (l10n_parent,sys_language_uid)
+
+);