final-integration-form-delete.php
6 years ago
migrate-dismiss-confirmation.php
6 years ago
modal-integration.php
4 years ago
modal-migrate-aweber.php
3 years ago
modal-preview.php
5 years ago
remove-active-integration.php
3 years ago
modal-migrate-aweber.php
107 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Modal for when migrating Aweber. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.1.1 |
| 7 | */ |
| 8 | |
| 9 | $aweber = Hustle_Aweber::get_instance(); |
| 10 | ?> |
| 11 | |
| 12 | <div class="sui-modal sui-modal-sm"> |
| 13 | |
| 14 | <div |
| 15 | role="dialog" |
| 16 | id="hustle-dialog-migrate--aweber" |
| 17 | class="sui-modal-content" |
| 18 | aria-modal="true" |
| 19 | aria-labelledby="hustle-dialog-migrate--aweber-title" |
| 20 | aria-describedby="hustle-dialog-migrate--aweber-description" |
| 21 | > |
| 22 | |
| 23 | <div class="sui-box"> |
| 24 | |
| 25 | <div class="sui-box-header sui-content-center sui-flatten sui-spacing-top--60"> |
| 26 | |
| 27 | <button class="sui-button-icon sui-button-float--right" data-modal-close> |
| 28 | <i class="sui-icon-close sui-md" aria-hidden="true"></i> |
| 29 | <span class="sui-screen-reader-text"><?php esc_html_e( 'Close this dialog window', 'hustle' ); ?></span> |
| 30 | </button> |
| 31 | |
| 32 | <figure class="sui-box-logo" aria-hidden="true"> |
| 33 | <img src="<?php echo esc_url( $aweber->get_logo_2x() ); ?>" alt="Aweber " /> |
| 34 | </figure> |
| 35 | |
| 36 | <h3 id="hustle-dialog-migrate--aweber-title" class="sui-box-title sui-lg"><?php esc_html_e( 'Migrate Aweber', 'hustle' ); ?></h3> |
| 37 | |
| 38 | <?php /* translators: 1. opening 'b' tag, 2. closing 'b' tag */ ?> |
| 39 | <p id="hustle-dialog-migrate--aweber-description" class="sui-description"><?php printf( esc_html__( 'Click on the %1$s"Get authorization code"%2$s link to generate your authorization code and paste it below to re-authenticate your Aweber integration via oAuth 2.0.', 'hustle' ), '<b>', '</b>' ); ?></p> |
| 40 | |
| 41 | </div> |
| 42 | |
| 43 | <form class="sui-box-body sui-content-center sui-spacing-top--20"> |
| 44 | |
| 45 | <div class="sui-form-field"> |
| 46 | |
| 47 | <label for="reuth-aweber" id="label-reuth-aweber" class="sui-label"> |
| 48 | |
| 49 | <?php esc_html_e( 'Authorization code', 'hustle' ); ?> |
| 50 | |
| 51 | <?php |
| 52 | $api = $aweber->get_api(); |
| 53 | $auth_url = $api->get_authorization_uri( 0, true, Hustle_Data::INTEGRATIONS_PAGE ); |
| 54 | |
| 55 | if ( $auth_url ) : |
| 56 | ?> |
| 57 | |
| 58 | <a |
| 59 | href="<?php echo esc_url( $auth_url ); ?>" |
| 60 | target="_blank" |
| 61 | class="sui-label-link hustle-aweber-migrate-link" |
| 62 | style="color: #17A8E3;" |
| 63 | data-id="" |
| 64 | > |
| 65 | <?php esc_html_e( 'Get authorization code', 'hustle' ); ?> |
| 66 | </a> |
| 67 | |
| 68 | <?php endif; ?> |
| 69 | |
| 70 | </label> |
| 71 | |
| 72 | <input |
| 73 | id="reuth-aweber" |
| 74 | name="api_key" |
| 75 | placeholder="<?php printf( esc_html__( 'Enter authorization code here', 'hustle' ) ); ?>" |
| 76 | class="sui-form-control" |
| 77 | aria-labelledby="label-reuth-aweber" |
| 78 | aria-describedby="error-reuth-aweber" |
| 79 | /> |
| 80 | |
| 81 | <span id="error-reuth-aweber" class="sui-error-message sui-hidden"><?php esc_html_e( 'Please enter a valid Aweber authorization code', 'hustle' ); ?></span> |
| 82 | |
| 83 | </div> |
| 84 | |
| 85 | </form> |
| 86 | |
| 87 | <div class="sui-box-footer sui-flatten sui-content-center"> |
| 88 | |
| 89 | <a |
| 90 | href="#" |
| 91 | id="integration-migrate" |
| 92 | class="hustle-aweber-migrate sui-button" |
| 93 | data-id="" |
| 94 | data-nonce="<?php echo esc_attr( wp_create_nonce( 'hustle_provider_action' ) ); ?>" |
| 95 | > |
| 96 | <span class="sui-loading-text"><?php esc_html_e( 'Re-Authenticate', 'hustle' ); ?></span> |
| 97 | <span class="sui-icon-loader sui-loading" aria-hidden="true"></span> |
| 98 | </a> |
| 99 | |
| 100 | </div> |
| 101 | |
| 102 | </div> |
| 103 | |
| 104 | </div> |
| 105 | |
| 106 | </div> |
| 107 |