File indexing completed on 2024-05-12 05:58:42

0001 <?php
0002 /**
0003  *  ocs-webserver
0004  *
0005  *  Copyright 2016 by pling GmbH.
0006  *
0007  *    This file is part of ocs-webserver.
0008  *
0009  *    This program is free software: you can redistribute it and/or modify
0010  *    it under the terms of the GNU Affero General Public License as
0011  *    published by the Free Software Foundation, either version 3 of the
0012  *    License, or (at your option) any later version.
0013  *
0014  *    This program is distributed in the hope that it will be useful,
0015  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  *    GNU Affero General Public License for more details.
0018  *
0019  *    You should have received a copy of the GNU Affero General Public License
0020  *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
0021  **/
0022 class Default_Form_ProjectShare extends Zend_Form
0023 {
0024 
0025     public function init()
0026     {
0027         $this->setAttrib('class', 'partialjson');
0028         $this->setAttrib('data-target', '#modal-dialog');
0029 
0030         $shareEmail = $this->createElement('text', 'mail');
0031         $shareEmail->setLabel('Receiver Email');
0032         $shareEmail->setFilters(array('StringTrim'));
0033         $shareEmail->setValidators(array('EmailAddress'));
0034         $shareEmail->setRequired(true);
0035         $shareEmail->setDecorators(array('ViewHelper', 'Errors'));
0036         $shareEmail->addDecorator('Errors', array('class' => 'text-error'));
0037         $shareEmail->setAttrib('placeholder', 'Email');
0038 
0039         $senderEmail = $this->createElement('text', 'sender_mail');
0040         $senderEmail->setLabel('Sender Email');
0041         $senderEmail->setFilters(array('StringTrim'));
0042         $senderEmail->setValidators(array('EmailAddress'));
0043         $senderEmail->setRequired(true);
0044         $senderEmail->setDecorators(array('ViewHelper', 'Errors'));
0045         $senderEmail->addDecorator('Errors', array('class' => 'text-error'));
0046         $senderEmail->setAttrib('placeholder', 'Email');
0047 
0048         $submit = $this->createElement('button', 'send');
0049         $submit->setLabel('Send');
0050         $submit->setDecorators(array('ViewHelper'));
0051         $submit->setAttrib('class', 'btn btn-submit right');
0052         $submit->setAttrib('type', 'submit');
0053 
0054         $this->addElement($shareEmail);
0055         $this->addElement($senderEmail);
0056         $this->addElement($submit);
0057 
0058     }
0059 
0060 }