[Dashboard] User option for banner

This commit is contained in:
Andreas Kristiansen
2025-04-28 11:46:28 +02:00
parent 90f4c0a214
commit 58373b9f52
7 changed files with 67 additions and 52 deletions

View File

@@ -237,6 +237,16 @@
</select>
<small id="user_dashboard_map_Help" class="form-text text-muted"><?= __("Choose whether to show map on dashboard or not"); ?></small>
</div>
<div class="mb-3">
<label for="user_dashboard_banner"><?= __("Dashboard Notification Banner"); ?></label>
<?php if(!isset($user_dashboard_banner)) { $user_dashboard_banner='Y'; }?>
<select class="form-select" id="user_dashboard_banner" name="user_dashboard_banner" aria-describedby="user_dashboard_banner_Help" required>
<option value='true' <?php if($user_dashboard_banner == "true") { echo "selected=\"selected\""; } ?>><?= __("Enabled"); ?></option>
<option value='false' <?php if($user_dashboard_banner == "false") { echo "selected=\"selected\""; } ?>><?= __("Disabled"); ?></option>
</select>
<small id="user_dashboard_banner_Help" class="form-text text-muted"><?= __("This allows to disable the global notification banner on the dashboard."); ?></small>
</div>
</div>
</div>
</div>
@@ -864,7 +874,7 @@
<small class="form-text text-muted">
<?= sprintf(__("Note: In order to use this widget, you need to have at least one CAT radio configured and working.")); ?>
<?php if (isset($on_air_widget_url)) {
// when adding user, the $on_air_widget_url url is not yet availalable, hence the if condition here
// when adding user, the $on_air_widget_url url is not yet availalable, hence the if condition here
print("<br>");
printf(__("When enabled, widget will be available at %s."), "<a href='$on_air_widget_url' target='_blank'>$on_air_widget_url</a>");
} ?>