Template_Tag_Text_Field::print_single_input_template()

Prints a single input template.

Description

Source

File: src/components/template-tag-text-field.php

	protected function print_single_input_template() {
		?>
		<input type="<?php echo esc_attr( $this->type ); ?>"{{{ _.attrs( data.inputAttrs ) }}} value="{{ data.currentValue }}">
		<div class="template-tag-list-wrap">
			<button type="button" class="template-tag-list-toggle button" aria-controls="{{ data.inputAttrs.id }}-template-tag-list" aria-expanded="false">
				<span aria-hidden="true">+</span>
				<span class="screen-reader-text"><?php _e( 'Insert template tag', 'torro-forms' ); ?></span>
			</button>
			<ul id="{{ data.inputAttrs.id }}-template-tag-list" class="template-tag-list" role="region" tabindex="-1">
				<# _.each( data.templateTags, function( groupData, groupSlug ) { #>
					<li class="template-tag-list-group template-tag-list-group-{{ groupSlug }}">
						<span>{{ groupData.label }}</span>
						<ul>
							<# _.each( groupData.tags, function( tagLabel, tagSlug ) { #>
								<li class="template-tag">
									<button type="button" class="template-tag-button" data-tag="{{ tagSlug }}">
										{{ tagLabel }}
									</button>
								</li>
							<# } ) #>
						</ul>
					</li>
				<# } ) #>
			</ul>
		</div>
		<?php
		$this->print_repeatable_remove_button_template();
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.