Skip to content

Commit 780cd80

Browse files
Add sandbox constant + fix plural campaign wording
1 parent 7235f0c commit 780cd80

5 files changed

Lines changed: 26 additions & 3 deletions

File tree

admin/class-hello-asso-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ function ha_search_campaign()
477477
return;
478478
}
479479

480-
$sandbox = false;
480+
$sandbox = HELLO_ASSO_SANDBOX_MODE ?? false;
481481
$organizationSlug = '';
482482

483483
$organizationSlug = sanitize_title_with_dashes($value);

admin/css/hello-asso-admin.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,5 +1505,18 @@ a:focus {
15051505
}
15061506

15071507
#hello_asso_metabox {
1508-
visibility: hidden;
1508+
visibility: hidden;
1509+
}
1510+
1511+
.ha-container-dashboard .ha-checkbox{
1512+
width: 1rem;
1513+
margin:0;
1514+
padding: 0;
1515+
}
1516+
.ha-form-group{
1517+
display:flex;
1518+
align-items:center;
1519+
gap:10px;
1520+
justify-content:flex-start;
1521+
margin: 0 0 15px;
15091522
}

admin/view/campaign.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
<h5>La synchronisation a échouée</h5>
163163
</div>
164164
<?php endif; ?>
165-
<h3><?= esc_html($nbCampaign); ?> campagnes publiques synchronisées</h3>
165+
<h3><?= esc_html(sprintf(_n('%d campagne publique synchronisée', '%d campagnes publiques synchronisées', $nbCampaign, 'hello-asso'), $nbCampaign)); ?></h3>
166166
</div>
167167
<div class="ha-header-col">
168168
<a href="<?= esc_url(admin_url()); ?>admin.php?page=hello-asso" class="ha-btn ha-btn-primary">Resynchroniser</a>

admin/view/dashboard.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
<path d="M5 5L15 15" stroke="#BEBED7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
7070
</svg>
7171
</span>
72+
<!-- <label for="ha-sandbox-checkbox" class="ha-sandbox-label ha-form-group">
73+
<input type="checkbox" class="ha-checkbox" id="ha-sandbox-checkbox">
74+
Mode bac à sable
75+
</label> -->
76+
7277
</div>
7378
<button class="ha-btn ha-btn-primary searchCampaign" <?php if (get_option('ha-slug') == '') {
7479
echo 'disabled';

hello-asso.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
*/
3939
define('HELLO_ASSO_VERSION', '1.1.23');
4040

41+
/**
42+
* Enable or disable sandbox mode.
43+
*/
44+
define('HELLO_ASSO_SANDBOX_MODE', true);
45+
4146
/**
4247
* The code that runs during plugin activation.
4348
* This action is documented in includes/class-hello-asso-activator.php

0 commit comments

Comments
 (0)