Closed (fixed)
Project:
Commerce Discount
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Sep 2015 at 15:39 UTC
Updated:
2 Oct 2015 at 19:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
michfuer commentedThis should take care of it. Just FYI, we are able to use the core commerce_order condition callback as the build callback, granted that we ensure the form elements in the configure callback are named the same as the parameters in the core hook_rules_condition_info().
Comment #3
joelpittetThis looks good from the code point of view. Just a couple things I spotted while reviewing:
Should be using this.
module_load_include('inc', 'commerce_order', 'commerce_order.rules');
Any reason why #description isn't used here?
Comment #4
michfuer commentedHere's the updated patch to use module_load_include().
I used '#suffix' to follow the convention of the existing configure callbacks.
Comment #5
rszrama commentedAlrighty, this checks out.
This whole part of the form is hideous, though. No fault of the current patch, but I'm going to spawn a follow-up to do something more appropriate with the theming of condition parameters than a simple "display: inline;" on all divs in the area. As this patch shows, that fails for textareas, and it's what makes the #suffix necessary vs. #description.