File indexing completed on 2024-12-29 05:24:38
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 0023 //$plingData = $this->userPlings($this->product->project_id); 0024 $helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl(); 0025 $helperBuildProductUrl = new Default_View_Helper_BuildProductUrl(); 0026 $helperImage = new Default_View_Helper_Image(); 0027 0028 $auth = Zend_Auth::getInstance(); 0029 $btnName = $auth->hasIdentity() ? 'Confirm Donation' : 'Anonymous Pling'; 0030 $this->headScript() 0031 ->appendFile('https://www.paypalobjects.com/js/external/dg.js'); 0032 ?> 0033 0034 <form id="support-form" 0035 class="standard-form partialpaypal" 0036 method="post" 0037 action="<?= $this->urlPay ?>" 0038 data-target="#overlays"> 0039 0040 <div id="pling-box" class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> 0041 <div class="row" style="border-bottom: 2px solid #ccc; padding-bottom: 20px"> 0042 0043 <div class="col-lg-6"> 0044 <div class="row" style="text-align: center; padding-top:20px;"> 0045 <span style="padding-top:10px; padding-right:5px;"> 0046 support <?= $this->member->username ?> </span> 0047 <div class="product-maker-thumbnail relative" style=""> 0048 <a href="<?php echo $helperBuildMemberUrl->buildMemberUrl($this->member->username); ?>" 0049 title="<?= $this->member->username ?>"> 0050 <img src="<?= $helperImage->Image($this->member->profile_image_url, array('width' => 40, 'height' => 40)) ?>" 0051 alt="product-maker" width="40" height="40" 0052 class="sidebar-profile-image"> 0053 </a> 0054 </div> 0055 </div> 0056 <div class="row" style="text-align: center; padding-top:20px;"> 0057 0058 <span style="display: block; font-weight: bold; color: #2B81C5">For The Product</span> 0059 <div style="display: block; padding-top: 10px; margin: 0 auto; width: 40%; border-bottom: 1px solid #ccc"></div> 0060 <span style="display: block;padding-top: 10px; "><?= $this->product->title ?></span> 0061 0062 0063 </div> 0064 </div> 0065 0066 <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12"> 0067 <img style="border-radius: 2px; max-width: 240px; max-height: 150px; padding-top: 10px" src="<?= $helperImage->Image($this->product->image_small); ?>"/> 0068 </div> 0069 0070 <?php /* 0071 <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12" style="text-align: center; padding-top:20px;"> 0072 <span style="display: block; font-weight: bold; color: #2B81C5">Suport The Product</span> 0073 <div style="display: block; padding-top: 10px; margin: 0 auto; width: 40%; border-bottom: 1px solid #ccc"></div> 0074 <span style="display: block;padding-top: 10px; "><?= $this->product->title ?></span> 0075 <span style="display: block; padding: 20px 0px; color: #ccc; font-size: smaller;">made by <?= $this->member->username ?></span> 0076 0077 </div> 0078 0079 */ ?> 0080 </div> 0081 <div class="row" style="padding-top: 25px"> 0082 <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12"> 0083 <div class="donation-box" > 0084 <div class="donation-box-payment" > 0085 0086 <div class="payment-options"> 0087 <label for="amount"><?=$this->translate('Support with')?></label> 0088 0089 <div class="number-input"> 0090 <span class="glyphicon glyphicon-usd" style="padding-top:10px;"></span> 0091 <input name="amount" id="amount" type="number" value="10" min="1" max="500" step="0.25"/> 0092 </div> 0093 0094 <div class="options"> 0095 <span title="5" class="option"> 5 </span><span class="optionPkt"> - </span> 0096 <span title="10" class="option"> 10 </span><span class="optionPkt"> - </span> 0097 <span title="25" class="option"> 25 </span><span class="optionPkt"> - </span> 0098 <span title="50" class="option"> 50 </span><span class="optionPkt"> - </span> 0099 <span title="100" class="option"> 100 </span><span class="optionPkt"> - </span> 0100 <span title="200" class="option"> 200 </span><span class="optionPkt"> - </span> 0101 <span title="500" class="option"> 500 </span> 0102 0103 </div> 0104 </div> 0105 0106 <div class="pling-it"> 0107 <?php if (empty($this->product->paypal_mail) && empty($this->product->dwolla_id)) : ?> 0108 <a id="pling-start" href="javascript:;"> 0109 <span class="btn-pling-2 disabled">no payment option available</span> 0110 </a> 0111 <?php else: ?> 0112 <div class="payment-providers" style="padding-bottom: 20px;height:40px;float:left;"> 0113 <?php if (false === empty($this->product->paypal_mail)) { ?> 0114 <div class="input-group" style="padding-left:10px; height:40px"> 0115 <!-- class="input-group-addon" --> 0116 <span> 0117 <input type="radio" name="provider" value="paypal" checked> 0118 </span> 0119 <span class="payment-icon"> 0120 <img src="/theme/flatui/img/logo_paypal.png" style="width:55px; height:15px" /> 0121 </span> 0122 </div> 0123 <?php } ?> 0124 <?php if (false === empty($this->product->dwolla_id)) { 0125 $checked = ''; 0126 if (empty($this->product->paypal_mail)) { 0127 $checked = 'checked'; 0128 } 0129 ?> 0130 <div class="input-group"> 0131 <span class="input-group-addon"> 0132 <input type="radio" name="provider" value="dwolla" <?= $checked ?>> 0133 </span> 0134 <span class="payment-icon"> 0135 <img src="/theme/flatui/img/new/dwolla.png"/> 0136 </span> 0137 </div> 0138 <?php } ?> 0139 </div> 0140 0141 0142 <?php endif; ?> 0143 </div> 0144 0145 </div> 0146 </div> 0147 0148 </div> 0149 <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12"> 0150 <textarea id="comment" name="comment" 0151 placeholder=" <?= $this->translate('Write a comment (publicly visible)') ?>" rows="4" 0152 class="col-md-12 col-lg-12 col-sm-12 col-xs-12"></textarea> 0153 </div> 0154 </div> 0155 0156 0157 <div class="row" style="padding-top: 30px"> 0158 0159 0160 <?php if ($auth->hasIdentity()) { ?> 0161 <button type="submit" id="submit_pling" class="btn btn-native pull-right"> 0162 <?= $this->translate($btnName) ?> 0163 </button> 0164 <?php } else { ?> 0165 <a href="javascript:;" class="btn btn-native disabled pull-right "> 0166 Please login to donate 0167 </a> 0168 <?php } ?> 0169 0170 </div> 0171 </div> 0172 </form> 0173 0174 0175 <?php 0176 $this->inlineScript()->appendScript( 0177 '$(document).ready(function(){ 0178 PartialPayPal.initPayPalForm(); 0179 });' 0180 );