Inventory_Presser_Taxonomies::add_location_fields( string $taxonomy )

add_location_fields


Description Description

Outputs fields that are added to the add term page.


Top ↑

Parameters Parameters

$taxonomy

(string) (Required)


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-taxonomies.php

	function add_location_fields( $taxonomy )
	{
		?><div class="form-field term-group location-tax">
			<div class="form-wrap form-field">
				<label><?php _e( 'Phone Numbers', 'inventory-presser' ); ?></label>
				<div class="repeat-group">
					<div class="repeat-container"></div>
					<div class="repeat-this">
						<div class="repeat-form">
							<input type="text" name="phone_description[]" placeholder="<?php _e( 'Label', 'inventory-presser' ); ?>" />
							<input type="text" name="phone_number[]" placeholder="<?php _e( 'Number', 'inventory-presser' ); ?>" required />
						</div>
						<div class="repeat-buttons">
							<span class="dashicons dashicons-menu repeat-move" title="<?php _e( 'Drag to reposition', 'inventory-presser' ); ?>"></span>
							<span class="dashicons dashicons-trash repeat-delete" title="<?php _e( 'Delete this phone number', 'inventory-presser' ); ?>"></span>
						</div>
					</div>
					<button type="button" class="repeat-add button action"><?php _e( 'Add Phone Number', 'inventory-presser' ); ?></button>
				</div>
			</div>
			<div class="form-wrap form-field">
				<label><?php _e( 'Hours', 'inventory-presser' ); ?></label>
				<div class="repeat-group">
					<div class="repeat-container"></div>
					<div class="repeat-this">
						<div class="repeat-form">

						<input type="text" name="hours_title[]" placeholder="<?php _e( 'Title', 'inventory-presser' ); ?>" />

						<table class="wp-list-table widefat fixed striped hours">
							<thead>
								<th class="day-col"></th>
								<th><?php _e( 'Open', 'inventory-presser' ); ?></th>
								<th class="to-col"></th>
								<th><?php _e( 'Close', 'inventory-presser' ); ?></th>
								<th><?php _e( 'Appt Only', 'inventory-presser' ); ?></th>
							</thead>
							<tbody><?php

								foreach( array_keys( INVP::weekdays() ) as $index => $day)
								{
									?><tr>
									<th><?php echo ucfirst( $day ); ?></th>
									<td><input name="hours[<?php echo $index ?>][open][]" class="timepick" type="text"></td>
									<th>to</th>
									<td><input name="hours[<?php echo $index ?>][close][]" class="timepick" type="text"></td>
									<td>
										<select name="hours[<?php echo $index ?>][appt][]">
											<option value="0"><?php _e( 'No', 'inventory-presser' ); ?></option>
											<option value="1"><?php _e( 'Yes', 'inventory-presser' ); ?></option>
										</select>
									</td>
								</tr><?php

								}

							?></tbody>
							</table>

						</div>
						<div class="repeat-buttons">
							<span class="dashicons dashicons-menu repeat-move" title="<?php _e( 'Drag to reposition', 'inventory-presser' ); ?>"></span>
							<span class="dashicons dashicons-trash repeat-delete" title="<?php _e( 'Delete this set of hours', 'inventory-presser' ); ?>"></span>
						</div>
					</div>
					<p class="description"><?php _e( 'When saving multiple sets of hours for a single location, position the primary showroom hours first.', 'inventory-presser' ); ?></p>
					<p><button type="button" class="repeat-add button action"><?php _e( 'Add Hours Block', 'inventory-presser' ); ?></button></p>
				</div>
			</div>
		</div><?php
	}