| 1 |
<form method="post" onsubmit="return !!document.querySelector('.wpf-opt-row-imp-exp .wpf-opt-checkbox-wrap input:checked')" enctype="multipart/form-data"> |
| 2 |
<input type="hidden" name="wpfaction" value="settings_import"> |
| 3 |
<?php wp_nonce_field( "wpforo_settings_import" ); ?> |
| 4 |
|
| 5 |
<div class="wpf-opt-row"> |
| 6 |
<div class="wpf-opt-intro"> |
| 7 |
<svg height="50" width="50" viewBox="0 0 384 512"> |
| 8 |
<path fill="currentColor" |
| 9 |
d="m149.9 349.1l-.2-.2l-32.8-28.9l32.8-28.9c3.6-3.2 4-8.8.8-12.4l-.2-.2l-17.4-18.6c-3.4-3.6-9-3.7-12.4-.4l-57.7 54.1c-3.7 3.5-3.7 9.4 0 12.8l57.7 54.1c1.6 1.5 3.8 2.4 6 2.4c2.4 0 4.8-1 6.4-2.8l17.4-18.6c3.3-3.5 3.1-9.1-.4-12.4m220-251.2L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34M256 51.9l76.1 76.1H256zM336 464H48V48h160v104c0 13.3 10.7 24 24 24h104zM209.6 214c-4.7-1.4-9.5 1.3-10.9 6L144 408.1c-1.4 4.7 1.3 9.6 6 10.9l24.4 7.1c4.7 1.4 9.6-1.4 10.9-6L240 231.9c1.4-4.7-1.3-9.6-6-10.9zm24.5 76.9l.2.2l32.8 28.9l-32.8 28.9c-3.6 3.2-4 8.8-.8 12.4l.2.2l17.4 18.6c3.3 3.5 8.9 3.7 12.4.4l57.7-54.1c3.7-3.5 3.7-9.4 0-12.8l-57.7-54.1c-3.5-3.3-9.1-3.2-12.4.4l-17.4 18.6c-3.3 3.5-3.1 9.1.4 12.4"></path> |
| 10 |
</svg> |
| 11 |
<?php _e( 'It allows users to import the configuration and settings data of the wpForo from already exported JSON file.', 'wpforo' ) ?> |
| 12 |
</div> |
| 13 |
</div> |
| 14 |
|
| 15 |
<div class="wpf-opt-row wpf-opt-row-imp-exp"> |
| 16 |
<div class="wpf-opt-input"> |
| 17 |
<div class="wpf-opt-checkbox-wrap"> |
| 18 |
<input id="all" type="checkbox" checked> |
| 19 |
<label for="all" class="wpf-label"><?php _e( 'All', 'wpforo' ) ?></label> |
| 20 |
</div> |
| 21 |
</div> |
| 22 |
</div> |
| 23 |
|
| 24 |
<div class="wpf-subtitle"> |
| 25 |
<span class="dashicons dashicons-admin-links"></span> <?php _e( 'Base Settings', 'wpforo' ) ?> |
| 26 |
</div> |
| 27 |
|
| 28 |
<div class="wpf-opt-row wpf-opt-row-imp-exp"> |
| 29 |
<div class="wpf-opt-input"> |
| 30 |
|
| 31 |
<?php |
| 32 |
foreach( WPF()->settings->info->core as $group => $info ) { |
| 33 |
if( wpfval( $info, 'base' ) ) { |
| 34 |
printf( |
| 35 |
'<div class="wpf-opt-checkbox-wrap"> |
| 36 |
<input id="%1$s" type="checkbox" name="groups[]" value="%3$s" checked/> |
| 37 |
<label for="%1$s" class="wpf-label">%2$s</label> |
| 38 |
</div>', |
| 39 |
"wpf-chk-group-$group", |
| 40 |
$info['title'], |
| 41 |
$group |
| 42 |
); |
| 43 |
} |
| 44 |
} |
| 45 |
?> |
| 46 |
|
| 47 |
</div> |
| 48 |
</div> |
| 49 |
|
| 50 |
<div class="wpf-subtitle"> |
| 51 |
<span class="dashicons dashicons-admin-links"></span> <?php _e( 'Board Settings', 'wpforo' ) ?> |
| 52 |
</div> |
| 53 |
|
| 54 |
<div class="wpf-opt-row wpf-opt-row-imp-exp"> |
| 55 |
<div class="wpf-opt-input"> |
| 56 |
|
| 57 |
<?php |
| 58 |
foreach( WPF()->settings->info->core as $group => $info ) { |
| 59 |
if( ! wpfval( $info, 'base' ) ) { |
| 60 |
printf( |
| 61 |
'<div class="wpf-opt-checkbox-wrap"> |
| 62 |
<input id="%1$s" type="checkbox" name="groups[]" value="%3$s" checked/> |
| 63 |
<label for="%1$s" class="wpf-label">%2$s</label> |
| 64 |
</div>', |
| 65 |
"wpf-chk-group-$group", |
| 66 |
$info['title'], |
| 67 |
$group |
| 68 |
); |
| 69 |
} |
| 70 |
} |
| 71 |
?> |
| 72 |
|
| 73 |
</div> |
| 74 |
</div> |
| 75 |
|
| 76 |
<div class="wpf-subtitle"> |
| 77 |
<span class="dashicons dashicons-admin-links"></span> <?php _e( 'Choose to Upload JSON file.', 'wpforo' ) ?> |
| 78 |
</div> |
| 79 |
|
| 80 |
<div class="wpf-opt-row wpf-opt-row-imp-exp"> |
| 81 |
<div class="wpf-opt-input"> |
| 82 |
<input type="file" name="wpfsimpjson" accept=".json" required/> |
| 83 |
</div> |
| 84 |
</div> |
| 85 |
|
| 86 |
<div class="wpf-opt-row" style="display: flex; justify-content: space-between; align-items: center;"> |
| 87 |
<span style="color: darkorange; font-style: italic;"><?php _e( 'One or more checkboxes must be selected.', 'wpforo' ) ?></span> |
| 88 |
<input type="submit" value="<?php _e( 'Import JSON File', 'wpforo' ) ?>" class="button-primary" title="<?php _e( 'One or more checkboxes must be selected.', 'wpforo' ) ?>"> |
| 89 |
</div> |
| 90 |
</form> |
| 91 |
|