Skip to content

Commit

Permalink
changing language for suggest change to report an update
Browse files Browse the repository at this point in the history
  • Loading branch information
dgershman committed Sep 12, 2024
1 parent 0b1b378 commit 70f9ff0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Crouton
"native_lang" => '',
"has_meeting_count" => false,
"google_api_key" => "",
"suggest_change_url" => "",
"report_update_url" => "",
);
private $hasFilters = [
"has_days",
Expand Down
10 changes: 5 additions & 5 deletions croutonjs/src/js/crouton-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function Crouton(config) {
force_timeformat_in_querystring: true, // Set to false to shorten generated meeting detail query strings
force_language_in_querystring: true, // Set to false to shorten generated meeting detail query strings
theme: "jack", // Allows for setting pre-packaged themes. Choices are listed here: https://github.com/bmlt-enabled/crouton/blob/master/croutonjs/dist/templates/themes
suggest_change_url: "", // URL to edit a meeting for BMLT-workflow plugin
report_update_url: "", // URL to edit a meeting for BMLT-workflow plugin
meeting_data_template: croutonDefaultTemplates.meeting_data_template,
metadata_template: croutonDefaultTemplates.metadata_template,
observer_template: croutonDefaultTemplates.observer_template,
Expand Down Expand Up @@ -216,7 +216,7 @@ function Crouton(config) {
"parentServiceBodyType",
"map_word",
"share_word",
"suggest_change_word",
"report_update_word",
"show_qrcode",
"formatted_day",
"formatted_address",
Expand Down Expand Up @@ -818,7 +818,7 @@ function Crouton(config) {
: "";
meetingData[m]['map_word'] = self.localization.getWord('map').toUpperCase();
meetingData[m]['share_word'] = self.localization.getWord('share').toUpperCase();
meetingData[m]['suggest_change_word'] = self.localization.getWord('suggest change');
meetingData[m]['report_update_word'] = self.localization.getWord('report update');
meetingData[m]['show_qrcode'] = self.config['show_qrcode'];
for (var k in meetingData[m]) {
if (meetingData[m].hasOwnProperty(k) && typeof meetingData[m][k] === 'string') {
Expand Down Expand Up @@ -1505,11 +1505,11 @@ crouton_Handlebars.registerHelper('canShare', function(data, options) {
});

crouton_Handlebars.registerHelper('editEnabled', function(data, options) {
return crouton.config.suggest_change_url !== "" ? getTrueResult(options, this) : getFalseResult(options, this)
return crouton.config.report_update_url !== "" ? getTrueResult(options, this) : getFalseResult(options, this)
});

crouton_Handlebars.registerHelper('editUrl', function() {
return crouton.config.suggest_change_url;
return crouton.config.report_update_url;
});

/**
Expand Down
2 changes: 1 addition & 1 deletion croutonjs/src/templates/meetings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<a href="javascript:void(0);" id="share-button" class="btn btn-primary btn-xs" onclick='navigator.share({ text: JSON.stringify("{{this.formatted_day}} {{this.start_time_formatted}} - {{this.end_time_formatted}} {{this.meeting_name}} {{this.location_text}} {{this.formatted_address}} {{this.formatted_location_info}}{{#if this.virtual_meeting_additional_info}} {{this.virtual_meeting_additional_info}}{{/if}}"), url: "{{#isVirtualOrHybrid this}}{{#if this.virtual_meeting_link}}{{this.virtual_meeting_link}}{{/if}}{{#if this.phone_meeting_number}}{{this.phone_meeting_number}}{{/if}}{{/isVirtualOrHybrid}}{{#isInPersonOrHybrid this}} https://www.google.com/maps/search/?api=1&amp;query={{this.latitude}},{{this.longitude}}&amp;q={{this.latitude}},{{this.longitude}}{{/isInPersonOrHybrid}}"})'><span class="glyphicon glyphicon-share"></span> {{this.share_word}}</a>
{{/canShare}}
{{#editEnabled this}}
<a href="{{ editUrl }}?meeting_id={{this.id_bigint}}" id="share-button" class="btn btn-primary btn-xs" target="_blank"><span class="glyphicon glyphicon-edit"></span> {{this.suggest_change_word}}</a>
<a href="{{ editUrl }}?meeting_id={{this.id_bigint}}" id="share-button" class="btn btn-primary btn-xs" target="_blank"><span class="glyphicon glyphicon-edit"></span> {{this.report_update_word}}</a>
{{/editEnabled}}
{{> offerIcsButton}}
</td>
Expand Down
4 changes: 2 additions & 2 deletions partials/_instructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
</div>
<h3 class="help-accordian"><strong>Suggest Change</strong></h3>
<div>
<p>You can set a short setting so that a button that says "Suggest Change" appears. When the button is clicked, it links back to a BMLT workflow page with that meeting.</p>
<p><strong>[bmlt_tabs suggest_change_url="/edit-meeting"]</strong></p>
<p>You can set a short setting so that a button that says "Report an Update" appears. When the button is clicked, it links back to a BMLT workflow page with that meeting.</p>
<p><strong>[bmlt_tabs report_update_url="/edit-meeting"]</strong></p>
</div>
</div>

0 comments on commit 70f9ff0

Please sign in to comment.