Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1500 conference validation #1512

Merged
merged 6 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/css/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/admin.min.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions assets/src/admin-meeting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@
}
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used <small> tags to follow input fields for immediate error messaging.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks for using the same color of red we use in other places - maybe eventually we can use css vars for it

small {
display: none;
margin-left: 15%;
&.error_message{
color: #d40047;
}
&.show {
display: inline-block;
}
}

input,
select {
border: 1px solid #ccc;
Expand Down
279 changes: 182 additions & 97 deletions assets/src/admin.js

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions includes/admin_meeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ class="checkboxes<?php if (!empty($tsml_types_in_use) && count($tsml_types_in_us
</label>
<input type="url" name="conference_url" id="conference_url" placeholder="https://"
value="<?php echo $meeting->conference_url ?>">
<small class="error_message" data-message="1">
<?php _e('Zoom conference urls require a valid meeting number.', '12-step-meeting-list') ?>
</small>
<small class="error_warning" data-message="2">
<?php _e('Your conference url has been updated to follow the Zoom url standard.', '12-step-meeting-list') ?>
</small>
</div>
<div class="meta_form_row">
<label for="conference_url_notes">
Expand Down Expand Up @@ -208,9 +214,6 @@ function () {
</li>
</ul>
</div>
<div class="location_error form_not_valid hidden">
<?php _e('Error: In person meetings must have a specific address.', '12-step-meeting-list') ?>
</div>
<div class="location_warning need_approximate_address hidden">
<?php _e('Warning: Online meetings with a specific address will appear that the location temporarily closed. Meetings that are Online only should use appoximate addresses.', '12-step-meeting-list') ?><br /><br />
<?php _e('Example:', '12-step-meeting-list') ?><br />
Expand All @@ -235,6 +238,12 @@ function () {
<input value="<?php tsml_echo($location, 'approximate') ?>" type="hidden" name="approximate" id="approximate">
<input value="<?php tsml_echo($location, 'latitude') ?>" type="hidden" name="latitude" id="latitude">
<input value="<?php tsml_echo($location, 'latitude') ?>" type="hidden" name="longitude" id="longitude">
<small class="error_message" data-message="1">
<?php _e('Error: In person meetings must have a specific address.', '12-step-meeting-list') ?>
</small>
<small class="warning_message" data-message="2">
<?php _e('Warning: Unable to process this address for exact location.', '12-step-meeting-list') ?>
</small>
Copy link
Collaborator Author

@gkovats gkovats Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this error state to capture when we get an error from the geocoding call. I figured it was worth displaying, but you may know reasons why this isn't useful - maybe frequent errors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this is great - we can now cross this requirement off our refactor geocoding ticket

</div>
<?php if (count($meetings) > 1) { ?>
<div class="meta_form_row checkbox apply_address_to_location hidden">
Expand Down
Loading