Skip to content

Commit

Permalink
1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nigel-bmlt committed Sep 20, 2022
1 parent 7c214ad commit f40d498
Show file tree
Hide file tree
Showing 8 changed files with 255 additions and 200 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.0.5 (Sep 20, 2022)
- #84 CSS fixes for Enfold theme
- #88 CSS fixes for single column mobile display
- #87 shortcode descriptive text is not clear ( thanks adamh !)
- #86 backup and restore has no descriptive text ( thanks adamh !)
- #83 don't mention starter kit in subtext when fso disabled ( thanks @pjaudiomv !)

## 1.0.4 (Sep 12, 2022)
- #81 Change language in settings from BMLT to BMLT Root Server (thanks @tempsaint !)
- #59 filter visible service bodies based on the bot user permissions, rather than all service bodies (thanks @pjaudiomv !)
Expand Down
12 changes: 8 additions & 4 deletions bmlt-workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@
* Plugin Name: BMLT Workflow
* Plugin URI: https://github.com/bmlt-enabled/bmlt-workflow
* Description: Workflows for BMLT meeting management!
* Version: 1.0.4
* Version: 1.0.5
* Requires at least: 5.2
* Tested up to: 6.0
* Author: @nigel-bmlt
* Author URI: https://github.com/nigel-bmlt
**/


define('BMLTWF_PLUGIN_VERSION', '1.0.4');
define('BMLTWF_PLUGIN_VERSION', '1.0.5');

if ((!defined('ABSPATH') && (!defined('BMLTWF_RUNNING_UNDER_PHPUNIT')))) exit; // die if being called directly

Expand Down Expand Up @@ -693,14 +692,19 @@ public function bmltwf_bmlt_server_address_html()

public function bmltwf_backup_restore_html()
{
echo '<div class="bmltwf_info_text">';
echo '<br>Backup and Restore the entire plugin configuration, including all submission entries and plugin settings.';
echo '<br><br>';
echo '</div>';
echo '<br>';
echo '<button type="button" id="bmltwf_backup">Backup Configuration</button> <button type="button" id="bmltwf_restore">Restore Configuration</button><input type="file" id="bmltwf_file_selector" accept=".json,application/json" style="display:none">';
echo '<span class="spinner" id="bmltwf-backup-spinner"></span><br>';
}

public function bmltwf_shortcode_html()
{
echo '<div class="bmltwf_info_text">';
echo '<br>You can use the shortcode <code>[bmltwf-meeting-update-form]</code> to list the appropriate meetings and service areas in your update form.';
echo '<br>Use the shortcode <code>[bmltwf-meeting-update-form]</code> to generate a form. The form will be associated with service bodies configured on the Service Bodies configuration page.';
echo '<br><br>';
echo '</div>';
}
Expand Down
130 changes: 110 additions & 20 deletions css/meeting_update_form.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,32 @@
* along with bmlt-workflow. If not, see <http://www.gnu.org/licenses/>.
*/

div#meeting_update_form_header {
padding-left: 1em;
padding-right: 3em;
}

div#form_replace.bmltwf_wide_form {
max-width: 1170px;
margin-left: auto;
margin-right: auto;
}

div#form_replace.bmltwf_wide_form legend {
font-size: 1em;
}

div#form_replace.bmltwf_wide_form fieldset {
border-width: 2px;
border-style: groove;
border-color: rgb(192, 192, 192);
padding-block-start: 0.35em;
padding-inline-start: 0.75em;
padding-inline-end: 0.75em;
padding-block-end: 0.625em;
}


input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
Expand Down Expand Up @@ -56,15 +76,20 @@ body {
margin: 40px;
}

.form-grid {

@media all and (min-width: 576px) {

div#meeting_content.form-grid {
display: grid;
grid-gap: 10px;
width: 1170px;
width: calc(100% + 2rem);
margin-left: auto;
margin-right: auto;
grid-template-columns: repeat(2, [col] 1fr);
grid-template-rows: repeat(5, [row] auto);
grid-template-columns: [col] 1fr;
grid-template-rows: repeat(7, [row] auto);
box-sizing: border-box;
padding-left: 1em;
padding-right: 3em;
}

.form-grid-top {
Expand All @@ -78,23 +103,72 @@ body {
}

.form-grid-col2-1 {
grid-column: col 2;
grid-row: row 2;
grid-column: col;
grid-row: row 5;
}

.form-grid-col2-2 {
grid-column: col 2;
grid-row: row 3;
grid-column: col;
grid-row: row 6;
}

.form-grid-bottom {
grid-column: col / span 2;
grid-row: row 5;
grid-row: row 7;
}
}

@media all and (min-width: 992px) {

div#meeting_content.form-grid {
display: grid;
grid-gap: 10px;
width: calc(100% + 2rem);
margin-left: auto;
margin-right: auto;
grid-template-columns: repeat(2, [col] 1fr);
grid-template-rows: repeat(5, [row] auto);
box-sizing: border-box;
padding-left: 1em;
padding-right: 3em;
}

.form-grid-top {
grid-column: col / span 2;
grid-row: row;
}

.form-grid-col1 {
grid-column: col;
grid-row: row 2 / span 3;
}

.form-grid-col2-1 {
grid-column: col 2;
grid-row: row 2;
}

.form-grid-col2-2 {
grid-column: col 2;
grid-row: row 3;
}

.form-grid-bottom {
grid-column: col / span 2;
grid-row: row 5;
}
}

.grid-flex-item .inline {
display: inline;
}

.form-grid input,
.form-grid textarea:not(.select2-search__field),
.form-grid select,
div#meeting_content.form-grid input,
div#meeting_content.form-grid input[type='text'],
div#meeting_content.form-grid input[type='number'],
div#meeting_content.form-grid input[type='email'],
div#meeting_content.form-grid textarea:not(.select2-search__field),
div#meeting_content.form-grid select,
select.update-form-select,
input#submit.button
{
Expand All @@ -110,45 +184,52 @@ input#submit.button
border-color: rgb(204, 204, 204);
border-width: 1px;
font-family: "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 1.2rem
font-size: 1.2rem;
background-color: rgb(255,255,255);
color: rgb(102,102,102);
}

input#submit.button {
background-color: rgb(230, 230, 230);
color: rgba(0, 0, 0, 0.8);
}

.form-grid input {
div#meeting_content.form-grid input {
height: 3rem;
}

.form-grid textarea:not(.select2-search__field) {
div#meeting_content.form-grid textarea:not(.select2-search__field) {
height: 6rem;
}

.form-grid select,
div#meeting_content.form-grid select,
div #update_reason.update-form-select,
select.update-form-select {
padding-top: 0;
padding-bottom: 0;
height: 3rem;
border-radius: 8px;
border-width: 2px;
-webkit-appearance: menulist;
background-image: none;
background-color: rgb(255,255,255);
color: rgb(102,102,102);
}

select.update-form-select {
width: auto;
}

.form-grid select {
div#meeting_content.form-grid select {
width: 100%;
}

.form-grid .inline select {
div#meeting_content.form-grid .inline select {
display: inline;
width: auto;
}

.form-grid label {
div#meeting_content.form-grid label {
width: 100%;
display: block;
padding: 10px 5px 5px 2px;
Expand All @@ -157,9 +238,10 @@ select.update-form-select {
box-sizing: border-box;
font-family: "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 1rem;
font-weight: normal;
}

.form-grid .inline label {
div#meeting_content.form-grid .inline label {
display: inline;
}

Expand Down Expand Up @@ -644,11 +726,19 @@ span.select2-container--bmltwf_select2_theme .select2-selection--single {
-webkit-appearance: textfield;
}

#meeting_details .select2-container--bmltwf_select2_theme .select2-search--inline textarea.select2-search__field,
.select2-container--bmltwf_select2_theme .select2-search--inline textarea.select2-search__field {
padding-bottom: .5rem;
padding-top: .3rem;
line-height: 1;
height: 1.6rem;
display: inline-block;
border: none;
min-height: unset;
margin-bottom: 0px;
margin-left: 5px;
margin-top: 0px;
margin-right: 5px;
}

.select2-container--bmltwf_select2_theme .select2-results > .select2-results__options {
Expand Down
5 changes: 1 addition & 4 deletions js/admin_submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ jQuery(document).ready(function ($) {
meeting_time = data["original_start_time"];
original = "Original ";
break;
case "reason_other":
submission_type = "Other Request";
break;
default:
submission_type = data["submission_type"];
}
Expand Down Expand Up @@ -379,7 +376,7 @@ jQuery(document).ready(function ($) {
var change_made = $("#dt-submission").DataTable().row({ selected: true }).data()["change_made"];
var submission_type = $("#dt-submission").DataTable().row({ selected: true }).data()["submission_type"];
var actioned = change_made === "approved" || change_made === "rejected";
var cantquickedit = change_made === "approved" || change_made === "rejected" || submission_type === "reason_close" || submission_type === "reason_other";
var cantquickedit = change_made === "approved" || change_made === "rejected" || submission_type === "reason_close";
$("#dt-submission").DataTable().button("approve:name").enable(!actioned);
$("#dt-submission").DataTable().button("reject:name").enable(!actioned);
$("#dt-submission").DataTable().button("quickedit:name").enable(!cantquickedit);
Expand Down
23 changes: 2 additions & 21 deletions js/meeting_update_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ jQuery(document).ready(function ($) {
dropdownAutoWidth: true,
matcher: matchCustom,
theme: 'bmltwf_select2_theme',
width: 'auto',
// selectionCssClass: "meeting-searcher-custom",
width: '100%',
});

$("#meeting-searcher").on("select2:open", function (e) {
Expand Down Expand Up @@ -419,9 +418,7 @@ jQuery(document).ready(function ($) {
// meeting logic before selection is made
$("#meeting_selector").hide();
$("#meeting_content").hide();
$("#other_reason_div").hide();
$("#other_reason").prop("required", false);
$("#personal_details").attr("class", "form-grid-col2-1");

$("#virtual_hybrid_select").on("change", function () {
// show and hide the virtual meeting settings, and adjust formats as required
Expand Down Expand Up @@ -461,20 +458,16 @@ jQuery(document).ready(function ($) {
$("#reason_new_text").hide();
$("#reason_change_text").hide();
$("#reason_close_text").hide();
$("#reason_other_text").hide();
$("#starter_pack").hide();
$("#meeting_selector").hide();
// enable the meeting form
$("#meeting_content").hide();
$("#other_reason_div").hide();
$("#other_reason").prop("required", false);
$("#additional_info").prop("required", false);
$("#personal_details").attr("class", "form-grid-col2-1");
disable_and_clear_highlighting();
enable_edits();
// enable items as required
var reason = $(this).val();
// <p id="reason_close_text" style="display: none;">We've retrieved the details below from our system. Please add any other information and your contact details and then submit your update.

clear_form();
switch (reason) {
Expand All @@ -486,7 +479,7 @@ jQuery(document).ready(function ($) {
$("#virtual_meeting_settings").hide();
// display form instructions
$("#instructions").html(
"Please fill in the details of your new meeting, and whether your new meeting needs a starter kit provided, and then submit your update. Note: If your meeting meets multiple times a week, please submit additional new meeting requests for each day you meet."
"Please fill in the details of your new meeting, and then submit your update. <br><b>Note:</b> If your meeting meets multiple times a week, please submit additional new meeting requests for each day you meet."
);
// new meeting has a starter pack
if(bmltwf_fso_feature == 'display')
Expand Down Expand Up @@ -516,18 +509,6 @@ jQuery(document).ready(function ($) {
$("#meeting_selector").show();
$("#additional_info").prop("required", true);

break;
case "reason_other":
// display form instructions
$("#instructions").html("");
// other reason has a textarea
$("#other_reason_div").show();
$("#meeting_content").show();
$("#personal_details").attr("class", "form-grid-col1");
$("#personal_details").show();
$("#meeting_details").hide();
$("#other_reason").prop("required", true);
$("#additional_info_div").hide();
break;
}
});
Expand Down
Loading

0 comments on commit f40d498

Please sign in to comment.