Skip to content

Commit fd12443

Browse files
authored
Merge branch 'develop' into filip/v19/fix-user-task-points
2 parents fac7ef1 + 549ed2d commit fd12443

8 files changed

Lines changed: 25 additions & 8 deletions

File tree

assets/css/page-widgets/suggested-tasks.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@
453453
/* If there are no other elements in the form, align the button to the left. */
454454
&:only-child {
455455
padding-top: 0;
456+
}
457+
458+
&:only-child,
459+
&.prpl-steps-nav-wrapper-align-left {
456460
justify-content: flex-start;
457461

458462
/* Display the spinner after the button. */

classes/suggested-tasks/providers/class-disable-comments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public function print_popover_instructions() {
144144
*/
145145
public function print_popover_form_contents() {
146146
?>
147-
<div class="prpl-steps-nav-wrapper" style="justify-content: flex-start;margin-bottom: 1.25rem;">
148-
<button type="submit" class="prpl-button prpl-button-primary" style="order:-2;">
147+
<div class="prpl-steps-nav-wrapper prpl-steps-nav-wrapper-align-left" style="justify-content: flex-start;margin-bottom: 1.25rem;">
148+
<button type="submit" class="prpl-button prpl-button-primary">
149149
<?php \esc_html_e( 'Disable new comments', 'progress-planner' ); ?>
150150
</button>
151151
</div>

classes/suggested-tasks/providers/class-select-locale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function print_popover_form_contents() {
226226
]
227227
);
228228

229-
$this->print_submit_button( \__( 'Select locale', 'progress-planner' ) );
229+
$this->print_submit_button( \__( 'Select locale', 'progress-planner' ), 'prpl-steps-nav-wrapper-align-left' );
230230
}
231231

232232
/**

classes/suggested-tasks/providers/class-select-timezone.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function print_popover_form_contents() {
144144
</select>
145145
</label>
146146
<?php
147-
$this->print_submit_button( \__( 'Set site timezone', 'progress-planner' ) );
147+
$this->print_submit_button( \__( 'Set site timezone', 'progress-planner' ), 'prpl-steps-nav-wrapper-align-left' );
148148
}
149149

150150
/**

classes/suggested-tasks/providers/class-set-date-format.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function print_popover_form_contents() {
243243
</fieldset>
244244
</div>
245245
<?php
246-
$this->print_submit_button( \__( 'Set date format', 'progress-planner' ) );
246+
$this->print_submit_button( \__( 'Set date format', 'progress-planner' ), 'prpl-steps-nav-wrapper-align-left' );
247247
}
248248

249249
/**

classes/suggested-tasks/providers/class-site-icon.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function print_popover_form_contents() {
120120
<?php \esc_html_e( 'Choose or Upload Image', 'progress-planner' ); ?>
121121
</button>
122122
<input type="hidden" name="site_icon" id="prpl-site-icon-id" value="<?php echo \esc_attr( $site_icon_id ); ?>">
123-
<div class="prpl-steps-nav-wrapper">
123+
<div class="prpl-steps-nav-wrapper prpl-steps-nav-wrapper-align-left">
124124
<button type="submit" class="prpl-button prpl-button-primary" id="prpl-set-site-icon-button" <?php echo $site_icon_id ? '' : 'disabled'; ?>>
125125
<?php \esc_html_e( 'Set site icon', 'progress-planner' ); ?>
126126
</button>

classes/suggested-tasks/providers/class-tasks-interactive.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,18 @@ public function print_popover_instructions() {
211211
*
212212
* @param string $button_text The text for the button.
213213
* If empty, the default text "Submit" will be used.
214+
* @param string $css_class The CSS class for the wrapper.
214215
*
215216
* @return void
216217
*/
217-
protected function print_submit_button( $button_text = '' ) {
218+
protected function print_submit_button( $button_text = '', $css_class = '' ) {
218219
if ( empty( $button_text ) ) {
219220
$button_text = \__( 'Submit', 'progress-planner' );
220221
}
222+
223+
$css_class = empty( $css_class ) ? 'prpl-steps-nav-wrapper' : 'prpl-steps-nav-wrapper ' . $css_class;
221224
?>
222-
<div class="prpl-steps-nav-wrapper">
225+
<div class="<?php echo \esc_attr( $css_class ); ?>">
223226
<button type="submit" class="prpl-button prpl-button-primary">
224227
<?php echo \esc_html( $button_text ); ?>
225228
</button>

classes/utils/class-debug-tools.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ public function add_toolbar_items( $admin_bar ) {
7777
]
7878
);
7979

80+
// Show all suggested tasks.
81+
$admin_bar->add_node(
82+
[
83+
'id' => 'prpl-show-all-suggested-tasks',
84+
'parent' => 'prpl-debug',
85+
'title' => 'Show All Suggested Tasks',
86+
'href' => \add_query_arg( 'prpl_show_all_recommendations', $this->current_url ),
87+
]
88+
);
89+
8090
$this->add_delete_submenu_item( $admin_bar );
8191

8292
$this->add_upgrading_tasks_submenu_item( $admin_bar );

0 commit comments

Comments
 (0)