Commit 536c407a authored by Kenny Hall's avatar Kenny Hall

Created new convention for displaying a radio list on the back end. Started...

Created new convention for displaying a radio list on the back end. Started working on controller for the list.
parent fd1db1d4
This source diff could not be displayed because it is too large. You can view the blob instead.
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.
This diff is collapsed.
This diff is collapsed.
define( [], function() {
var controller = Marionette.Object.extend({
initialize: function () {
// Respond to requests for field setting filtering.
console.log( nfRadio.channel( 'radio' ) );
nfRadio.channel('radio').reply( 'before:updateSetting', this.updateSetting, this);
},
updateSetting: function( e, fieldModel, name, settingTypeModel ) {
console.log( 'test' );
}
});
return controller;
} );
\ No newline at end of file
......@@ -34,6 +34,7 @@ define(
'controllers/app/changeSettingDefault',
'controllers/app/fieldset',
'controllers/app/toggleSetting',
'controllers/app/radioSetting',
'controllers/app/itemControls',
'controllers/app/mergeTags',
'controllers/app/mergeTagBox',
......@@ -137,6 +138,7 @@ define(
ChangeSettingDefault,
Fieldset,
ToggleSetting,
RadioSetting,
ItemControls,
MergeTags,
MergeTagsBox,
......@@ -271,6 +273,7 @@ define(
new MainContentFieldsSortable();
new ChangeSettingDefault();
new ToggleSetting();
new RadioSetting();
new DrawerSettingChildView();
new FieldsEditActive();
new FieldSettings();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -33,6 +33,10 @@ final class NF_Actions_Save extends NF_Abstracts_Action
parent::__construct();
$this->_nicename = __( 'Store Submission', 'ninja-forms' );
$settings = Ninja_Forms::config( 'ActionSaveSettings' );
$this->_settings = array_merge( $this->_settings, $settings );
}
/*
......
<?php if ( ! defined( 'ABSPATH' ) ) exit;
return apply_filters( 'ninja_forms_action_email_settings', array(
/*
* To
*/
'fields_save_toggle' => array(
'name' => 'fields_save_toggle',
'type' => 'radio',
'options' => array(
array( 'label' => __( 'Save All', 'ninja-forms' ), 'value' => 'save_all' ),
array( 'label' => __( 'Save None', 'ninja-forms' ), 'value' => 'save_none' )
),
'group' => 'primary',
'label' => __( 'Fields Save', 'ninja-forms' ),
'value' => 'save_all',
),
));
......@@ -539,6 +539,21 @@ Label Three, value-three, 3
</script>
<script id="tmpl-nf-edit-setting-radio" type="text/template">
<span class="nf-setting-label">{{{ data.label }}}{{{ data.renderTooltip() }}}</span>
<#
_.each( data.options, function( option ) {
#>
<span class="nf-setting-label">{{{ option.label }}}</span>
<input type="radio" value="{{{ option.value }}}" name="{{{ data.name }}}" {{{ data.value == option.value ? "checked" : '' }}}></option>
<#
} );
#>
</script>
<script id="tmpl-nf-edit-setting-color" type="text/template">
<label for="{{{ data.name }}}" class="{{{ data.renderLabelClasses() }}}">{{{ data.label }}} {{{ data.renderTooltip() }}}</label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment