| @@ -18,13 +18,19 @@ | ||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | $styles = $frm_style->get_all(); |
| 21 | 21 | $default_style = $frm_style->get_default_style( $styles ); |
| 22 | -$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 23 | -$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 24 | 22 | $pro_is_installed = FrmAppHelper::pro_is_installed(); |
| 25 | -$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 26 | 23 | |
| 24 | +if ( ! $pro_is_installed && $default_style ) { | |
| 25 | + // Per-form styles are a Pro feature, so only the default style is ever used without Pro. | |
| 26 | + $styles = array( $default_style->ID => $default_style ); | |
| 27 | +} | |
| 28 | + | |
| 29 | +$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 30 | +$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 31 | +$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 32 | + | |
| 27 | 33 | ?> |
| 28 | 34 | .with_frm_style{ |
| 29 | 35 | <?php FrmStylesHelper::output_vars( $defaults ); ?> |
| 30 | 36 | } |
| @@ -568,9 +574,8 @@ | ||
| 568 | 574 | <?php } else { ?> |
| 569 | 575 | padding:5px; |
| 570 | 576 | <?php } ?> |
| 571 | 577 | <?php if ( ! empty( $defaults['border_radius'] ) ) { ?> |
| 572 | - border-radius:<?php echo esc_html( $defaults['border_radius'] . $important ); ?>; | |
| 573 | 578 | border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; |
| 574 | 579 | <?php } ?> |
| 575 | 580 | <?php if ( ! empty( $defaults['submit_font_size'] ) ) { ?> |
| 576 | 581 | font-size: var(--submit-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -1357,105 +1362,8 @@ | ||
| 1357 | 1362 | .frm_grid .frm_checkbox, |
| 1358 | 1363 | .frm_grid_first .frm_checkbox, |
| 1359 | 1364 | .frm_grid_odd .frm_checkbox{ |
| 1360 | 1365 | display:inline; |
| 1361 | -} | |
| 1362 | - | |
| 1363 | -.frm_grid_2 .frm_radio, | |
| 1364 | -.frm_grid_2 .frm_checkbox, | |
| 1365 | -.frm_grid_2 .frm_primary_label{ | |
| 1366 | - width:48% !important; | |
| 1367 | -} | |
| 1368 | - | |
| 1369 | -.frm_grid_2 .frm_radio, | |
| 1370 | -.frm_grid_2 .frm_checkbox{ | |
| 1371 | - margin-right:4%; | |
| 1372 | -} | |
| 1373 | - | |
| 1374 | -.frm_grid_3 .frm_radio, | |
| 1375 | -.frm_grid_3 .frm_checkbox, | |
| 1376 | -.frm_grid_3 .frm_primary_label{ | |
| 1377 | - width:30% !important; | |
| 1378 | -} | |
| 1379 | - | |
| 1380 | -.frm_grid_3 .frm_radio, | |
| 1381 | -.frm_grid_3 .frm_checkbox{ | |
| 1382 | - margin-right:3%; | |
| 1383 | -} | |
| 1384 | - | |
| 1385 | -.frm_grid_4 .frm_radio, | |
| 1386 | -.frm_grid_4 .frm_checkbox{ | |
| 1387 | - width:20% !important; | |
| 1388 | -} | |
| 1389 | - | |
| 1390 | -.frm_grid_4 .frm_primary_label{ | |
| 1391 | - width:28% !important; | |
| 1392 | -} | |
| 1393 | - | |
| 1394 | -.frm_grid_4 .frm_radio, | |
| 1395 | -.frm_grid_4 .frm_checkbox{ | |
| 1396 | - margin-right:4%; | |
| 1397 | -} | |
| 1398 | - | |
| 1399 | -.frm_grid_5 .frm_primary_label, | |
| 1400 | -.frm_grid_7 .frm_primary_label{ | |
| 1401 | - width:24% !important; | |
| 1402 | -} | |
| 1403 | - | |
| 1404 | -.frm_grid_5 .frm_radio, | |
| 1405 | -.frm_grid_5 .frm_checkbox{ | |
| 1406 | - width:17% !important; | |
| 1407 | - margin-right:2%; | |
| 1408 | -} | |
| 1409 | - | |
| 1410 | -.frm_grid_6 .frm_primary_label{ | |
| 1411 | - width:25% !important; | |
| 1412 | -} | |
| 1413 | - | |
| 1414 | -.frm_grid_6 .frm_radio, | |
| 1415 | -.frm_grid_6 .frm_checkbox{ | |
| 1416 | - width:14% !important; | |
| 1417 | - margin-right:1%; | |
| 1418 | -} | |
| 1419 | - | |
| 1420 | -.frm_grid_7 .frm_primary_label{ | |
| 1421 | - width:22% !important; | |
| 1422 | -} | |
| 1423 | - | |
| 1424 | -.frm_grid_7 .frm_radio, | |
| 1425 | -.frm_grid_7 .frm_checkbox{ | |
| 1426 | - width:12% !important; | |
| 1427 | - margin-right:1%; | |
| 1428 | -} | |
| 1429 | - | |
| 1430 | -.frm_grid_8 .frm_primary_label{ | |
| 1431 | - width:23% !important; | |
| 1432 | -} | |
| 1433 | - | |
| 1434 | -.frm_grid_8 .frm_radio, | |
| 1435 | -.frm_grid_8 .frm_checkbox{ | |
| 1436 | - width:10% !important; | |
| 1437 | - margin-right:1%; | |
| 1438 | -} | |
| 1439 | - | |
| 1440 | -.frm_grid_9 .frm_primary_label{ | |
| 1441 | - width:20% !important; | |
| 1442 | -} | |
| 1443 | - | |
| 1444 | -.frm_grid_9 .frm_radio, | |
| 1445 | -.frm_grid_9 .frm_checkbox{ | |
| 1446 | - width:9% !important; | |
| 1447 | - margin-right:1%; | |
| 1448 | -} | |
| 1449 | - | |
| 1450 | -.frm_grid_10 .frm_primary_label{ | |
| 1451 | - width:19% !important; | |
| 1452 | -} | |
| 1453 | - | |
| 1454 | -.frm_grid_10 .frm_radio, | |
| 1455 | -.frm_grid_10 .frm_checkbox{ | |
| 1456 | - width:8% !important; | |
| 1457 | - margin-right:1%; | |
| 1458 | 1366 | } |
| 1459 | 1367 | |
| 1460 | 1368 | .frm_form_field.frm_inline_container .frm_opt_container, |
| 1461 | 1369 | .frm_form_field.frm_right_container .frm_opt_container, |