Changeset 2756295
- Timestamp:
- 07/14/2022 11:03:15 AM (4 years ago)
- Location:
- heygov
- Files:
-
- 39 added
- 5 edited
-
tags/1.5.0 (added)
-
tags/1.5.0/README.md (added)
-
tags/1.5.0/assets (added)
-
tags/1.5.0/assets/badge-app-store.svg (added)
-
tags/1.5.0/assets/badge-play-store.png (added)
-
tags/1.5.0/assets/banner-mobile.jpg (added)
-
tags/1.5.0/assets/banner.jpg (added)
-
tags/1.5.0/assets/css (added)
-
tags/1.5.0/assets/css/heygov-admin.css (added)
-
tags/1.5.0/assets/css/heygov-site.css (added)
-
tags/1.5.0/assets/heygov-admin.js (added)
-
tags/1.5.0/assets/heygov-venues.js (added)
-
tags/1.5.0/assets/icon-ban.svg (added)
-
tags/1.5.0/assets/icon-cocktail.svg (added)
-
tags/1.5.0/assets/icon-fire.svg (added)
-
tags/1.5.0/assets/icon-hand-paper.svg (added)
-
tags/1.5.0/assets/icon-home.svg (added)
-
tags/1.5.0/assets/icon-paw.svg (added)
-
tags/1.5.0/assets/icon-sailboat.svg (added)
-
tags/1.5.0/assets/icon-tree.svg (added)
-
tags/1.5.0/heygov.php (added)
-
tags/1.5.0/includes (added)
-
tags/1.5.0/includes/class (added)
-
tags/1.5.0/includes/class/heygov-resource.php (added)
-
tags/1.5.0/includes/class/heygov-settings.php (added)
-
tags/1.5.0/includes/view (added)
-
tags/1.5.0/includes/view/apps-banner.php (added)
-
tags/1.5.0/includes/view/show-heygov-muni-forms.php (added)
-
tags/1.5.0/includes/view/show-heygov-settings.php (added)
-
tags/1.5.0/includes/view/show-venue.php (added)
-
tags/1.5.0/pagebuilder-module (added)
-
tags/1.5.0/pagebuilder-module/button.svg (added)
-
tags/1.5.0/pagebuilder-module/heygov-pb-module.php (added)
-
tags/1.5.0/pagebuilder-module/includes (added)
-
tags/1.5.0/pagebuilder-module/includes/frontend.js.php (added)
-
tags/1.5.0/pagebuilder-module/includes/frontend.php (added)
-
tags/1.5.0/readme.txt (added)
-
trunk/assets/css/heygov-site.css (modified) (6 diffs)
-
trunk/assets/heygov-venues.js (added)
-
trunk/heygov.php (modified) (3 diffs)
-
trunk/includes/class/heygov-resource.php (modified) (4 diffs)
-
trunk/includes/view/show-heygov-settings.php (modified) (10 diffs)
-
trunk/includes/view/show-venue.php (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
heygov/trunk/assets/css/heygov-site.css
r2752006 r2756295 1 /* 2 CSS styles for HeyGov sections 3 4 Contents: 5 1. Global styles 6 2. Apps Banner 7 3. Forms 8 4. Venue availability 9 */ 10 11 12 /* 1. HeyGov global styles*/ 13 14 [v-cloak] { 15 display: none; 16 } 17 1 18 *[class*='heygov-'] { 2 19 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"!important; 20 } 21 22 .heygov-cursor-pointer { 23 cursor: pointer; 24 } 25 26 .heygov-text-center { 27 text-align: center; 28 } 29 30 .heygov-text-end { 31 text-align: right; 32 } 33 34 .heygov-h3 { 35 font-weight: 600; 36 font-size: 22px; 37 line-height: 36px; 38 letter-spacing: 0.3px; 39 color: rgba(0, 0, 13); 40 text-decoration: none; 41 margin: 0 !important; 3 42 } 4 43 … … 13 52 14 53 } 15 .heygov-h3 {16 font-weight: 600;17 font-size: 22px;18 line-height: 36px;19 letter-spacing: 0.3px;20 color:rgba(0, 0, 13);21 text-decoration: none;22 margin: 0!important;23 }24 54 25 55 @media (max-width: 567px ) { … … 33 63 padding: 0!important; 34 64 } 35 36 } 65 } 66 67 .heygov-row { 68 display: flex; 69 flex-direction: row; 70 flex-wrap: wrap; 71 width: calc(100% + 20px); 72 margin: 0 -10px 5px; 73 } 74 75 .heygov-col { 76 display: flex; 77 flex-direction: column; 78 flex-basis: 100%; 79 flex: 1; 80 padding-left: 10px; 81 padding-right: 10px; 82 } 83 84 .heygov-justify-content-center { 85 justify-content: center; 86 } 87 88 .heygov-row-cols-2 { 89 flex: 0 0 auto; 90 width: 50%; 91 } 92 93 @media (min-width: 992px) { 94 .heygov-row-cols-lg-5 { 95 flex: 0 0 auto; 96 width: 20% !important; 97 } 98 99 .heygov-row-cols-lg-4 { 100 flex: 0 0 auto; 101 width: 25% !important; 102 } 103 104 .heygov-row-cols-lg-3 { 105 flex: 0 0 auto; 106 width: 33.333% !important; 107 } 108 109 .heygov-row-cols-lg-2 { 110 flex: 0 0 auto; 111 width: 50% !important; 112 } 113 } 114 115 @media (min-width: 768px) { 116 .heygov-row-cols-md-4 { 117 flex: 0 0 auto; 118 width: 25%; 119 } 120 121 .heygov-row-cols-md-3 { 122 flex: 0 0 auto; 123 width: 33.333%; 124 } 125 } 126 127 .heygov-mb-0 { 128 margin-bottom: 0 !important; 129 } 130 131 .heygov-mb-3 { 132 margin-bottom: 1.5rem !important; 133 } 134 135 .heygov-mt-3 { 136 margin-top: 1.5rem !important; 137 } 138 139 .heygov-p-1 { 140 padding: 0.5rem !important; 141 } 142 143 .heygov-p-2 { 144 padding: 1rem !important; 145 } 146 147 .heygov-p-3 { 148 padding: 1.5rem !important; 149 } 150 151 .heygov-pt-3 { 152 padding-top: 1.5rem !important; 153 } 154 155 .heygov-my-2 { 156 margin-top: 0.5rem !important; 157 margin-bottom: 0.5rem !important; 158 } 159 160 .heygov-m-2 { 161 margin: 0.5rem !important; 162 } 163 164 .heygov-mx-2 { 165 margin-left: 1rem !important; 166 margin-right: 1rem !important; 167 } 168 169 .heygov-mx-1 { 170 margin-left: 0.5rem !important; 171 margin-right: 0.5rem !important; 172 } 173 174 .heygov-px-3 { 175 padding-right: 1rem !important; 176 padding-left: 1rem !important; 177 } 178 179 .heygov-card { 180 box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05); 181 transition: 0px 2px 10px rgba(0, 0, 0, 0.1) 0.2s ease-in-out; 182 border-radius: 30px; 183 overflow: hidden; 184 width: 100%; 185 } 186 187 .heygov-card-header { 188 border-radius: 30px 30px 0 0; 189 padding: 1rem 1.5rem; 190 } 191 192 .heygov-card-body { 193 padding: 1rem; 194 } 195 196 .heygov-card-title { 197 margin-bottom: 0.5rem; 198 position: relative; 199 } 200 201 .heygov-border-1 { 202 border-width: 0.5px !important; 203 } 204 205 .heygov-text-dark { 206 color: black !important; 207 text-decoration: none; 208 } 209 210 .heygov-text-dark:hover { 211 color: black !important; 212 text-decoration: none; 213 } 214 215 .heygov-ratio { 216 position: relative; 217 width: 100%; 218 } 219 220 .heygov-ratio-1x1 { 221 aspect-ratio: 1/1; 222 } 223 224 225 /* 2. Apps banner */ 37 226 38 227 .heygov-apps-banner-wrapper { … … 123 312 } 124 313 } 125 .heygov-row { 126 display:flex; 127 flex-direction:row; 128 flex-wrap:wrap; 129 width:calc(100% + 20px); 130 margin:0 -10px 5px; 131 } 132 133 .heygov-col { 134 display:flex; 135 flex-direction:column; 136 flex-basis:100%; 137 flex:1; 138 padding-left:10px; 139 padding-right:10px; 140 } 141 142 143 144 .heygov-justify-content-center { 145 justify-content:center; 146 } 147 .heygov-row-cols-2 { 148 flex: 0 0 auto; 149 width: 50%; 150 } 151 152 @media (min-width: 992px) { 153 .heygov-row-cols-lg-5 { 154 flex: 0 0 auto; 155 width: 20%!important; 156 } 157 .heygov-row-cols-lg-4 { 158 flex: 0 0 auto; 159 width: 25%!important; 160 } 161 .heygov-row-cols-lg-3 { 162 flex: 0 0 auto; 163 width: 33.333%!important; 164 } 165 .heygov-row-cols-lg-2 { 166 flex: 0 0 auto; 167 width: 50%!important; 168 } 169 } 170 @media (min-width: 768px) { 171 .heygov-row-cols-md-4 { 172 flex: 0 0 auto; 173 width: 25%; 174 } 175 .heygov-row-cols-md-3 { 176 flex: 0 0 auto; 177 width: 33.333%; 178 } 179 } 180 .heygov-mb-3 { 181 margin-bottom: 1.5rem!important; 182 } 183 .heygov-mt-3 { 184 margin-top: 1.5rem!important; 185 } 186 .heygov-p-1 { 187 padding: 0.5rem!important; 188 } 189 .heygov-p-2 { 190 padding: 1rem!important; 191 } 192 193 .heygov-p-3 { 194 padding: 1.5rem!important; 195 } 196 .heygov-pt-3 { 197 padding-top: 1.5rem!important; 198 } 199 .heygov-my-2 { 200 margin-top: 0.5rem!important; 201 margin-bottom: 0.5rem!important; 202 } 203 .heygov-m-2 { 204 margin: 0.5rem!important; 205 } 206 .heygov-mx-2 { 207 margin-left: 1rem!important; 208 margin-right: 1rem!important; 209 } 210 .heygov-mx-1 { 211 margin-left: 0.5rem!important; 212 margin-right: 0.5rem!important; 213 } 214 .heygov-px-3 { 215 padding-right: 1rem!important; 216 padding-left: 1rem!important; 217 } 218 .heygov-card { 219 box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05); 220 transition: 0px 2px 10px rgba(0, 0, 0, 0.1) 0.2s ease-in-out; 221 border-radius: 30px; 222 overflow: hidden; 223 width: 100%; 224 } 225 226 .heygov-card-header { 227 border-radius: 30px 30px 0 0; 228 padding: 1rem 1.5rem; 229 } 230 231 .heygov-card-body { 232 padding: 1rem; 233 } 234 235 .heygov-card-title { 236 margin-bottom: 0.5rem; 237 position: relative; 238 } 239 .heygov-border-1 { 240 border-width: 0.5px!important; 241 } 242 243 .heygov-text-dark { 244 color: black!important; 245 text-decoration: none; 246 } 247 .heygov-text-dark:hover { 248 color: black!important; 249 text-decoration: none; 250 } 251 .heygov-ratio { 252 position: relative; 253 width: 100%; 254 } 255 .heygov-ratio-1x1 { 256 aspect-ratio: 1/1; 257 } 314 315 316 /* 3. Forms embed */ 258 317 259 318 .heygov-card-form { … … 261 320 } 262 321 263 .heygov-card .has-icon {322 .heygov-card-form.has-icon { 264 323 background-color: rgba(224, 224, 224, 0.4); 265 324 } 266 .heygov-card.has-department { 325 326 .heygov-card-form.has-department { 267 327 background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)); 268 328 } 269 .heygov-card .heygov-form-price { 329 330 .heygov-card-form .heygov-form-price { 270 331 position: absolute; 271 332 bottom: 0.2rem; … … 290 351 } 291 352 } 353 354 355 /* 4. HeyGov venue availability */ 356 357 .heygov-venue-availability { 358 background: #f9f9f9; 359 border-radius: 12px; 360 padding: 10px 10px 6px; 361 width: calc(420px + 20px); 362 margin: 24px auto; 363 cursor: default; 364 } 365 366 .heygov-venue-availability .month-disabled { 367 color: #999; 368 pointer-events: none; 369 } 370 371 .heygov-venue-availability-days, 372 .heygov-venue-availability-dates { 373 display: grid; 374 grid-template-columns: repeat(7, 1fr); 375 } 376 377 .heygov-venue-availability-days > * { 378 font-size: 14px; 379 color: #666; 380 text-align: center; 381 } 382 383 .heygov-venue-availability-dates .venue-availability-date { 384 display: block; 385 cursor: not-allowed; 386 line-height: 60px; 387 font-size: 16px; 388 border-radius: 2rem; 389 text-align: center; 390 color: #898c90; 391 text-decoration: line-through; 392 transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; 393 } 394 395 .heygov-venue-availability-dates .venue-availability-date-today { 396 background-color: #ecf2ff; 397 } 398 399 .heygov-venue-availability-dates .venue-availability-date-available { 400 font-weight: bold; 401 color: #2a9836; 402 cursor: pointer; 403 text-decoration: none; 404 } 405 406 .heygov-venue-availability-dates .venue-availability-date-available:hover { 407 background-color: rgba(0, 0, 0, 0.06); 408 } 409 410 .heygov-venue-availability-dates .venue-availability-date-selected { 411 font-weight: bold; 412 color: #fff; 413 background-color: #5e81f4; 414 } 415 416 .heygov-venue-availability-dates .venue-availability-date-selected:hover { 417 background-color: #5e81f4; 418 color: #ecf2ff; 419 } 420 421 .heygov-venue-slot { 422 display: flex; 423 align-items: center; 424 justify-content: space-between; 425 background-color: #e4f7e6; 426 border-radius: 12px; 427 padding: 15px; 428 margin-bottom: 15px; 429 color: #222; 430 transition: transform ease-in-out 0.2s; 431 } 432 433 .heygov-venue-slot:hover { 434 text-decoration: none; 435 transform: scale(1.02); 436 } 437 438 .heygov-venue-slot .venue-slot-book-btn { 439 display: inline-block; 440 background-color: #5e81f4; 441 color: #fff; 442 padding: 5px 10px; 443 border-radius: 12px; 444 font-size: 14px; 445 } 446 447 .heygov-venue-slot.venue-slot-unavailable { 448 pointer-events: none; 449 background-color: #d6d6d6; 450 color: #666; 451 } 452 453 @media (max-width: 800px) { 454 .heygov-venue-availability { 455 width: calc(350px + 20px); 456 } 457 458 .heygov-venue-availability-dates .venue-availability-date { 459 line-height: 50px; 460 } 461 } 462 463 @media (max-width: 450px) { 464 .heygov-venue-availability { 465 width: calc(280px + 20px); 466 } 467 468 .heygov-venue-availability-dates .venue-availability-date { 469 line-height: 40px; 470 font-size: 15px; 471 } 472 } -
heygov/trunk/heygov.php
r2752006 r2756295 4 4 Plugin URI: https://heygov.com 5 5 Description: Manage the HeyGov widget on your municipality WordPress website 6 Version: 1. 4.06 Version: 1.5.0 7 7 Requires at least: 5.0 8 8 Requires PHP: 7.0 … … 19 19 20 20 function heygov_validate_id(string $id) { 21 22 21 if (empty($id)) { 23 22 return new \WP_Error('heygov_empty_id', 'HeyGov ID is empty'); … … 57 56 add_action('wp_footer', array($resource, 'load_widget')); 58 57 add_action('wp_footer', array($resource, 'load_apps_banner')); 58 add_shortcode('heygov-widget', array($setting, 'heygov_shortcode')); 59 59 add_shortcode('heygov-forms', array($resource, 'heygov_forms_shortcode')); 60 add_shortcode('heygov- widget', array($setting, 'heygov_shortcode'));60 add_shortcode('heygov-venue', array($resource, 'heygov_venue_shortcode')); 61 61 62 62 } -
heygov/trunk/includes/class/heygov-resource.php
r2752006 r2756295 5 5 public function load_admin_includes() { 6 6 wp_enqueue_style('heygov-admin', HEYGOV_URL . 'assets/css/heygov-admin.css', [], '1.4'); 7 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css', [], '1. 4');8 wp_enqueue_script('heygov-admin', HEYGOV_URL . 'assets/heygov-admin.js', [], '1.4', true); 7 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css', [], '1.5.0'); 8 wp_enqueue_script('heygov-admin', HEYGOV_URL . 'assets/heygov-admin.js', [], '1.4', true); 9 9 10 10 wp_localize_script('heygov-admin', 'HeyGov', [ … … 15 15 16 16 public function load_site_includes() { 17 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css', [], '1.4'); 17 wp_enqueue_style('heygov-site', HEYGOV_URL . 'assets/css/heygov-site.css', [], '1.5.0'); 18 wp_enqueue_script('heygov-venues', HEYGOV_URL . 'assets/heygov-venues.js', [], '1.5.0', true); 18 19 } 19 20 … … 61 62 $department = $args['department']; 62 63 63 $heygov_id = get_option('heygov_id');64 $heygov_id = get_option('heygov_id'); 64 65 $forceUpdate = isset($_REQUEST['heygov-refresh-forms']); 65 66 … … 93 94 94 95 return $forms; 95 }96 } 96 97 98 public function heygov_venue_shortcode( $atts = array()) { 99 $args = shortcode_atts( array( 100 'venue' => false, 101 ), $atts ); 102 103 $heygov_id = get_option('heygov_id'); 104 105 if (is_wp_error($heygov_id)) { 106 $venue = $heygov_id; 107 } else if (!$args['venue']) { 108 $venue = new WP_Error('heygov_venue_shortcode', 'No venue ID provided in shortcode'); 109 } else if ( false === ( $venue = get_transient( 'venue-' . $args['venue'] ) ) ) { 110 // It wasn't there, so regenerate the data and save the transient 111 $response = wp_remote_get('https://api.heygov.com/' . $heygov_id . '/venues/' . $args['venue']); 112 $responseCode = wp_remote_retrieve_response_code($response); 113 114 if ($responseCode !== 200) { 115 $venue = is_wp_error($response) ? $response : new WP_Error('heygov_venue_shortcode', 'Error loading venue info from HeyGov API (' . $responseCode . ')'); 116 } else { 117 $venue = wp_remote_retrieve_body($response); 118 $venue = json_decode($venue, true); 119 set_transient( 'venue-' . $args['venue'], $venue, HOUR_IN_SECONDS ); 120 } 121 } 122 123 // generate forms HTML 124 ob_start(); 125 126 require_once HEYGOV_DIR . 'includes/view/show-venue.php'; 127 128 $html = ob_get_contents(); 129 ob_end_clean(); 130 131 return $html; 132 } 97 133 } -
heygov/trunk/includes/view/show-heygov-settings.php
r2752006 r2756295 3 3 // HeyGov ID 4 4 $heygov_id = get_option('heygov_id'); 5 6 // widget info 5 7 $heygov_features = explode(',', get_option('heygov_features') ?: 'issues'); 6 7 // widget info8 8 $heygov_btn_text = get_option('heygov_btn_text') ?: 'Report an Issue'; 9 9 $heygov_btn_position = get_option('heygov_btn_position') ?: 'middle-right'; … … 24 24 $heygov_id = $id; 25 25 update_option('heygov_id', $id); 26 27 if (isset($_POST['heygov']['features']) && is_array($_POST['heygov']['features'])) {28 $heygov_features = array_map('sanitize_key', $_POST['heygov']['features']);29 30 update_option('heygov_features', implode(',', $heygov_features));31 }32 33 26 ?> 34 <div class="notice notice-success"><p>HeyGov ID and apps have been saved.</p></div>27 <div class="notice notice-success"><p>HeyGov ID is updated.</p></div> 35 28 <?php 36 29 } … … 39 32 // save widget settings 40 33 if (isset($_POST['heygov_widget'])) { 34 $heygov_features = array_map('sanitize_key', $_POST['heygov_widget']['features']); 41 35 $heygov_btn_text = sanitize_text_field($_POST['heygov_widget']['text']); 42 36 $heygov_btn_position = sanitize_text_field($_POST['heygov_widget']['position']); 37 38 update_option('heygov_features', implode(',', $heygov_features)); 43 39 update_option('heygov_btn_text', $heygov_btn_text); 44 40 update_option('heygov_btn_position', $heygov_btn_position); 45 46 41 ?> 47 42 <div class="notice notice-success"><p>HeyGov widget is updated.</p></div> … … 78 73 <td> 79 74 <input type="text" name="heygov[id]" class="regular-text" id="heygov_id" value="<?php echo esc_attr($heygov_id ?: ''); ?>" /> 80 <p class="description">Usually the website domain without <code>www.</code>, ex: <code>town.com</code></p> 81 </td> 82 </tr> 83 <tr> 84 <th><label for="heygov_id">Active apps</label></th> 85 <td> 86 <fieldset> 87 <legend class="screen-reader-text"><span>HeyGov apps to enable </span></legend> 88 <p> 89 <label><input name="heygov[features][]" type="checkbox" value="payments" <?php checked(in_array('payments', $heygov_features)) ?>> HeyGov QuickPay</label><br> 90 <label><input name="heygov[features][]" type="checkbox" value="forms" <?php checked(in_array('forms', $heygov_features)) ?>> HeyLicense</label><br> 91 <label><input name="heygov[features][]" type="checkbox" value="venues" <?php checked(in_array('venues', $heygov_features)) ?>> HeyReserve</label><br> 92 <label><input name="heygov[features][]" type="checkbox" value="issues" <?php checked(in_array('issues', $heygov_features)) ?>> HeyGov 311</label> 93 </p> 94 <p class="description"> 95 Which HeyGov apps should be displayed in the widget? 96 </p> 97 </fieldset> 75 <p class="description">Usually the website domain without www, ex: <code>town.com</code></p> 98 76 </td> 99 77 </tr> … … 101 79 <th class="heygov-py-0"></th> 102 80 <td class="heygov-py-0"> 103 <p class="submit"><input type="submit" name="heygov_submit" id="heygov_submit" class="button button-primary" value="Update HeyGov settings"></p> 81 <p class="heygov-py-0 submit"> 82 <input type="submit" name="heygov_submit" id="heygov_submit" class="button button-primary" value="Update HeyGov ID"> 83 </p> 104 84 </td> 105 85 </tr> … … 110 90 <?php if ($heygov_id) : ?> 111 91 <div class="heygov-feature"> 112 <h3>HeyGov widget appearance</h3>92 <h3>HeyGov Widget</h3> 113 93 114 94 <form action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post"> … … 117 97 <tbody> 118 98 <tr> 119 <th><label for="heygov_btn_position">Widget button position</label></th> 99 <th><label for="heygov_widget_apps">Active apps</label></th> 100 <td> 101 <fieldset> 102 <legend class="screen-reader-text"><span>HeyGov apps to enable </span></legend> 103 <p> 104 <label><input name="heygov_widget[features][]" type="checkbox" value="payments" <?php checked(in_array('payments', $heygov_features)) ?>> HeyGov QuickPay</label><br> 105 <label><input name="heygov_widget[features][]" type="checkbox" value="forms" <?php checked(in_array('forms', $heygov_features)) ?>> HeyLicense</label><br> 106 <label><input name="heygov_widget[features][]" type="checkbox" value="venues" <?php checked(in_array('venues', $heygov_features)) ?>> HeyReserve</label><br> 107 <label><input name="heygov_widget[features][]" type="checkbox" value="issues" <?php checked(in_array('issues', $heygov_features)) ?>> HeyGov 311</label> 108 </p> 109 <p class="description"> 110 Which HeyGov apps should be displayed in the widget? 111 </p> 112 </fieldset> 113 </td> 114 </tr> 115 116 <tr> 117 <th><label for="heygov_btn_position">Button position</label></th> 120 118 <td> 121 119 <select class="regular-text" name="heygov_widget[position]" id="heygov_btn_position"> … … 130 128 131 129 <tr> 132 <th><label for="heygov_btn_text"> Widget button text</label></th>130 <th><label for="heygov_btn_text">Button text</label></th> 133 131 <td> 134 132 <input type="text" name="heygov_widget[text]" class="regular-text" id="heygov_btn_text" value="<?php echo esc_attr($heygov_btn_text); ?>" /> … … 138 136 139 137 <tr> 140 <th scope="row"><label for="heygov_widget_shortcode">Widget Shortcode</label></th>141 <td>142 <input type="text" class="regular-text" id="heygov_widget_shortcode" value="[heygov-widget]" readonly />143 <p class="description">Use this schortcode to include the HeyGov widget on any page</p>144 </td>145 </tr>146 147 <tr>148 138 <th class="heygov-py-0"></th> 149 139 <td class="heygov-py-0"> 150 <p class=" submit"><input type="submit" name="heygov_submit" id="heygov_submit" class="button button-primary" value="Update widget"></p>140 <p class="heygov-py-0 submit"><input type="submit" name="heygov_submit" id="heygov_submit" class="button button-primary" value="Update widget"></p> 151 141 </td> 152 142 </tr> … … 202 192 </div> 203 193 204 <p class="submit"><input type="submit" name="heygov_submit" id="heygov_submit" class="button button-primary" value="Update banner"></p> 194 <p class="heygov-py-0 submit"> 195 <input type="submit" name="heygov_submit" id="heygov_submit" class="button button-primary" value="Update banner"> 196 </p> 205 197 </form> 206 207 198 </div> 208 199 209 200 <!-- Adding forms from heygov to muni website --> 210 201 <div class="heygov-feature"> 211 <h3 class="heygov-h3">Display heygov forms on your website</h3> 212 <p>Copy shortcode from below ⬇️ & paste on to the page where you want the HeyGov forms to be displayed </p> 213 <code>[heygov-forms]</code> 214 215 <div class="heygov-pt-3"> 216 <h6 class="heygov-h6">Shortcode filter examples</h6> 217 <div> 218 <!-- Container size shortcode filter --> 219 <p><b>Container size</b></p> 220 <code>[heygov-forms maxcolumns="4"]</code> 221 <p>Maxcolumns number is the number of forms card that will be displayed on large screen</p> 222 </div> 223 <div> 224 <!-- Department filter --> 225 <p><b>Department id, slug or name </b></p> 226 <p><code>[heygov-forms department="4"]</code></p> 227 <p><code>[heygov-forms department="parks-and-rec"]</code></p> 228 <p><code>[heygov-forms department="Parks and Rec"]</code></p> 229 </div> 230 </div> 231 202 <h3 class="heygov-h3">Embed HeyGov apps</h3> 203 <p>Use these shortcodes to embed individual apps on the pages you want.</p> 204 205 <table class="form-table"> 206 <tbody> 207 208 <tr> 209 <th scope="row"><label for="heygov_widget_shortcode">Widget</label></th> 210 <td> 211 <input type="text" class="large-text" id="heygov_widget_shortcode" value="[heygov-widget]" readonly /> 212 <p class="description">Embed the HeyGov widget directly on any page, ex: Contact page</p> 213 </td> 214 </tr> 215 216 <tr> 217 <th scope="row"><label for="heygov_widget_forms">Permits and Licenses</label></th> 218 <td> 219 <input type="text" class="large-text" id="heygov_widget_forms" value='[heygov-forms maxcolumns="4" department="Parks and Rec"]' readonly /> 220 <p class="description">Display a section with permits and licenses. Use <code>department</code> attribute to filter forms by department ID or name.</p> 221 </td> 222 </tr> 223 224 <tr> 225 <th scope="row"><label for="heygov_widget_venue">Venue calendar</label></th> 226 <td> 227 <input type="text" class="large-text" id="heygov_widget_venue" value='[heygov-venue venue="venue-unique-id"]' readonly /> 228 <p class="description">Display availability calendar for a specific venue. <code>venue</code> attribute is required.</p> 229 </td> 230 </tr> 231 232 </tbody> 233 </table> 232 234 233 235 </div> -
heygov/trunk/readme.txt
r2752006 r2756295 5 5 Tested up to: 6.0 6 6 Requires PHP: 7.0 7 Stable tag: 1. 4.07 Stable tag: 1.5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 37 37 == Changelog == 38 38 39 = 1.5.0 = 40 * Added - Shortcode to display venue availability 41 39 42 = 1.4.0 = 40 * Added - Shortcode to display jurisdictions forms 43 * Added - Shortcode to display jurisdictions forms 41 44 42 45 = 1.3.1 =
Note: See TracChangeset
for help on using the changeset viewer.