Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/css/page-widgets/suggested-tasks.css
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@
/* If there are no other elements in the form, align the button to the left. */
&:only-child {
padding-top: 0;
}

&:only-child,
&.prpl-steps-nav-wrapper-align-left {
justify-content: flex-start;

/* Display the spinner after the button. */
Expand Down
4 changes: 2 additions & 2 deletions classes/suggested-tasks/providers/class-disable-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public function print_popover_instructions() {
*/
public function print_popover_form_contents() {
?>
<div class="prpl-steps-nav-wrapper" style="justify-content: flex-start;margin-bottom: 1.25rem;">
<button type="submit" class="prpl-button prpl-button-primary" style="order:-2;">
<div class="prpl-steps-nav-wrapper prpl-steps-nav-wrapper-align-left" style="justify-content: flex-start;margin-bottom: 1.25rem;">
<button type="submit" class="prpl-button prpl-button-primary">
<?php \esc_html_e( 'Disable new comments', 'progress-planner' ); ?>
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion classes/suggested-tasks/providers/class-select-locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function print_popover_form_contents() {
]
);

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function print_popover_form_contents() {
</select>
</label>
<?php
$this->print_submit_button( \__( 'Set site timezone', 'progress-planner' ) );
$this->print_submit_button( \__( 'Set site timezone', 'progress-planner' ), 'prpl-steps-nav-wrapper-align-left' );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function print_popover_form_contents() {
</fieldset>
</div>
<?php
$this->print_submit_button( \__( 'Set date format', 'progress-planner' ) );
$this->print_submit_button( \__( 'Set date format', 'progress-planner' ), 'prpl-steps-nav-wrapper-align-left' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion classes/suggested-tasks/providers/class-site-icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function print_popover_form_contents() {
<?php \esc_html_e( 'Choose or Upload Image', 'progress-planner' ); ?>
</button>
<input type="hidden" name="site_icon" id="prpl-site-icon-id" value="<?php echo \esc_attr( $site_icon_id ); ?>">
<div class="prpl-steps-nav-wrapper">
<div class="prpl-steps-nav-wrapper prpl-steps-nav-wrapper-align-left">
<button type="submit" class="prpl-button prpl-button-primary" id="prpl-set-site-icon-button" <?php echo $site_icon_id ? '' : 'disabled'; ?>>
<?php \esc_html_e( 'Set site icon', 'progress-planner' ); ?>
</button>
Expand Down
7 changes: 5 additions & 2 deletions classes/suggested-tasks/providers/class-tasks-interactive.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,18 @@ public function print_popover_instructions() {
*
* @param string $button_text The text for the button.
* If empty, the default text "Submit" will be used.
* @param string $css_class The CSS class for the wrapper.
*
* @return void
*/
protected function print_submit_button( $button_text = '' ) {
protected function print_submit_button( $button_text = '', $css_class = '' ) {
if ( empty( $button_text ) ) {
$button_text = \__( 'Submit', 'progress-planner' );
}

$css_class = empty( $css_class ) ? 'prpl-steps-nav-wrapper' : 'prpl-steps-nav-wrapper ' . $css_class;
?>
<div class="prpl-steps-nav-wrapper">
<div class="<?php echo \esc_attr( $css_class ); ?>">
<button type="submit" class="prpl-button prpl-button-primary">
<?php echo \esc_html( $button_text ); ?>
</button>
Expand Down
Loading