PluginProbe ʕ •ᴥ•ʔ
Firebase Authentication / 1.1.4
Firebase Authentication v1.1.4
1.7.0 trunk 1.0.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.8 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9
firebase-authentication / admin / partials / firebase-authentication-admin-display.php
firebase-authentication / admin / partials Last commit date
firebase-authentication-admin-display.php 6 years ago
firebase-authentication-admin-display.php
134 lines
1 <?php
2
3 function mo_firebase_auth_page_ui() {
4 ?>
5 <html>
6 <body>
7 <div class="mo_firebase_auth_success_container" style="display:none;" id="mo_firebase_auth_success_container">
8 <div class="alert alert-success alert-dismissable" id="mo_firebase_auth_success_alert" data-fade="3000">
9 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
10 Configurations saved successfully.
11 </div>
12 </div>
13 <div class="mo_firebase_auth_error_container" style="display:none;" id="mo_firebase_auth_error_container">
14 <div class="alert alert-danger alert-dismissable" id="mo_firebase_auth_error_alert" data-fade="3000">
15 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
16 Please enter required fields.
17 </div>
18 </div>
19 <div style="margin-left:15px;overflow:hidden">
20 <div class="row" style="margin:15px">
21 <img width="30px" src="<?php echo dirname(plugin_dir_url( __FILE__ ));?>/images/logo.png"><h5>miniOrange Firebase Authentication</h5>
22 </div>
23 <div class="row">
24 <div class="col-md-8">
25 <div>
26 <div class="mo_firebase_auth_card" style="width:90%" >
27 <form action="" method="post" id="mo_enable_firebase_auth_form">
28 <?php wp_nonce_field('mo_firebase_auth_enable_form','mo_firebase_auth_enable_field'); ?>
29 <div style="display:inline"><div style="display:inline-block;padding:0px 10px 10px 0px"><strong>Enable Firebase Authentication:</strong></div>
30 <div style="display:inline-block"><label class="mo_firebase_auth_switch">
31 <input value="1" name="mo_enable_firebase_auth" type="checkbox" id="mo_enable_firebase_auth" <?php echo get_option('mo_enable_firebase_auth') ? 'checked' : '' ?>>
32 <span class="mo_firebase_auth_slider round"></span>
33 <input type="hidden" name="option" value="mo_enable_firebase_auth">
34 </label>
35 </div>
36 <span style="float: right;">[
37 <a href="https://plugins.miniorange.com/wordpress-firebase-authentication#firebaseauthentication" target="_blank">How to configure?</a> ]</span>
38 </div>
39 </form>
40 <form action="" method="post" id="mo_firebase_auth_form">
41 <?php wp_nonce_field('mo_firebase_auth_config_form','mo_firebase_auth_config_field'); ?>
42 <div style="padding:5px;"></div>Allow login with
43 <input style="margin-left: 5px;"type="radio" name="disable_wordpress_login" id="disable_wordpress_login" <?php if(get_option('mo_enable_firebase_auth') == false){ echo '';}else {echo get_option('mo_firebase_auth_disable_wordpress_login') ? '' : 'checked';} ?> value="0"onclick="mo_firebase_auth_hideDiv();">Both Firebase and WordPress
44 <span style="padding-right:10px" ></span>
45 <input type="radio" name="disable_wordpress_login" id="disable_wordpress_login" <?php if(get_option('mo_enable_firebase_auth') == false){ echo '';}else {echo get_option('mo_firebase_auth_disable_wordpress_login') ? 'checked' : '';} ?> value="1"onclick="mo_firebase_auth_showDiv();">Only Firebase
46 <div style="padding:5px;"></div>
47 <div style="<?php if(get_option('mo_firebase_auth_disable_wordpress_login') == 1) echo "display: block";else echo "display: none";?>"id="mo_firebase_auth_enable_admin_wp_login_div">
48 <p>Enabling Firebase login will restrict logins with only Firebase credentials and won't allow WP login. <b>Please enable this only after you have successfully tested your configuration</b> as the default WordPress login will stop working.
49 </p>
50 <input type="checkbox" id="mo_firebase_auth_enable_admin_wp_login" name="mo_firebase_auth_enable_admin_wp_login" value="1" <?php checked((esc_attr(get_option('mo_firebase_auth_enable_admin_wp_login')) === false) || (esc_attr(get_option('mo_firebase_auth_enable_admin_wp_login')) == 1));?> /> Allow Administrators to use WordPress login&emsp;<div class="mo-firebase-auth-tooltip">&#x1F6C8;<div class="mo-firebase-auth-tooltip-text mo-tt-right">Selecting this option will only allow Wordpress Administrators to log in.</div> </div>
51 <br>
52 </div>
53 <br>
54 <h6><font color="#FF0000">*</font><font color="#000000">Project Id</font>&emsp;<div class="mo-firebase-auth-tooltip">&#x1F6C8;<div class="mo-firebase-auth-tooltip-text mo-tt-right">collect project Id from your firebase project</div> </div></h6>
55 <input style="width:60%"type="text" id="project_id" name="projectid" value= "<?php echo get_option( 'mo_firebase_auth_project_id' ); ?>" placeholder="Enter Project Id.." required="">
56 <br><br>
57 <h6><font color="#FF0000">*</font><font color="#000000">API Key</font>&emsp;<div class="mo-firebase-auth-tooltip">&#x1F6C8;<div class="mo-firebase-auth-tooltip-text mo-tt-right">collect API key from your firebase project</div> </div></h6>
58 <input style="width:60%"type="text" id="api_key" name="apikey" value="<?php echo get_option( 'mo_firebase_auth_api_key' ); ?>" placeholder="Enter your API Key.." required="">
59 <br>
60 <br>
61 <input type="submit" class="btn btn-primary" style="width:170px;height:40px" name="verify_user" value=" Save Configuration" id = "mo_auth_configure_button"onclick="showAlert();">
62 </form>
63 </div>
64 </div>
65 <div>
66 <div class="mo_firebase_auth_card" style="width:90%" >
67 <h4 style="margin-bottom:30px">Test Authentication</h4>
68 <form name="test_configuration_form" id="mo_firebasetestconfig" method="post" target="firebasetestconfig">
69 <?php wp_nonce_field('mo_firebase_auth_test_config_form','mo_firebase_auth_test_config_field'); ?>
70 <input type="hidden" name="option" value="mo_firebase_auth_test_configuration">
71 <font color="#FF0000">* </font><input type="text" id="test_username" name="test_username" value="" placeholder="Username" style="margin-bottom:30px;width:35%;" required=""> <br>
72 <font color="#FF0000">* </font><input type="password" id="test_password" name="test_password" value="" placeholder="Password" style="margin-bottom:30px;width:35%;" required=""> <br>
73 <input type="hidden" id="test_check_field" name="test_check_field" value="test_check_true">
74 <input type="submit" class="btn btn-primary" id="mo_firebase_auth_test_config_button" style="width:170px;height:40px" name="test_configuration" value="Test Authentication" <?php if( ! get_option( 'mo_firebase_auth_project_id' ) && ! get_option( 'mo_firebase_auth_api_key' ) ) echo 'disabled' ?> >
75 </form>
76 </div>
77 </div>
78 </div>
79 <div class="col-md-4">
80 <div class="mo_firebase_auth_card" style="width:90%" >
81 <h4 style="margin-bottom:30px">Contact us</h4>
82 <p class="mo_firebase_auth_contact_us_p"><b>Need any help?<br>Just send us a query so we can help you.</b></p><br>
83 <form action="" method="POST">
84 <?php wp_nonce_field('mo_firebase_auth_contact_us_form','mo_firebase_auth_contact_us_field'); ?>
85 <input type="hidden" name="option" value="mo_firebase_auth_contact_us">
86 <div class="form-group">
87 <input type="email" placeholder="Enter email here" class="form-control" name="mo_firebase_auth_contact_us_email" id="mo_firebase_auth_contact_us_email" required>
88 </div>
89 <div class="form-group">
90 <input type="tel" id="mo_firebase_auth_contact_us_phone" pattern="[\+]\d{11,14}|[\+]\d{1,4}[\s]\d{9,10}" placeholder="Enter phone here" class="form-control" name="mo_firebase_auth_contact_us_phone">
91 </div>
92 <div class="form-group">
93 <textarea class="form-control" onkeypress="mo_firebase_auth_contact_us_valid_query(this)" onkeyup="mo_firebase_auth_contact_us_valid_query(this)" onblur="mo_firebase_auth_contact_us_valid_query(this)" name="mo_firebase_auth_contact_us_query" placeholder="Enter query here" rows="5" id="mo_firebase_auth_contact_us_query" required></textarea>
94 </div>
95 <input type="submit" class="btn btn-primary" style="width:130px;height:40px" value="Submit">
96 </form>
97 <br>
98 <p class="mo_firebase_auth_contact_us_p"><b>If you want custom features in the plugin, just drop an email at<br><a href="mailto:info@xecurify.com">info@xecurify.com</a></b></p>
99 </div>
100 </div>
101 </div>
102 </div>
103 <script>
104 jQuery("#mo_firebase_auth_contact_us_phone").intlTelInput();
105 function mo_firebase_auth_contact_us_valid_query(f) {
106 !(/^[a-zA-Z?,.\(\)\/@ 0-9]*$/).test(f.value) ? f.value = f.value.replace(
107 /[^a-zA-Z?,.\(\)\/@ 0-9]/, '') : null;
108 }
109
110 jQuery("#mo_firebase_auth_test_config_button").on("click", function(event) {
111 var test_username = document.forms["test_configuration_form"]["test_username"].value;
112 var test_password = document.forms["test_configuration_form"]["test_password"].value;
113 if( test_username == "" || test_password == "" ){
114 return;
115 }
116 event.preventDefault();
117 let url = "<?php echo site_url(); ?>/?mo_action=firebaselogin&test=true";
118 jQuery("#mo_firebasetestconfig").attr("action", url);
119 let newwindow = window.open("about:blank", 'firebasetestconfig', 'location=yes,height=700,width=600,scrollbars=yes,status=yes');
120 jQuery("#mo_firebasetestconfig").submit();
121 });
122 function mo_firebase_auth_showDiv(){
123 document.getElementById("mo_firebase_auth_enable_admin_wp_login_div").style.display = "block";
124 }
125 function mo_firebase_auth_hideDiv(){
126 document.getElementById("mo_firebase_auth_enable_admin_wp_login_div").style.display = "none";
127 }
128
129 </script>
130 <?php
131
132 }
133
134 ?>