CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Block Editing/Deleting a Contributions after adding to batch
Pages: [1]

Author Topic: Block Editing/Deleting a Contributions after adding to batch  (Read 616 times)

Rajesh

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 10
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x
  • CMS version: Drupal 7.xx, Wordpress 3.5.x - 3.6.x, Joomla 3.1
  • MySQL version: 5.5.20
  • PHP version: 5.3.10
Block Editing/Deleting a Contributions after adding to batch
January 10, 2011, 06:44:21 am
Hello everyone,

We are using GiftAid module for one of our clients and it works great.

But the problem is, after adding a contribution to batch we are able to edit or delete the contribution. I tried to disable the edit and delete buttons/links in all relevant pages by copying the appropriate templates and php files to the custom folders, but still the edit and delete links are displaying for the contributions on the left panel 'Recent Items' block. At present we are much concerned about blocking deletion of the batched contributions.

Is there other ways to block/disable deletion of the batched contributions?

I tried using hook_civicrm_pre, but it doesnt allow me to abort the delete operation.

I would appreciate any advice.

Thanks

- Rajesh

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Block Editing/Deleting a Contributions after adding to batch
January 10, 2011, 02:17:44 pm

how about using

hook_civicrm_buildForm

for the contribution form and abort if the user is trying to edit / delete a "gift-aid" contribution

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Rajesh

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 10
  • CiviCRM version: 4.2.x, 4.3.x, 4.4.x
  • CMS version: Drupal 7.xx, Wordpress 3.5.x - 3.6.x, Joomla 3.1
  • MySQL version: 5.5.20
  • PHP version: 5.3.10
Re: Block Editing/Deleting a Contributions after adding to batch
January 11, 2011, 05:19:54 am
Hi Lobo,

Thanks for the suggestion. It worked great!

- Rajesh

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Block Editing/Deleting a Contributions after adding to batch

This forum was archived on 2017-11-26.