Commit 8a322010 authored by Eric Windham's avatar Eric Windham

fixes merge conflicts

parents 16b242b7 ee2d6021
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -14,9 +14,6 @@ define( [], function() {
template: '#tmpl-nf-drawer-action-type-button',
onRender: function() {
this.$el = this.$el.children();
this.$el.unwrap();
this.setElement( this.$el );
jQuery( this.el ).disableSelection();
......@@ -52,7 +49,20 @@ define( [], function() {
if ( 'installed' == this.model.get( 'section' ) ) { // Is this an installed action?
nfRadio.channel( 'actions' ).trigger( 'click:addAction', this.model );
} else { // This isn't an installed action
window.open( this.model.get( 'link' ), '_blank' );
var modalContent = this.model.get( 'modal_content' );
var actionModal = new jBox( 'Modal', {
content: modalContent,
zIndex:99999999,
closeButton: 'box',
overlay: true,
width: 600,
repositionOnOpen: true,
reposition: true
});
actionModal.open();
// window.open( this.model.get( 'link' ), '_blank' );
}
}
},
......
......@@ -154,6 +154,7 @@ define( ['views/app/drawer/optionRepeaterError'], function( ErrorView ) {
// Select Lists need an empty '<div></div>' for styling purposes.
emptyContainer = document.createElement( 'div' );
emptyContainer.style.bottom = '6px';
label.appendChild( emptyContainer );
// The template requires a string.
......@@ -203,6 +204,7 @@ define( ['views/app/drawer/optionRepeaterError'], function( ErrorView ) {
// Select Lists need an empty '<div></div>' for styling purposes.
emptyContainer = document.createElement( 'div' );
emptyContainer.style.bottom = '6px';
label.appendChild( emptyContainer );
// The template requires a string.
......
......@@ -99,6 +99,7 @@ define([], function() {
// }
option.selected = selected;
option.isSelected = selected;
option.required = this.required;
var template = nfRadio.channel( 'app' ).request( 'get:template', '#tmpl-nf-field-listcheckbox-option' );
html += template( option );
}, this );
......
......@@ -60,6 +60,7 @@ define([], function() {
option.classes = this.classes;
option.currentValue = this.value;
option.index = index;
option.required = this.required;
/*
* If we haven't edited this field yet, use the default checked
......
......@@ -27,7 +27,7 @@ define([], function() {
if ( this.value == num ) {
checked = 'checked';
}
var htmlFragment = template( { id: this.id, classes: this.classes, num: num, checked: checked } );
var htmlFragment = template( { id: this.id, classes: this.classes, num: num, checked: checked, required: this.required } );
html.appendChild(
document.createRange().createContextualFragment( htmlFragment )
);
......
......@@ -191,6 +191,14 @@ define( [], function() {
return '';
}
},
maybeRequired: function() {
if ( 1 == this.required ) {
return 'required';
} else {
return '';
}
},
maybeDisableAutocomplete: function() {
if ( 1 == this.disable_browser_autocomplete ) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -253,6 +253,7 @@
width: 100%;
display: inline-block;
cursor: pointer;
transition: background-color 0.4s;
}
input:checked + span {
background-color: #1ea9ea;
......
......@@ -314,3 +314,39 @@
}
}
}
.available-action-modal {
padding: 20px;
img {
width: 100%;
}
iframe {
width: 100%;
height: 214px;
}
p:first-of-type {
font-size: 16px;
font-weight: bold;
line-height: 20px;
padding: 16px 40px;
text-align: center;
}
.actions {
margin-top: 30px;
&::after {
display: block;
clear: both;
content: "";
}
}
.primary.nf-button {
float: right;
}
ul {
list-style-type: disc;
li {
margin-left: 20px;
padding-left: 10px;
}
}
}
\ No newline at end of file
......@@ -234,6 +234,26 @@ jBox
}
}
/*
Progress Bar
---------------------------------------------*/
.nf-progress-bar {
height: 20px;
border-radius: 3px;
margin: 25px 0px;
border: 1px solid #1ea9ea;
position: relative;
overflow: hidden;
.nf-progress-bar-slider {
height: 20px;
width: 0%;
background-color: #1ea9ea;
transition: width 0.3s;
}
}
/*
Loading Spinner
---------------------------------------------*/
......
This diff is collapsed.
This diff is collapsed.
......@@ -14,7 +14,7 @@ class NF_AJAX_Controllers_DeleteAllData extends NF_Abstracts_Controller
global $wpdb;
$total_subs_deleted = 0;
$post_result = 0;
$max_cnt = 250;
$max_cnt = 500;
$form_id = $_POST[ 'form' ];
// SQL for getting 250 subs at a time
$sub_sql = "SELECT id FROM `" . $wpdb->prefix . "posts` AS p
......
......@@ -32,7 +32,9 @@ class NF_AJAX_REST_BatchProcess extends NF_AJAX_REST_Controller
$batch = new NF_Admin_Processes_ChunkPublish(
$request_data );
break;
case 'delete_submissions':
case 'data_cleanup':
$batch = new NF_Admin_Processes_DataCleanup(
$request_data );
break;
default:
$data[ 'error' ] = __( 'Invalid request.', 'ninja-forms' );
......
......@@ -25,6 +25,7 @@ class NF_Admin_AddFormModal {
if( ! in_array( $pagenow, array( 'post.php', 'post-new.php' ) ) ){
return $context;
}
$html = '<style>
span.nf-insert-form {
color:#888;
......@@ -50,14 +51,16 @@ class NF_Admin_AddFormModal {
<div id="nf-insert-form-modal" style="display:none;">
<p>
<?php
$all_forms = Ninja_Forms()->form()->get_forms();
$first_option = __( 'Select a form or type to search', 'ninja-forms' );
global $wpdb;
$all_forms = $wpdb->get_results( 'SELECT id, title FROM `' . $wpdb->prefix
. 'nf3_forms` ORDER BY title' );
// $all_forms = Ninja_Forms()->form()->get_forms();
// $first_option = __( 'Select a form or type to search', 'ninja-forms' );
echo '<select class="nf-forms-combobox" id="nf-form-select" data-first-option="">';
echo '<option value=""></option>';
foreach( $all_forms as $form ) {
// $form = Ninja_Forms()->form( $form_id )->get();
$label = $form->get_setting( 'title' );
$form_id = $form->get_id();
$label = $form->title;
$form_id = $form->id;
if ( strlen( $label ) > 30 )
$label = substr( $label, 0, 30 ) . '...';
......
......@@ -142,7 +142,10 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
'formTelemetry' => ( get_option( 'nf_form_tel_sent' ) ) ? 0 : 1,
'showOptin' => ( get_option( 'ninja_forms_do_not_allow_tracking' ) ||
get_option( 'ninja_forms_allow_tracking' ) ) ? 0 : 1,
'currentUserEmail' => $current_user->user_email
'currentUserEmail' => $current_user->user_email,
'doingCleanup' => ( ! get_option( 'ninja_forms_data_is_clean' ) &&
isset( $_REQUEST[ 'action' ] ) &&
'cleanup' == $_REQUEST[ 'action' ] ) ? 1 : 0,
) );
wp_enqueue_style( 'nf-builder', Ninja_Forms::$url . 'assets/css/builder.css' );
......@@ -504,6 +507,7 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
$nicename = ( isset( $action[ 'nicename' ] ) ) ? $action[ 'nicename' ] : '';
$image = ( isset( $action[ 'image' ] ) ) ? $action[ 'image' ] : '';
$link = ( isset( $action[ 'link' ] ) ) ? $action[ 'link' ] : '';
$modal_content = ( isset( $action[ 'modal_content' ] ) ) ? $action[ 'modal_content' ] : '';
if ( $u_id ) {
$last_slash = strripos( $link, '/' );
......@@ -520,6 +524,7 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
'nicename' => $nicename,
'image' => $image,
'link' => $link,
'modal_content' => $modal_content,
'settingGroups' => array(),
'settingDefaults' => array()
);
......
......@@ -159,7 +159,7 @@ final class NF_Admin_Menus_Settings extends NF_Abstracts_Submenu
wp_localize_script( 'ninja_forms_admin_menu_settings', 'nf_settings', array(
'ajax_url' => admin_url( 'admin-ajax.php' ),
'forms' => $form_options,
'nf_nuke_title' => __( 'Remove ALL Ninja Forms data upon uninstall?', 'ninja-forms' ),
'nf_nuke_title' => __( 'Remove ALL Ninja Forms data and uninstall?', 'ninja-forms' ),
'nonce' => wp_create_nonce( "ninja_forms_settings_nonce" ),
'i18n' => array(
'rollbackConfirm' => __( 'Are you sure you want to rollback?', 'ninja-forms' )
......
......@@ -158,6 +158,8 @@ final class NF_Admin_Menus_Submissions extends NF_Abstracts_Submenu
$hidden_field_types = apply_filters( 'ninja_forms_sub_hidden_field_types', array() );
foreach( $fields as $field ){
if ( is_null( $field ) ) continue;
if( in_array( $field->get_setting( 'type' ), $hidden_field_types ) ) continue;
......
......@@ -115,6 +115,7 @@ class NF_Admin_Notices
$admin_display_msg = ( isset( $admin_notices[ $slug ][ 'msg' ] ) ? $admin_notices[ $slug ][ 'msg'] : '' );
$admin_display_title = ( isset( $admin_notices[ $slug ][ 'title' ] ) ? $admin_notices[ $slug ][ 'title'] : '' );
$admin_display_link = ( isset( $admin_notices[ $slug ][ 'link' ] ) ? $admin_notices[ $slug ][ 'link' ] : '' );
$admin_can_dismiss = ( isset( $admin_notices[ $slug ][ 'dismiss' ] ) ? $admin_notices[ $slug ][ 'dismiss' ] : 1 );
$output_css = false;
// Ensure the notice hasn't been hidden and that the current date is after the start date
......@@ -135,7 +136,9 @@ class NF_Admin_Notices
echo '<ul class="nf-notice-body nf-red">
' . $admin_display_link . '
</ul>';
echo '<a href="' . wp_nonce_url( esc_attr( $query_str ) ) . '" class="dashicons dashicons-dismiss"></a>';
if ( $admin_can_dismiss ) {
echo '<a href="' . wp_nonce_url( esc_attr( $query_str ) ) . '" class="dashicons dashicons-dismiss"></a>';
}
echo '</div>';
$this->notice_spam += 1;
......
<?php if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Class NF_Abstracts_Batch_Process
*/
class NF_Admin_Processes_DataCleanup extends NF_Abstracts_BatchProcess
{
private $response = array(
'batch_complete' => false
);
protected $delete = array();
/**
* Constructor
*/
public function __construct( $data = array() )
{
//Bail if we aren't in the admin.
if ( ! is_admin() )
return false;
// Run process.
$this->process();
}
/**
* Function to loop over the batch.
*/
public function process()
{
global $wpdb;
// If we've not already started the cleanup process...
if ( ! get_option( 'nf_doing_data_cleanup' ) ) {
// Run the startup process.
$this->startup();
} // Otherwise... (We've already run startup.)
else {
// Get our data.
$data = get_option( 'nf_data_cleanup_ids' );
$this->delete = explode( ',', $data );
}
// If our array isn't emtpy...
if ( ! empty( $this->delete ) ) {
// Fetch the last item on it.
$id = array_pop( $this->delete );
// Get a list of post IDs to delete.
$sql = "SELECT DISTINCT(`id`) FROM `" . $wpdb->prefix . "posts` WHERE `id` IN( SELECT DISTINCT(`post_id`) FROM `" . $wpdb->prefix . "postmeta` WHERE `meta_key` = '_form_id' AND `meta_value` = '" . $id . "' ) AND `post_type` = 'nf_sub' LIMIT 500";
$result = $wpdb->get_results( $sql, 'ARRAY_A' );
// If we got 500 or more results...
if ( 500 == count( $result ) ) {
// Put this id back in our array to run again.
array_push( $this->delete, $id );
}
// Convert our results to something we can use in a query.
array_walk( $result, array( $this, 'smush_results' ) );
$sub_sql = implode( ', ', $result );
// If we have something to query...
if ( '' != $sub_sql ) {
// Delete postmeta data.
$sql = "DELETE FROM `" . $wpdb->prefix . "postmeta` WHERE `post_id` IN(" . $sub_sql . ")";
$wpdb->query( $sql );
// Delete post data.
$sql = "DELETE FROM `" . $wpdb->prefix . "posts` WHERE `id` IN(" . $sub_sql . ")";
$wpdb->query( $sql );
}
}
// If our array isn't empty...
if ( ! empty( $this->delete ) ) {
// Determine how many steps we have left.
$this->response[ 'step_remaining' ] = count( $this->delete );
update_option( 'nf_data_cleanup_ids', implode( ',', $this->delete ) );
echo wp_json_encode( $this->response );
wp_die();
}
// Run our cleanup process.
$this->cleanup();
echo wp_json_encode( $this->response );
wp_die();
}
/**
* Function to run any setup steps necessary to begin processing.
*/
public function startup()
{
global $wpdb;
// Get a list of IDs from the forms table.
$sql = "SELECT DISTINCT(`id`) FROM `" . $wpdb->prefix . "nf3_forms`";
$forms = $wpdb->get_results( $sql, 'ARRAY_A' );
// Get a list of IDs from the Submissions data.
$sql = "SELECT DISTINCT(m.meta_value) AS id FROM `" . $wpdb->prefix . "postmeta` AS m LEFT JOIN `" . $wpdb->prefix . "posts` AS p on p.id = m.post_id WHERE m.meta_key = '_form_id' AND p.post_type = 'nf_sub'";
$sub_forms = $wpdb->get_results( $sql, 'ARRAY_A' );
// For each form ID in the submission records...
foreach( $sub_forms AS $form ) {
// If the form is not currently defined in our forms table...
if ( ! in_array( $form, $forms ) ) {
// Add it to our list of things to delete.
$this->delete[] = $form[ 'id' ];
}
}
// Get our number of steps for the progress bar.
$this->response[ 'step_total' ] = count( $this->delete );
// Flag startup done.
add_option( 'nf_doing_data_cleanup', 'true' );
}
/**
* Function to cleanup any lingering temporary elements of a batch process after completion.
*/
public function cleanup()
{
global $wpdb;
// Delete our options.
delete_option( 'nf_data_cleanup_ids' );
delete_option( 'nf_doing_data_cleanup' );
// Add our "finished" option.
add_option( 'ninja_forms_data_is_clean', 'true' );
// Tell our JS that we're done.
$this->response[ 'step_remaining' ] = 0;
$this->response[ 'batch_complete' ] = true;
}
/**
* Function to compress data array and eliminate unnecessary keys.
*/
public function smush_results( &$value, $key ) {
$value = $value[ 'id' ];
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -74,6 +74,9 @@ return apply_filters( 'ninja_forms_i18n_dashboard', array(
'optinSecondary' => __( 'Not Now', 'ninja-forms' ),
'optinPrimary' => __( 'Yes, I agree!', 'ninja-forms' ),
'optinAwesome' => __( 'Keep being awesome!', 'ninja-forms' ),
'optinThanks' => __( 'Thank you for opting in!', 'ninja-forms' )
'optinThanks' => __( 'Thank you for opting in!', 'ninja-forms' ),
'cleanupContent' => sprintf( __( '%sOnce we begin this process, it might take several minutes to complete.%sNavigating away from this page before it is finished could lead to unexpected results.%sPlease confirm when you are ready to begin.%s', 'ninja-forms' ), '<p>', '</p><p>', '</p><p>', '</p>' ),
'cleanupSecondary' => __( 'Cancel', 'ninja-forms' ),
'cleanupPrimary' => sprintf( __( 'Clean up my data', 'ninja-forms' ) ),
'cleanupLoading' => __( 'Processing...', 'ninja-forms' )
));
......@@ -86,10 +86,19 @@ class NF_Database_Migrations
global $wpdb;
/* Delete known options */
delete_option( 'nf_admin_notice' );
delete_option( 'ninja_forms_settings' );
delete_option( 'ninja_forms_load_deprecated' );
delete_option( 'nf_form_tel_data' );
delete_option( 'nf_form_tel_sent' );
delete_option( 'nf_tel_collate' );
delete_option( 'ninja_forms_allow_tracking' );
delete_option( 'ninja_forms_db_version' );
delete_option( 'ninja_forms_do_not_allow_tracking' );
delete_option( 'ninja_forms_load_deprecated' );
delete_option( 'ninja_forms_mailchimp_interests' );
delete_option( 'ninja_forms_oauth_client_secret' );
delete_option( 'ninja_forms_optin_reported' );
delete_option( 'ninja_forms_settings' );
delete_option( 'ninja_forms_transactional_email_enabled' );
delete_option( 'ninja_forms_version' );
/* Delete possible options */
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE 'wp_nf_%'" );
......
......@@ -744,7 +744,7 @@ Label Three, value-three, 3
<div>
<span class="dashicons dashicons-menu handle"></span>
</div>
<div>
<div class="nf-select">
<# try { #>
{{{ data.renderNonSaveFieldSelect( 'field', data.field ) }}}
<# } catch ( err ) { #>
......
......@@ -17,5 +17,8 @@
aria-invalid="false"
aria-describedby="nf-error-{{{ data.id }}}"
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
......@@ -17,5 +17,8 @@
aria-invalid="false"
aria-describedby="nf-error-{{{ data.id }}}"
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
<script id="tmpl-nf-field-checkbox" type="text/template">
<input id="nf-field-{{{ data.id }}}" name="nf-field-{{{ data.id }}}" aria-describedby="nf-error-{{{ data.id }}}" class="{{{ data.renderClasses() }}} nf-element" type="checkbox" value="1" {{{ data.maybeDisabled() }}}{{{ data.maybeChecked() }}}>
<input id="nf-field-{{{ data.id }}}"
name="nf-field-{{{ data.id }}}"
aria-describedby="nf-error-{{{ data.id }}}"
class="{{{ data.renderClasses() }}} nf-element"
type="checkbox"
value="1" {{{ data.maybeDisabled() }}}{{{ data.maybeChecked() }}}
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
......@@ -17,5 +17,8 @@
aria-invalid="false"
aria-describedby="nf-error-{{{ data.id }}}"
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
<script id="tmpl-nf-field-date" type="text/template">
<input id="nf-field-{{{ data.id }}}" name="nf-field-{{{ data.id }}}" aria-invalid="false" aria-describedby="nf-error-{{{ data.id }}}" class="{{{ data.renderClasses() }}} nf-element datepicker" type="date" value="{{{ data.value }}}" {{{ data.renderPlaceholder() }}}>
<input id="nf-field-{{{ data.id }}}" name="nf-field-{{{ data.id }}}" aria-invalid="false" aria-describedby="nf-error-{{{ data.id }}}" class="{{{ data.renderClasses() }}} nf-element datepicker"
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
type="date" value="{{{ data.value }}}" {{{ data.renderPlaceholder() }}}>
</script>
......@@ -17,5 +17,8 @@
aria-invalid="false"
aria-describedby="nf-error-{{{ data.id }}}"
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
......@@ -16,5 +16,8 @@
aria-invalid="false"
aria-describedby="nf-error-{{{ data.id }}}"
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
<script id='tmpl-nf-field-input' type='text/template'>
<input id="nf-field-{{{ data.id }}}" name="nf-field-{{{ data.id }}}" aria-invalid="false" aria-describedby="nf-error-{{{ data.id }}}" class="{{{ data.renderClasses() }}} nf-element" type="text" value="{{{ data.value }}}" {{{ data.renderPlaceholder() }}} {{{ data.maybeDisabled() }}}>
<input id="nf-field-{{{ data.id }}}" name="nf-field-{{{ data.id }}}" aria-invalid="false" aria-describedby="nf-error-{{{ data.id }}}" class="{{{ data.renderClasses() }}} nf-element" type="text" value="{{{ data.value }}}" {{{ data.renderPlaceholder() }}} {{{ data.maybeDisabled() }}}
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
<script id="tmpl-nf-field-label" type="text/template">
<div class="nf-field-label"><label for="nf-field-{{{ data.id }}}" class="{{{ data.renderLabelClasses() }}}">{{{ data.label }}} {{{ ( 'undefined' != typeof data.required && 1 == data.required ) ? '<span class="ninja-forms-req-symbol">*</span>' : '' }}} {{{ data.maybeRenderHelp() }}}</label></div>
<div class="nf-field-label"><label for="nf-field-{{{ data.id }}}"
id="nf-label-field-{{{ data.id }}}"
class="{{{ data.renderLabelClasses() }}}">{{{ data.label }}} {{{ ( 'undefined' != typeof data.required && 1 == data.required ) ? '<span class="ninja-forms-req-symbol">*</span>' : '' }}} {{{ data.maybeRenderHelp() }}}</label></div>
</script>
......@@ -16,5 +16,8 @@
aria-invalid="false"
aria-describedby="nf-error-{{{ data.id }}}"
aria-labelledby="nf-label-field-{{{ data.id }}}"
{{{ data.maybeRequired() }}}
>
</script>
......@@ -7,15 +7,29 @@
<script id='tmpl-nf-field-listcheckbox-option' type='text/template'>
<# if ( ! data.visible ) { return '' } #>
<li>
<input type="checkbox" id="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}" name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element {{{ ( data.isSelected ) ? ' nf-checked' : '' }}}" value="{{{ data.value }}}" {{{ ( data.isSelected ) ? 'checked="checked"' : '' }}}>
<label for="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}" class="{{{ ( data.isSelected ) ? 'nf-checked-label' : '' }}}">{{{ data.label }}}</label>
<input type="checkbox" id="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}" name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element {{{ ( data.isSelected ) ? ' nf-checked' : '' }}}" value="{{{ data.value }}}" {{{ ( data.isSelected ) ? 'checked="checked"' : '' }}}
aria-labelledby="nf-label-field-{{{ data.fieldID }}}-{{{ data.index }}}"
<# if( data.required ) { #>
required
<# } #>
>
<label for="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}"
id="nf-label-field-{{{ data.fieldID }}}-{{{ data.index }}}"
class="{{{ ( data.isSelected ) ? 'nf-checked-label' : '' }}}">{{{ data.label }}}</label>
</li>
</script>
<script id='tmpl-nf-field-listcheckbox-other' type='text/template'>
<li {{{ ( ! data.visible ) ? 'style="display:none"' : '' }}}>
<input type="checkbox" name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element" value="nf-other" {{{ ( ! data.valueFound ) ? 'checked="checked"' : '' }}}>
<label>Other
<input type="checkbox"
id="nf-field-{{{ data.fieldID }}}-other"
name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element" value="nf-other" {{{ ( ! data.valueFound ) ? 'checked="checked"' : '' }}}
aria-labelledby="nf-label-field-{{{ data.fieldID }}}-other"
<# if( data.required ) { #>
required
<# } #>
>
<label id="nf-label-field-{{{ data.fieldID }}}-other">Other
{{{ data.renderOtherText() }}}
</label>
</li>
......
......@@ -7,7 +7,19 @@
<script id='tmpl-nf-field-listradio-option' type='text/template'>
<# if ( ! data.visible ) { return '' } #>
<li>
<input type="radio" id="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}" name="nf-field-{{{ data.fieldID }}}" class="{{{ data.classes }}} nf-element {{{ ( data.value == data.currentValue || 1 == data.selected ) ? 'nf-checked' : '' }}}" value="{{{ data.value }}}" {{{ ( data.value == data.currentValue || 1 == data.selected ) ? 'checked="checked"' : '' }}}> <label for="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}" class="{{{ ( data.value == data.currentValue || 1 == data.selected ) ? 'nf-checked-label' : '' }}}">{{{ data.label }}}</label>
<input type="radio"
id="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}"
name="nf-field-{{{ data.fieldID }}}"
class="{{{ data.classes }}} nf-element {{{ ( data.value == data.currentValue || 1 == data.selected ) ? 'nf-checked' : '' }}}" value="{{{ data.value }}}" {{{ ( data.value == data.currentValue || 1 == data.selected ) ? 'checked="checked"' : '' }}}
aria-labelledby="nf-label-class-field-{{{ data.fieldID }}}-{{{ data.index }}}"
<# if( data.required ) { #>
required
<# } #>
>
<label for="nf-field-{{{ data.fieldID }}}-{{{ data.index }}}"
id="nf-label-class-field-{{{ data.fieldID }}}-{{{ data.index }}}" {{{ ( data.value == data.currentValue || 1
==
data.selected ) ? 'nf-checked-label' : '' }}}">{{{ data.label }}}</label>
</li>
</script>
......