Inventory_Presser_Admin_Location_Meta::add_location_fields()
Outputs fields that are added to the add term page.
Return Return
(void)
Source Source
File: includes/admin/class-admin-location-meta.php
public function add_location_fields() {
?><div class="form-field term-group location-tax">
<div class="form-wrap form-field">
<label><?php esc_html_e( 'Street Address', 'inventory-presser' ); ?></label>
<input type="text" name="address_street" />
</div>
<div class="form-wrap form-field">
<label><?php esc_html_e( 'Street Address line two', 'inventory-presser' ); ?></label>
<input type="text" name="address_street_line_two" />
</div>
<div class="form-wrap form-field">
<label><?php esc_html_e( 'City', 'inventory-presser' ); ?></label>
<input type="text" name="address_city" />
</div>
<div class="form-wrap form-field">
<label><?php esc_html_e( 'State', 'inventory-presser' ); ?></label>
<input type="text" name="address_state" />
</div>
<div class="form-wrap form-field">
<label><?php esc_html_e( 'Zip', 'inventory-presser' ); ?></label>
<input type="text" name="address_zip" />
</div>
<div class="form-wrap form-field">
<label><?php esc_html_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 esc_attr_e( 'Label', 'inventory-presser' ); ?>" />
<input type="text" name="phone_number[]" placeholder="<?php esc_attr_e( 'Number', 'inventory-presser' ); ?>" required />
</div>
<div class="repeat-buttons">
<span class="dashicons dashicons-menu repeat-move" title="<?php esc_attr_e( 'Drag to reposition', 'inventory-presser' ); ?>"></span>
<span class="dashicons dashicons-trash repeat-delete" title="<?php esc_attr_e( 'Delete this phone number', 'inventory-presser' ); ?>"></span>
</div>
</div>
<button type="button" class="repeat-add button action"><?php esc_html_e( 'Add Phone Number', 'inventory-presser' ); ?></button>
</div>
</div>
<div class="form-wrap form-field">
<label><?php esc_html_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 esc_attr_e( 'Title', 'inventory-presser' ); ?>" />
<table class="wp-list-table widefat fixed striped hours">
<thead>
<th class="day-col"></th>
<th><?php esc_html_e( 'Open', 'inventory-presser' ); ?></th>
<th class="to-col"></th>
<th><?php esc_html_e( 'Close', 'inventory-presser' ); ?></th>
<th><abbr title="<?php esc_attr_e( 'Appointment', 'inventory-presser' ); ?>"><?php esc_html_e( 'Appt', 'inventory-presser' ); ?></abbr> <?php echo esc_html_e( 'Only', 'inventory-presser' ); ?></th>
</thead>
<tbody>
<?php
foreach ( array_keys( INVP::weekdays() ) as $index => $day ) {
?>
<tr>
<th><?php echo esc_html( ucfirst( $day ) ); ?></th>
<td><input name="hours[<?php echo esc_attr( $index ); ?>][open][]" class="timepick" type="text"></td>
<th>to</th>
<td><input name="hours[<?php echo esc_attr( $index ); ?>][close][]" class="timepick" type="text"></td>
<td>
<select name="hours[<?php echo esc_attr( $index ); ?>][appt][]">
<option value="0"><?php esc_html_e( 'No', 'inventory-presser' ); ?></option>
<option value="1"><?php esc_html_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 esc_attr_e( 'Drag to reposition', 'inventory-presser' ); ?>"></span>
<span class="dashicons dashicons-trash repeat-delete" title="<?php esc_attr_e( 'Delete this set of hours', 'inventory-presser' ); ?>"></span>
</div>
</div>
<p class="description"><?php esc_html_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 esc_html_e( 'Add Hours Block', 'inventory-presser' ); ?></button></p>
</div>
</div>
</div>
<?php
}
Expand full source codeCollapse full source codeView on Github