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(?)

- +

Step 1: Enter your BMLT root server

@@ -83,10 +84,12 @@

Step 3: Page Layout

Most areas try to fit their meetings onto a single sheet of paper. And it is particularly adventageous to - use a tri-fold format, so that the list can be printed at home and placed along side the pamphlets. Remember though, that when fonts become - too small, the meeting list becomes unreadable. For many areas, a booklet format is better, even - if the reqire more effort or expense to print.

-

In this step we suggest suitible formats based on your meeting count.

+ use a tri-fold format, so that the list can be printed at home and placed along side the pamphlets. The priority should always be that the + meeting list is readable. For many areas, a booklet format is better, even if the reqire more effort or expense to print.

+

In this step we suggest suitible formats based on your meeting count. Having the meetings fit on a single side has the advantage + that the list can be posted on a bulleitin board, and this will be used when suggesting a page layout. However, you may + also wish to have the meetings "overflow" on to the back side of the paper. If so, select a layout above layout + that the wizard pre-selects for you.

Number of meetings on list:

Select one of the layouts appropriate to the number of meetings

@@ -139,6 +142,8 @@

To add a link to the meeting list on your website, use the following link.

+

If you want to try a different layout: +

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');