Skip to content

Commit

Permalink
Merge pull request #14161 from eileenmcnaughton/really
Browse files Browse the repository at this point in the history
Convert dedupe select to select 2 and remove not-used var
  • Loading branch information
colemanw authored Apr 30, 2019
2 parents d34d7df + 8810308 commit 126d764
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions CRM/Contact/Form/DedupeRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,16 @@ public function buildQuickForm() {
);

$this->addField('used', ['label' => ts('Usage')], TRUE);
$disabled = [];
$reserved = $this->addField('is_reserved', ['label' => ts('Reserved?')]);
if (!empty($this->_defaults['is_reserved'])) {
$reserved->freeze();
}

$attributes = ['class' => 'two'];
if (!empty($disabled)) {
$attributes = array_merge($attributes, $disabled);
}

for ($count = 0; $count < self::RULES_COUNT; $count++) {
$this->add('select', "where_$count", ts('Field'),
[
NULL => ts('- none -'),
] + $this->_fields, FALSE, $disabled
$this->_fields, FALSE, ['class' => 'crm-select2', 'placeholder' => ts('Select Field')]
);
$this->addField("length_$count", ['entity' => 'Rule', 'name' => 'rule_length'] + $attributes);
$this->addField("weight_$count", ['entity' => 'Rule', 'name' => 'rule_weight'] + $attributes);
Expand Down

0 comments on commit 126d764

Please sign in to comment.