register.php
130 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | function mo_firebase_auth_register_ui() { |
| 5 | update_option ( 'mo_firebase_authentication_new_registration', 'true' ); |
| 6 | $current_user = wp_get_current_user(); |
| 7 | ?> |
| 8 | <form name="f" method="post" action=""> |
| 9 | <input type="hidden" name="option" value="mo_firebase_authentication_register_customer" /> |
| 10 | <?php wp_nonce_field('mo_fb_register_form', 'mo_fb_register_form_nonce'); ?> |
| 11 | <div class="" style="width:100%"> |
| 12 | <div class="mo_table_layout"> |
| 13 | <h3 style="margin-top: 0px;">Register with miniOrange<small style="font-size: x-small;"> [OPTIONAL]</small></h3> |
| 14 | <p style="font-size:14px;"><strong style="font-weight: 600;">Why should I register? </strong></p> |
| 15 | <div id="help_register_desc" style="background: aliceblue; padding: 10px 10px 10px 10px; border-radius: 10px;font-size: 12px;"> |
| 16 | You should register so that in case you need help, we can help you with step by step instructions. |
| 17 | <b>You will also need a miniOrange account to upgrade to the premium version of the plugins.</b> We do not store any information except the email that you will use to register with us. |
| 18 | </div> |
| 19 | </p> |
| 20 | <table class="mo_settings_table"> |
| 21 | <tr> |
| 22 | <td><strong><font color="#FF0000">*</font>Email:</strong></td> |
| 23 | <td><input class="mo_table_textbox3" type="email" name="email" |
| 24 | required placeholder="person@example.com" |
| 25 | value="<?php echo esc_attr(get_option('mo_firebase_authentication_admin_email'));?>" /> |
| 26 | </td> |
| 27 | </tr> |
| 28 | <tr class="hidden"> |
| 29 | <td><b><font color="#FF0000">*</font>Website/Company Name:</b></td> |
| 30 | <td><input class="" type="text" name="company" |
| 31 | required placeholder="Enter website or company name" |
| 32 | value="<?php echo esc_attr($_SERVER['SERVER_NAME']); ?>"/></td> |
| 33 | </tr> |
| 34 | <tr class="hidden"> |
| 35 | <td><b> First Name:</b></td> |
| 36 | <td><input class="" type="text" name="fname" |
| 37 | placeholder="Enter first name" value="<?php echo esc_attr($current_user->user_firstname);?>" /></td> |
| 38 | </tr> |
| 39 | <tr class="hidden"> |
| 40 | <td><b> Last Name:</b></td> |
| 41 | <td><input class="" type="text" name="lname" |
| 42 | placeholder="Enter last name" value="<?php echo esc_attr($current_user->user_lastname);?>" /></td> |
| 43 | </tr> |
| 44 | |
| 45 | <tr class="hidden"> |
| 46 | <td><b> Phone number :</b></td> |
| 47 | <td><input class="" type="text" name="phone" pattern="[\+]?([0-9]{1,4})?\s?([0-9]{7,12})?" id="phone" title="Phone with country code eg. +1xxxxxxxxxx" placeholder="Phone with country code eg. +1xxxxxxxxxx" value="<?php echo esc_attr(get_option('mo_firebase_authentication_admin_phone'));?>" /> |
| 48 | This is an optional field. We will contact you only if you need support.</td> |
| 49 | </tr> |
| 50 | </tr> |
| 51 | <tr class="hidden"> |
| 52 | <td></td> |
| 53 | <td>We will call only if you need support.</td> |
| 54 | </tr> |
| 55 | <tr> |
| 56 | <td><strong><font color="#FF0000">*</font>Password:</strong></td> |
| 57 | <td><input class="mo_table_textbox3" required type="password" |
| 58 | name="password" placeholder="Choose your password (Min. length 8)" /></td> |
| 59 | </tr> |
| 60 | <tr> |
| 61 | <td><strong><font color="#FF0000">*</font>Confirm Password:</strong></td> |
| 62 | <td><input class="mo_table_textbox3" required type="password" |
| 63 | name="confirmPassword" placeholder="Confirm your password" /></td> |
| 64 | </tr> |
| 65 | <tr> |
| 66 | <td> </td> |
| 67 | <td> </td> |
| 68 | </tr> |
| 69 | <tr> |
| 70 | <td> </td> |
| 71 | <td><input type="submit" name="submit" value="Register" class="button button-primary button-large" style="margin-right: 15%;"/><input type="button" name="mo_firebase_authentication_goto_login" id="mo_firebase_authentication_goto_login" value="Already have an account?" class="button button-primary button-large" /></td> |
| 72 | </tr> |
| 73 | </table> |
| 74 | <!-- <div style="width: 50%; margin:auto;"> |
| 75 | <br><input type="submit" name="submit" value="Register" class="button button-primary button-large" style="margin-right: 15%;"/> |
| 76 | <input type="button" name="mo_firebase_authentication_goto_login" id="mo_firebase_authentication_goto_login" value="Already have an account?" class="button button-primary button-large" /><br> |
| 77 | </div> --> |
| 78 | <br> |
| 79 | </div> |
| 80 | </div> |
| 81 | </form> |
| 82 | <form name="f1" method="post" action="" id="mo_firebase_authentication_goto_login_form"> |
| 83 | <?php wp_nonce_field("mo_firebase_authentication_goto_login_form", "mo_firebase_authentication_goto_login_form_field");?> |
| 84 | <input type="hidden" name="option" value="mo_firebase_authentication_goto_login"/> |
| 85 | </form> |
| 86 | <script> |
| 87 | jQuery("#phone").intlTelInput(); |
| 88 | jQuery('#mo_firebase_authentication_goto_login').click(function () { |
| 89 | jQuery('#mo_firebase_authentication_goto_login_form').submit(); |
| 90 | } ); |
| 91 | </script> |
| 92 | <?php |
| 93 | } |
| 94 | |
| 95 | function mo_firenase_auth_show_customer_info() { |
| 96 | ?> |
| 97 | <div class="mo_table_layout"> |
| 98 | <h6 style="margin-top: 0px;">Thank you for registering with miniOrange.</h6><br> |
| 99 | |
| 100 | <table border="1" |
| 101 | style="background-color:#FFFFFF; border:1px solid #CCCCCC; border-collapse: collapse; padding:0px 0px 0px 10px; margin:2px; width:85%"> |
| 102 | <tr> |
| 103 | <td style="width:45%; padding: 10px;">miniOrange Account Email</td> |
| 104 | <td style="width:55%; padding: 10px;"><?php echo esc_attr( get_option( 'mo_firebase_authentication_admin_email' )); ?></td> |
| 105 | </tr> |
| 106 | <tr> |
| 107 | <td style="width:45%; padding: 10px;">Customer ID</td> |
| 108 | <td style="width:55%; padding: 10px;"><?php echo esc_attr(get_option( 'mo_firebase_authentication_admin_customer_key' )) ?></td> |
| 109 | </tr> |
| 110 | </table> |
| 111 | <br /><br /> |
| 112 | |
| 113 | <table> |
| 114 | <tr> |
| 115 | <td> |
| 116 | <form name="f1" method="post" action="" id="mo_firebase_authentication_goto_login_form"> |
| 117 | <input type="hidden" value="change_miniorange" name="option"/> |
| 118 | <?php wp_nonce_field('change_miniorange_form', 'change_miniorange_form_nonce'); ?> |
| 119 | <input type="submit" value="Change Email Address" class="button button-primary button-large"/> |
| 120 | </form> |
| 121 | </td><td> |
| 122 | <!-- <a href="<?php //echo add_query_arg( array( 'tab' => 'licensing' ), htmlentities( $_SERVER['REQUEST_URI'] ) ); ?>"><input type="button" class="button button-primary button-large" value="Check Licensing Plans"/></a> --> |
| 123 | </td> |
| 124 | </tr> |
| 125 | </table> |
| 126 | <br> |
| 127 | </div> |
| 128 | |
| 129 | <?php |
| 130 | } |