{namespace bitbucket.component.branchSelector}
Renders a full AUI form field with label, hidden input, and BranchSelector. The hidden input is automatically populated when users interact with the paired BranchSelector.
Non repository-hook users of this field will need to add a plugin dependency to com.atlassian.stash.stash-web-api:branch-selector-field to ensure required components are loaded.
{template .field}
{call widget.aui.form.field}
{param id: $id ? $id : $name /}
{param labelContent}{$labelText}{/param}
{param required : $isRequired /}
{param input}
{call .input}
{param id: $id /}
{param name: $name /}
{param initialValue: $initialValue /}
{param showTags: $showTags /}
{/call}
{/param}
{param errors: $errorTexts /}
{param description: $descriptionText /}
{/call}
{/template}
Renders a hidden input and BranchSelector. The input will be automatically populated when users interact with the paired BranchSelector.
{template .input}
<div class="branch-selector-input">
{call stash.feature.repository.revisionReferenceSelectorTriggerWithField}
{param id: ($id ? $id : $name) + '-trigger' /}
{param fieldId: $id ? $id : $name /}
{param fieldName: $name ? $name : $id /}
{param extraClasses: 'branch-selector-field' /}
{/call}
<a class="remove-link{if not $initialValue} hidden{/if}" href="#">
{getText('stash.web.branch.selector.remove.branch')}
</a>
<script>eve('stash.widget.branchselector.inputAdded', null, '{$id ? $id : $name|escapeJs}', {lb}
"showTags" : {not not $showTags}{if $initialValue},
"revisionId": '{$initialValue}'{/if}
{rb});</script>
</div>
{/template}