-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8708266
commit 191411f
Showing
19 changed files
with
1,798 additions
and
552 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?php | ||
/** | ||
* Provide a admin area view for the plugin | ||
* | ||
* This file is used from markup the admin-facing aspects of the plugin. | ||
* | ||
* @link https://wpswings.com/ | ||
* @since 1.0.0 | ||
* | ||
* @package Mwb_Bookings_For_Woocommerce | ||
* @subpackage Mwb_Bookings_For_Woocommerce/admin/partials | ||
*/ | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit(); // Exit if accessed directly. | ||
} | ||
$wps_mbfw_field_data = get_post_meta(get_the_ID(), 'wps_mbfw_time_slots', true ); | ||
|
||
?> | ||
<div id="wps_mbfw_add_fields_wrapper"> | ||
<div class="wps_mbfw_add_fields_title"> | ||
<h2> | ||
<strong class="attribute_name"><?php esc_html_e( 'Set Daily time slots', 'event-tickets-manager-for-woocommerce' ); ?></strong></h2> | ||
</div> | ||
<div class="wps_mbfw_add_fields_data"> | ||
<div class="wps_mbfw_fields_panel"> | ||
<table class="field-options wp-list-table widefat wps_mbfw_field_table"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th class="mbfw_field_from"><?php esc_html_e( 'From', 'event-tickets-manager-for-woocommerce' ); ?></th> | ||
<th class="mbfw_field_to"><?php esc_html_e( 'To', 'event-tickets-manager-for-woocommerce' ); ?></th> | ||
<th class="etmfw_field_actions"><?php esc_html_e( 'Actions', 'event-tickets-manager-for-woocommerce' ); ?></th> | ||
</tr> | ||
</thead> | ||
<tbody class="wps_mbfw_field_body"> | ||
<?php if ( empty( $wps_mbfw_field_data ) ) : ?> | ||
<tr class="wps_mbfw_field_wrap" data-id="0"> | ||
<td class="drag-icon"> | ||
<i class="dashicons dashicons-move"></i> | ||
</td> | ||
<td class="form-field wps_mbfw_from_fields"> | ||
<input type="text" class="wps_mbfw_field_from" style="" name="mbfw_fields[0][_from]" id="from_fields_0" value="" placeholder=""> | ||
</td> | ||
|
||
<td class="form-field wps_mbfw_to_fields"> | ||
<input type="text" class="wps_mbfw_field_to" style="" name="mbfw_fields[0][_to]" id="to_fields_0"> | ||
</td> | ||
<td class="wps_mbfw_remove_row"> | ||
<input type="button" name="wps_mbfw_remove_fields_button" class="wps_mbfw_remove_row_btn" value="Remove"> | ||
</td> | ||
</tr> | ||
<?php | ||
else : | ||
foreach ( $wps_mbfw_field_data as $row_id => $row_value ) : | ||
|
||
?> | ||
<tr class="wps_mbfw_field_wrap" data-id="<?php echo esc_attr( $row_id ); ?>"> | ||
<td class="drag-icon"> | ||
<i class="dashicons dashicons-move"></i> | ||
</td> | ||
<td class="form-field wps_mbfw_from_fields"> | ||
<input type="text" class="wps_mbfw_field_from" style="" name="mbfw_fields[<?php echo esc_attr( $row_id ); ?>][_from]" id="from_fields_<?php echo esc_attr( $row_id ); ?>" value="<?php echo esc_attr( $row_value['_from'] ); ?>" placeholder=""> | ||
</td> | ||
<td class="form-field wps_mbfw_to_fields"> | ||
<input type="text" class="wps_mbfw_field_to" style="" name="mbfw_fields[<?php echo esc_attr( $row_id ); ?>][_to]" id="to_fields_<?php echo esc_attr( $row_id ); ?>" value="<?php echo esc_attr( $row_value['_to'] ); ?>"> | ||
</td> | ||
<td class="wps_mbfw_remove_row"> | ||
<input type="button" name="wps_mbfw_remove_fields_button" class="wps_mbfw_remove_row_btn" value="Remove"> | ||
</td> | ||
</tr> | ||
<?php endforeach; ?> | ||
<?php endif; ?> | ||
</tbody> | ||
<tfoot> | ||
<tr> | ||
<td colspan="5"> | ||
<input type="button" name="wps_mbfw_add_fields_button" class="button wps_mbfw_add_fields_button" value="<?php esc_attr_e( 'Add More', 'event-tickets-manager-for-woocommerce' ); ?>"> | ||
</td> | ||
</tr> | ||
</tfoot> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<?php |
Oops, something went wrong.