Theme: Add blocks and block binding for pledge details

See #276
This commit is contained in:
Kelly Dwan 2024-08-28 17:34:24 -04:00
parent 7b2525aedb
commit cbabdbb33e
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
11 changed files with 356 additions and 15 deletions

View file

@ -43,6 +43,8 @@ jQuery( document ).ready( function( $ ) {
}
}
button.setAttribute( 'aria-expanded', true );
modal.removeAttribute( 'hidden' );
modalBg.removeAttribute( 'hidden' );
modal.style.top = position.top + 'px';
@ -66,6 +68,8 @@ jQuery( document ).ready( function( $ ) {
modal.hidden = true;
modalBg.hidden = true;
button.setAttribute( 'aria-expanded', false );
// Wait a tick before setting focus. See https://github.com/WICG/inert#performance-and-gotchas
setTimeout( function() {
if ( button ) {

View file

@ -6,7 +6,7 @@ defined( 'WPINC' ) || die();
?>
<div class="edit-pledge-wrapper">
<button id="toggle-management-link-form" class="button button-link">
<button id="toggle-management-link-form" class="button button-link" aria-expanded="false" aria-controls="send-link-dialog">
<span class="dashicons dashicons-edit" aria-hidden="true"></span>
<?php esc_html_e( 'Edit Pledge', 'wporg-5ftf' ); ?>
</button>

View file

@ -25,10 +25,12 @@ $pledge_id = ( Pledge\CPT_ID === get_post_type() ) ? get_post()->ID : absint( $_
<div class="message"></div>
<input
type="submit"
class="button"
name="get_manage_pledge_link"
value="<?php esc_attr_e( 'Submit', 'wporg-5ftf' ); ?>"
/>
<div class="wp-block-button is-small">
<input
type="submit"
class="button wp-block-button__link"
name="get_manage_pledge_link"
value="<?php esc_attr_e( 'Submit', 'wporg-5ftf' ); ?>"
/>
</div>
</form>