<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}
$upload_options = SFTCY_Wordform::wordform_settings_page_upload_config();
// print_r( $upload_options );
?>
<div class="sc-wordform-setting-page-general-tab-table-wrapper">
	<form enctype="multipart/form-data" method="post" id="scWordformSettingsUploadTabForm">
		<table>
			<tbody>

				<!-- Upload: Max Number Of Files Allowed -->
				<tr>
					<td>
						<h4><?php esc_html_e( 'Max Number Of Files Limit', 'wordform-pro' ); ?></h4>
					</td>
					<td>   	
						<div class="wordform-upload-input-element-wrapper-div">
							<input type="text" name="sc-wordform-upload-max-numof-files" class="sc-wordform-upload-max-numof-files" value="<?php echo esc_attr( $upload_options['max_num_files_allowed'] ); ?>" readonly />				    
						</div>
						<p class="sc-wordform-upload-max-numof-files-slider"></p>
						<small><i class="fa-solid fa-circle-info setting-upload-tab-page-info-icon"></i> <?php echo wp_kses( sprintf( 'Your hosted server allowing maximum<strong class="wordform-server-upload-limit-info"> %d files </strong> to upload at a time.', $upload_options['server_max_num_files_allowed'] ), array( 'strong' => array( 'class' => array() ) ), 'wordform-pro' ); ?></small>
					</td>   				
				</tr>
                <!-- Upload: Each File Max Size Allowed -->
				<tr>
					<td>
						<h4><?php esc_html_e( 'Each File Max Size Limit( MB )', 'wordform-pro' ); ?></h4>
					</td>
					<td>   	
						<div class="wordform-upload-input-element-wrapper-div">
							<input type="text" name="sc-wordform-upload-each-file-max-size" class="sc-wordform-upload-each-file-max-size" value="<?php echo esc_attr( $upload_options['each_file_max_size_allowed'] ); ?>" readonly />				    
						</div>	
						<p class="sc-wordform-upload-each-file-max-size-slider"></p>
						<small><i class="fa-solid fa-circle-info setting-upload-tab-page-info-icon"></i> <?php echo wp_kses( sprintf( 'Your hosted server allowing maximum<strong class="wordform-server-upload-limit-info"> %d MB </strong>to upload for each file size limit.', $upload_options['server_each_file_max_size_allowed'] ), array( 'strong' => array( 'class' => array() ) ), 'wordform-pro' ); ?></small>
					</td>   				
				</tr>
				<!-- Upload: All Files Max Size Allowed -->
				<tr>
					<td>
						<h4><?php esc_html_e( 'All Files Max Size Limit( MB )', 'wordform-pro' ); ?></h4>
					</td>
					<td>   	
						<div class="wordform-upload-input-element-wrapper-div">
							<input type="text" name="sc-wordform-upload-all-files-max-size" class="sc-wordform-upload-all-files-max-size" value="<?php echo esc_attr( $upload_options['all_files_max_size_allowed'] ); ?>" readonly />				    
						</div>
						<p class="sc-wordform-upload-all-files-max-size-slider"></p>
						<small><i class="fa-solid fa-circle-info setting-upload-tab-page-info-icon"></i> <?php echo wp_kses( sprintf( 'Your hosted server allowing maximum<strong class="wordform-server-upload-limit-info"> %d MB </strong>for all files size to upload at a time.', $upload_options['server_all_files_max_size_allowed'] ), array( 'strong' => array( 'class' => array() ) ), 'wordform-pro' ); ?></small>
					</td>   				
				</tr>

				<!-- Upload : Show / Hide Uploading Progress Bar -->
				<tr>
					<td>
						<h4><?php esc_html_e( 'Show Upload Progress Bar', 'wordform-pro' ); ?></h4>   					
					</td>
					<td>   	
						<input type="checkbox" id="scWordformUploadProgressBarShowHide" class="sc-wordform-upload-progress-bar-show-hide" name="sc-wordform-upload-progress-bar-show-hide" <?php checked( 'yes', $upload_options['wordform_upload_show_hide_progress_bar'] ); ?> >
						<label for="scWordformUploadProgressBarShowHide"><?php esc_html_e( 'Show Uploading Progress Bar', 'wordform-pro' ); ?></label><br/>&nbsp;&nbsp;&nbsp;&nbsp;
						<small><?php esc_html_e( 'If checked then uploading progress bar with percentage values will be shown. Better to keep it active so users can understand large files uploading status.', 'wordform-pro' ); ?></small>
					</td>   				
				</tr>

				<!-- Upload: Progress Bar Color -->
				<tr>
					<td>
						<h4><?php esc_html_e( 'Uploading Progress Bar Color', 'wordform-pro' ); ?></h4>   					
					</td>
					<td>   	
						<input type="text" value="<?php echo esc_attr( $upload_options['wordform_upload_progress_bar_color'] ); ?>" class="sc-wordform-upload-progress-bar-color" name="sc-wordform-upload-progress-bar-color" >						
					</td>   				
				</tr>


				<tr>
					<td>
						<button type="submit" class="button button-primary button-large"><?php esc_html_e( 'Save', 'wordform-pro' ); ?></button>
						&nbsp;&nbsp;&nbsp;&nbsp;
						<button type="button" class="button button-primary button-large sc-wordform-settings-upload-tab-reset"><?php esc_html_e( 'Reset', 'wordform-pro' ); ?></button>
					</td>
					<td class="sc-wordform-upload-tab-update-info"></td>
				</tr>

			</tbody>
		</table>  
	</form>
</div>
