File indexing completed on 2025-05-04 05:29:26
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 $auth = Zend_Auth::getInstance(); 0025 $btnName = $auth->hasIdentity() ? 'pling' : 'anonymous pling'; 0026 ?> 0027 0028 <div class="support modal-dialog content-modal"> 0029 0030 <script src="https://www.paypalobjects.com/js/external/apdg.js"></script> 0031 0032 <div class="modal-content"> 0033 0034 <!-- modal header --> 0035 0036 <div class="modal-header"> 0037 <button type="button" class="close support-close" data-dismiss="modal" aria-hidden="true">×</button> 0038 <h3 class="center"><?= $this->translate('Support ') ?><?= nl2br(strip_tags($this->product->title)) ?></h3> 0039 </div> 0040 0041 <!-- /modal header --> 0042 0043 <!-- support form --> 0044 0045 <form id="support-form" class="standard-form partialpaypal" method="post" action="<?= $this->urlPay ?>" 0046 data-target="#overlays"> 0047 0048 <!-- modal body --> 0049 0050 <div class="modal-body"> 0051 <input type="hidden" name="test_provider" id="test_provider" value="paypal"> 0052 <input type="hidden" name="test_amount" id="test_amount" value="0"> 0053 0054 <div class="form-container clearfix"> 0055 <div class="controls controls-row"> 0056 <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4"> 0057 <label for="payment_amount"><?= $this->translate('Support with') ?></label> 0058 </div> 0059 <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8"> 0060 <span class="glyphicon glyphicon-usd"></span> 0061 <span id="txt_payment_amount">1</span> 0062 </div> 0063 </div> 0064 <div class="controls controls-row"> 0065 <textarea id="comment" name="comment" 0066 placeholder=" <?= $this->translate('Write a Comment') ?>" rows="4" 0067 class="col-md-12 col-lg-12 col-sm-12 col-xs-12"></textarea> 0068 </div> 0069 <div class="controls controls-row"> 0070 <div class="col-md-6 col-lg-6 col-sm-6 col-xs-6"> 0071 <?php if (false === empty($this->product->paypal_mail)) { ?> 0072 <div class="input-group"> 0073 <span class="input-group-addon"> 0074 <input type="radio" name="payment_provider" value="paypal"> 0075 </span> 0076 <span> 0077 <img src="/theme/flatui/img/logo_paypal.png"/> 0078 </span> 0079 </div> 0080 <?php } ?> 0081 <?php if (false === empty($this->product->dwolla_id)) { ?> 0082 <div class="input-group"> 0083 <span class="input-group-addon"> 0084 <input type="radio" name="payment_provider" value="dwolla"> 0085 </span> 0086 <span> 0087 <img src="/theme/flatui/img/dwolla-btn-pay-lg.png"/> 0088 </span> 0089 </div> 0090 <?php } ?> 0091 </div> 0092 <!-- <div class="col-md-6 col-lg-6 col-sm-6 col-xs-6"> 0093 <div class="input-group"> 0094 <span class="input-group-addon"> 0095 <input type="radio" name="amount_plings" value="1" > 0096 </span> 0097 <span> 0098 <img src="/theme/flatui/img/logo_bitcoin.png" /> 0099 </span> 0100 </div> 0101 </div> --> 0102 </div> 0103 </div> 0104 </div> 0105 0106 <!-- /modal body --> 0107 0108 <!-- modal footer --> 0109 <div class="modal-footer"> 0110 <button type="submit" class="btn btn-native pull-left" data-dismiss="modal" aria-hidden="true"> 0111 <?= $this->translate('Cancel') ?> 0112 </button> 0113 <button type="submit" id="submit_pling" 0114 class="btn btn-native pull-right"> 0115 <?= $this->translate($btnName) ?> 0116 </button> 0117 </div> 0118 <!--/modal footer --> 0119 0120 </form> 0121 0122 <!-- /support form --> 0123 0124 </div> 0125 0126 </div> 0127 0128 <script type="text/javascript"> 0129 $(document).ready(function () { 0130 0131 var payment_amount = $('.payment-options').find('input[type="number"]').val(); 0132 $('#support-form').find('#txt_payment_amount').text(payment_amount); 0133 $('#support-form').find('#payment_amount').val(payment_amount); 0134 $('#submit_pling').click(function () { 0135 if ($('input[name=payment_provider]:checked').val() == 'dwolla') { 0136 var newWindow = window.open(null, "dwollaFrame", "width=300,height=400,left=100,top=200"); 0137 } 0138 }); 0139 }); 0140 </script> 0141 0142 <?php 0143 $this->inlineScript()->appendScript( 0144 '$(document).ready(function(){ 0145 PartialPayPal.initPayPalForm(); 0146 });' 0147 );