More replacements of 0 in frontend

This commit is contained in:
phl0
2025-11-14 08:34:35 +01:00
parent ab0412459d
commit 855288d0dc
2 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
<div class="container">
<br>
<h2><?= sprintf(__("Club Permissions for %s"), $club->user_callsign); ?></h2>
<h2><?= sprintf(__("Club Permissions for %s"), str_replace('0', 'Ø', $club->user_callsign)); ?></h2>
<!-- <a class="btn btn-primary" href="<?= site_url('user'); ?>"><i class="fas fa-arrow-left"></i> <?= __("Go back"); ?></a> -->
<?php $this->load->view('layout/messages'); ?>
@@ -164,7 +164,7 @@
<div class="modal-body">
<input type="hidden" name="club_id" value="<?php echo $club->user_id; ?>">
<p>
<?= sprintf(__("You can only add users to the %s Clubstation if they already exist on this Wavelog Server."), $club->user_callsign); ?>
<?= sprintf(__("You can only add users to the %s Clubstation if they already exist on this Wavelog Server."), str_replace('0', 'Ø', $club->user_callsign)); ?>
<?= __("If they don't exist, please ask your Wavelog Administrator to create an account for them."); ?><br><br>
<?= __("Search for the user by their callsign or first/lastname and select the permission level."); ?>
</p>
@@ -231,7 +231,7 @@
<tr>
<td style="text-align: center; vertical-align: middle;"><?php echo $member->user_firstname; ?></td>
<td style="text-align: center; vertical-align: middle;"><?php echo $member->user_lastname; ?></td>
<td style="text-align: center; vertical-align: middle;"><?php echo $member->user_callsign; ?></td>
<td style="text-align: center; vertical-align: middle;"><?php echo str_replace('0', 'Ø' ,$member->user_callsign); ?></td>
<td style="text-align: center; vertical-align: middle;"><?php echo $member->user_name; ?></td>
<td style="text-align: center; vertical-align: middle;"><?php echo '<a href="mailto:' . $member->user_email . '">' . $member->user_email . '</a>'; ?></td>
<td style="text-align: center; vertical-align: middle;">
@@ -272,7 +272,7 @@
<tbody>
<tr>
<td class="text-center pt-3">
<p><b><?php echo $member->user_callsign; ?> - <?php echo $member->user_firstname . ' ' . $member->user_lastname; ?></b></p>
<p><b><?php echo str_replace('0', 'Ø', $member->user_callsign); ?> - <?php echo $member->user_firstname . ' ' . $member->user_lastname; ?></b></p>
</td>
<td>
<select class="form-select" id="permission" name="permission" required>
@@ -317,7 +317,7 @@
<div class="mb-3">
<p>
<?= sprintf(__("Callsign: %s"), $member->user_callsign); ?><br>
<?= sprintf(__("Callsign: %s"), str_replace('0', 'Ø', $member->user_callsign)); ?><br>
<?= sprintf(__("Role: %s"), $permissions[$member->p_level]); ?>
</p>
</div>
@@ -339,4 +339,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@@ -52,11 +52,11 @@ $(document).ready(function(){
},
render: {
option: function(item) {
let string = '<div style="text-align: left; margin-left: 10px; padding: 3px;"><span class="text-muted small">[' + item.user_name + ']</span> ' + item.user_callsign.toUpperCase() + ' - ' + item.user_firstname + ' ' + item.user_lastname + '</div>';
let string = '<div style="text-align: left; margin-left: 10px; padding: 3px;"><span class="text-muted small">[' + item.user_name + ']</span> ' + item.user_callsign.toUpperCase().replaceAll(/0/g, 'Ø') + ' - ' + item.user_firstname + ' ' + item.user_lastname + '</div>';
return string;
},
item: function(item) {
let string = '<div style="text-align: left; margin-left: 2px;"><span class="text-muted small">[' + item.user_name + ']</span> ' + item.user_callsign.toUpperCase() + ' - ' + item.user_firstname + ' ' + item.user_lastname + '</div>';
let string = '<div style="text-align: left; margin-left: 2px;"><span class="text-muted small">[' + item.user_name + ']</span> ' + item.user_callsign.toUpperCase().replaceAll(/0/g, 'Ø') + ' - ' + item.user_firstname + ' ' + item.user_lastname + '</div>';
return string;
}
},