if (!$this->_isTagSet) {
$this->add('select', 'parent_id', ts('Parent Tag'), $allTag, FALSE, array('class' => 'crm-select2'));
+
+ // Tagsets are not selectable by definition so only include the selectable field if NOT a tagset.
+ $selectable = $this->add('checkbox', 'is_selectable', ts('Selectable?'));
+ // Selectable should be checked by default when creating a new tag
+ if ($this->_action == CRM_Core_Action::ADD) {
+ $selectable->setValue(1);
+ }
+
}
$this->assign('isTagSet', $this->_isTagSet);
CRM_Core_DAO::getAttribute('CRM_Core_DAO_Tag', 'description')
);
- $selectable = $this->add('checkbox', 'is_selectable', ts('Selectable?'));
- // Selectable should be checked by default when creating a new tag
- if ($this->_action == CRM_Core_Action::ADD) {
- $selectable->setValue(1);
- }
-
$isReserved = $this->add('checkbox', 'is_reserved', ts('Reserved?'));
$usedFor = $this->addSelect('used_for', array('multiple' => TRUE, 'option_url' => NULL));
*}
{* this template is used for adding/editing a tag (admin) *}
<div class="crm-block crm-form-block crm-tag-form-block">
- {if $action eq 1 or $action eq 2 }
+ {if $action eq 1 or $action eq 2 }
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
<tr class="crm-tag-form-block-label">
</tr>
{if $form.parent_id.html}
<tr class="crm-tag-form-block-parent_id">
- <td class="label">{$form.parent_id.label}</td>
- <td>{$form.parent_id.html}</td>
+ <td class="label">{$form.parent_id.label}</td>
+ <td>{$form.parent_id.html}</td>
</tr>
{/if}
<tr class="crm-tag-form-block-used_for">
<td class="label">{$form.used_for.label}</td>
- <td>{$form.used_for.html} <br />
- <span class="description">
- {if $is_parent}{ts}You can change the types of records which this tag can be used for by editing the 'Parent' tag.{/ts}
- {else}{ts}What types of record(s) can this tag be used for?{/ts}
- {/if}
- </span>
+ <td>{$form.used_for.html} <br />
+ <span class="description">
+ {if $is_parent}{ts}You can change the types of records which this tag can be used for by editing the 'Parent' tag.{/ts}
+ {else}{ts}What types of record(s) can this tag be used for?{/ts}
+ {/if}
+ </span>
</td>
</tr>
<tr class="crm-tag-form-block-is_reserved">
<td>{$form.is_reserved.html} <br /><span class="description">{ts}Reserved tags can not be deleted. Users with 'administer reserved tags' permission can set or unset the reserved flag. You must uncheck 'Reserved' (and delete any child tags) before you can delete a tag.{/ts}
</td>
</tr>
- <tr class="crm-tag-form-block-is_slectable">
- <td class="label">{$form.is_selectable.label}</td>
- <td>{$form.is_selectable.html}<br /><span class="description">{ts}Defines if you can select this tag.{/ts}
- </td>
- </tr>
+ {if ! $isTagSet} {* Tagsets are not selectable by definition, so exclude this field for tagsets *}
+ <tr class="crm-tag-form-block-is_slectable">
+ <td class="label">{$form.is_selectable.label}</td>
+ <td>{$form.is_selectable.html}<br /><span class="description">{ts}Defines if you can select this tag.{/ts}
+ </td>
+ </tr>
+ {/if}
</table>
{if $parent_tags|@count > 0}
<table class="form-layout-compressed">