Skip to content

Commit

Permalink
Dev: Show tooltip for disabled pay button (CintLink)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jul 27, 2016
1 parent ac8eb14 commit 01b5104
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions application/core/plugins/CintLink/CintLink.php
Expand Up @@ -306,6 +306,7 @@ public function getDashboard(LSHttpRequest $request)
$data = array();
$data['orders'] = $orders;
$data['surveyId'] = $surveyId;
$data['user'] = Yii::app()->user;
$data['dateformatdata'] = getDateFormatData(Yii::app()->session['dateformat']);

$content = $this->renderPartial('dashboard', $data, true);
Expand All @@ -327,6 +328,7 @@ public function getGlobalDashboard()

$data = array();
$data['orders'] = $orders;
$data['user'] = Yii::app()->user;
$data['dateformatdata'] = getDateFormatData(Yii::app()->session['dateformat']);

$content = $this->renderPartial('dashboard', $data, true);
Expand Down
1 change: 1 addition & 0 deletions application/core/plugins/CintLink/js/cintlink.js
Expand Up @@ -117,6 +117,7 @@ $(document).ready(function() {
console.log('response', response);
hideLoader();
$('#cintlink-container').html(response);
doToolTip();
});
}

Expand Down
2 changes: 1 addition & 1 deletion application/core/plugins/CintLink/views/common.php
Expand Up @@ -27,7 +27,7 @@

LS.plugin.cintlink.pluginBaseUrl = '<?php echo $pluginBaseUrl; ?>';

<?php if(isset($surveyid)): ?>
<?php if(isset($surveyId)): ?>
LS.plugin.cintlink.surveyId = '<?php echo $surveyId; ?>';
<?php endif; ?>

Expand Down
7 changes: 6 additions & 1 deletion application/core/plugins/CintLink/views/dashboard.php
Expand Up @@ -56,9 +56,14 @@
<?php if ($order->status == 'hold'): ?>
<td>
<a
class='btn btn-default btn-sm'
class='btn btn-default btn-sm <?php if ($order->ordered_by != $user->id): echo 'readonly'; endif; ?>'
href='https://www.limesurvey.org/index.php?option=com_nbill&action=orders&task=order&cid=10&ctl_order_id=<?php echo htmlspecialchars($order->url); ?>'
target='_blank'
<?php if ($order->ordered_by != $user->id): ?>
data-toggle='tooltip'
title='<?php echo $plugin->gT('You can only pay for orders you placed your self.'); ?>'
onclick='return false;'
<?php endif; ?>
>
<span class='fa fa-credit-card'></span>
&nbsp;
Expand Down

0 comments on commit 01b5104

Please sign in to comment.