Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:aimakun/paypal_donate

  • Loading branch information...
commit 8221b2f61f4871c53b35b27e1ae77c81daf83ebb 2 parents d0f03c5 + 807eff9
@noomz noomz authored
Showing with 22 additions and 0 deletions.
  1. +11 −0 .project
  2. +11 −0 paypal_donate.module
View
11 .project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>paypal_donate</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
View
11 paypal_donate.module
@@ -41,7 +41,14 @@ function paypal_donate_block($op = 'list', $delta = 0, $edit = array()) {
}
return $blocks;
break;
+ case 'configure':
+ $form['paypal_donate']['node_link'] = array(
+ '#type' => 'item',
+ '#title' => t('Paypal donate'),
+ '#value' => '<div>' . t('To edit any paypal settings, go to !node_edit', array('!node_edit' => l(t('this node edit page'), 'node/' . arg(5) . '/edit'))) . '</div>',
+ );
+ return $form;
case 'view':
$nodes = variable_get('paypal_donate_block', array());
if (isset($nodes[$delta])) {
@@ -196,6 +203,10 @@ function paypal_donate_form(&$node) {
'#options' => array(1 => t('Enable'), 0 => t('Disable')),
);
+ if (user_access('administer blocks')) {
+ $form['paypal_donate']['donate_block']['#description'] = t('for edit block settings, go to !block_link', array('!block_link' => l(t('block configure page'), 'admin/build/block/configure/paypal_donate/' . arg(1))));
+ }
+
return $form;
}
Please sign in to comment.
Something went wrong with that request. Please try again.