diff --git a/admin/class-bread-admin.php b/admin/class-bread-admin.php
index 4d090b5..feb670d 100644
--- a/admin/class-bread-admin.php
+++ b/admin/class-bread-admin.php
@@ -457,7 +457,7 @@ function pwsix_process_wizard()
}
$settings = json_decode($encode_options, true);
$ncols = substr_count($settings['meeting_template_content'], '
bread->getMaxSetting() + 1;
+ $id = (is_numeric($_POST['wizard_setting_id'])) ? intval($_POST['wizard_setting_id']) : $this->bread->getMaxSetting() + 1;
$optionsName = $this->bread->generateOptionName($id);
$settings['authors'] = array();
$settings['root_server'] = sanitize_url($_POST['wizard_root_server']);
@@ -496,7 +496,7 @@ function pwsix_process_wizard()
}
update_option($optionsName, $settings);
$setting_name = sanitize_title($_POST['wizard-setting-name']);
- $setting_name = $setting_name == '' ? $setting_name : 'Setting ' . $id;
+ $setting_name = $setting_name == '' ? 'Setting ' . $id : $setting_name;
$this->bread->setAndSaveSetting($id, $setting_name);
$this->bread->getMLOptions($id);
$this->bread->setRequestedSetting($id);
diff --git a/admin/js/bread-wizard.js b/admin/js/bread-wizard.js
index 17cd883..d205835 100644
--- a/admin/js/bread-wizard.js
+++ b/admin/js/bread-wizard.js
@@ -42,17 +42,23 @@ jQuery(document).ready(function($){
});
}
var href;
+ var setting;
finalInstructions = function(response) {
$('#wizard-before-create').hide();
$('#wizard-after-create').show();
href = window.location.href.substring(0, window.location.href.indexOf('/wp-admin'));
- href = href+"?current-meeting-list="+response.result.setting;
- const tag = '<a href="'+href+'">'+href+' ';
+ setting = response.result.setting;
+ href = href+"?current-meeting-list="+setting;
+ const tag = ''+href+' ';
$('#wizard-show-link').html(tag);
}
BreadWizard.prototype.generate_meeting_list = function() {
window.open(href, '_blank').focus();
}
+ BreadWizard.prototype.redo_layout = function() {
+ $('#wizard_setting_id').val(setting);
+ $('#bread-wizard').smartWizard("goToStep", 2);
+ }
BreadWizard.prototype.test_root_server = function() {
ask_bmlt("switcher=GetServerInfo",
(info) => {
diff --git a/admin/partials/_bmlt_server_setup.php b/admin/partials/_bmlt_server_setup.php
index bf61405..9d15f66 100644
--- a/admin/partials/_bmlt_server_setup.php
+++ b/admin/partials/_bmlt_server_setup.php
@@ -92,8 +92,8 @@
Include Extra Meetings(?)
Hold CTRL Key down to select multiple meetings.
-
diff --git a/includes/class-bread.php b/includes/class-bread.php
index 5922445..70b6360 100644
--- a/includes/class-bread.php
+++ b/includes/class-bread.php
@@ -566,8 +566,9 @@ function fillUnsetOptionsInner()
$this->fillUnsetStringOption('city_suffix', 'City');
$this->fillUnsetStringOption('meeting_template_content', '');
//TODO:remove....clean up after a bug...
- if (is_array($this->options['additional_list_template_content']))
+ if (is_array($this->options['additional_list_template_content'])) {
$this->options['additional_list_template_content'] = join('', $this->options['additional_list_template_content']);
+ }
$this->fillUnsetStringOption('additional_list_template_content', '');
$this->fillUnsetOption('column_line', 0);
$this->fillUnsetOption('col_color', '#bfbfbf');
|