Преглед изворни кода

edited settings layout
added test frame on edit tab
edited invites settings modal with a note

causefx пре 8 година
родитељ
комит
82d9acd525

+ 1 - 1
api/pages/settings-customize-appearance.php

@@ -11,7 +11,7 @@ $pageSettingsCustomizeAppearance = '
 	</div>
     <div class="panel-wrapper collapse in" aria-expanded="true">
         <div class="panel-body bg-org">
-            <form id="customize-appearance-form" class="form-horizontal addFormTick" onsbumit="return false;"></form>
+            <form id="customize-appearance-form" class="addFormTick" onsbumit="return false;"></form>
         </div>
     </div>
 </div>

+ 1 - 1
api/pages/settings-settings-main.php

@@ -10,7 +10,7 @@ $pageSettingsSettingsMain = '
 	</div>
     <div class="panel-wrapper collapse in" aria-expanded="true">
         <div class="panel-body bg-org">
-            <form id="settings-main-form" class="form-horizontal addFormTick" onsbumit="return false;"></form>
+            <form id="settings-main-form" class="addFormTick" onsbumit="return false;"></form>
         </div>
     </div>
 </div>

+ 1 - 1
api/pages/settings-settings-sso.php

@@ -10,7 +10,7 @@ $pageSettingsSettingsSSO = '
 	</div>
     <div class="panel-wrapper collapse in" aria-expanded="true">
         <div class="panel-body bg-org">
-            <form id="sso-form" class="form-horizontal addFormTick" onsbumit="return false;"></form>
+            <form id="sso-form" class="addFormTick" onsbumit="return false;"></form>
         </div>
     </div>
 </div>

+ 9 - 0
api/pages/settings-tab-editor-tabs.php

@@ -72,6 +72,14 @@ $( \'#tabEditorTable\' ).sortable({
     <input type="hidden" name="id" value="x">
     <h1 lang="en">Edit Tab</h1>
     <fieldset style="border:0;">
+    	<div class="alert alert-success alert-dismissable tabEditTestMessage hidden">
+        	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+        	<span lang="en">Tab can be set as iFrame</span>
+        </div>
+        <div class="alert alert-danger alert-dismissable tabEditTestMessage hidden">
+        	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+        	<span lang="en">Please set tab as [New Window] on next screen</span>
+        </div>
         <div class="form-group">
             <label class="control-label" for="edit-tab-form-inputName" lang="en">Tab Name</label>
             <input type="text" class="form-control" id="edit-tab-form-inputName" name="tabName" required="" autofocus>
@@ -85,6 +93,7 @@ $( \'#tabEditorTable\' ).sortable({
             <input type="text" class="form-control" id="edit-tab-form-inputImage" name="tabImage"  required="">
         </div>
     </fieldset>
+    <button class="btn btn-sm btn-info btn-rounded waves-effect waves-light row b-none testEditTab" type="button"><span class="btn-label"><i class="fa fa-flask"></i></span><span lang="en">Test Tab</span></button>
     <button class="btn btn-sm btn-info btn-rounded waves-effect waves-light pull-right row b-none editTab" type="button"><span class="btn-label"><i class="fa fa-check"></i></span><span lang="en">Edit Tab</span></button>
     <div class="clearfix"></div>
 </form>

+ 279 - 291
api/plugins/invites.php

@@ -1,71 +1,69 @@
 <?php
-
 // PLUGIN INFORMATION
 $GLOBALS['plugins'][]['Invites'] = array( // Plugin Name
-    'name'=>'Invites', // Plugin Name
-    'author'=>'CauseFX', // Who wrote the plugin
-    'category'=>'Management', // One to Two Word Description
-    'link'=>'https://github.com/PHPMailer/PHPMailer', // Link to plugin info
-    'license'=>'personal', // License Type use , for multiple
-    //'fileName'=>'php-mailer.php',
-    //'configFile'=>'php-mailer.php',
-    //'apiFile'=>'php-mailer.php',
-    'idPrefix'=>'INVITES', // html element id prefix
-    'configPrefix'=>'INVITES', // config file prefix for array items without the hypen
-    'version'=>'1.0.0', // SemVer of plugin
-    'image'=>'plugins/images/invites.png', // 1:1 non transparent image for plugin
-    'settings'=>true, // does plugin need a settings page? true or false
-    'homepage'=>false // Is plugin for use on homepage? true or false
+	'name' => 'Invites', // Plugin Name
+	'author' => 'CauseFX', // Who wrote the plugin
+	'category' => 'Management', // One to Two Word Description
+	'link' => 'https://github.com/PHPMailer/PHPMailer', // Link to plugin info
+	'license' => 'personal', // License Type use , for multiple
+	//'fileName'=>'php-mailer.php',
+	//'configFile'=>'php-mailer.php',
+	//'apiFile'=>'php-mailer.php',
+	'idPrefix' => 'INVITES', // html element id prefix
+	'configPrefix' => 'INVITES', // config file prefix for array items without the hypen
+	'version' => '1.0.0', // SemVer of plugin
+	'image' => 'plugins/images/invites.png', // 1:1 non transparent image for plugin
+	'settings' => true, // does plugin need a settings page? true or false
+	'homepage' => false // Is plugin for use on homepage? true or false
 );
 // INCLUDE/REQUIRE FILES
-
 // PLUGIN FUNCTIONS
 function inviteCodes($array)
 {
-    $action = isset($array['data']['action']) ? $array['data']['action'] : null;
-    $code = isset($array['data']['code']) ? $array['data']['code'] : null;
-    $usedBy = isset($array['data']['usedby']) ? $array['data']['usedby'] : null;
-    $username = isset($array['data']['username']) ? $array['data']['username'] : null;
-    $email = isset($array['data']['email']) ? $array['data']['email'] : null;
-    $id = isset($array['data']['id']) ? $array['data']['id'] : null;
-    $now = date("Y-m-d H:i:s");
-    $currentIP = userIP();
-    switch ($action) {
-        case "check":
-            try {
-                $connect = new Dibi\Connection([
-                    'driver' => 'sqlite3',
-                    'database' => $GLOBALS['dbLocation'].$GLOBALS['dbName'],
-                ]);
-                $all = $connect->fetch('SELECT * FROM invites WHERE valid = "Yes" AND code = ?', $code);
-                return ($all) ? true : false;
-            } catch (Dibi\Exception $e) {
-                return false;
-            }
-            break;
-        case "use":
-            try {
-                if (inviteCodes(array('data' => array('action' => 'check','code' => $code)))) {
-                    $connect = new Dibi\Connection([
-                        'driver' => 'sqlite3',
-                        'database' => $GLOBALS['dbLocation'].$GLOBALS['dbName'],
-                    ]);
-                    $connect->query('
+	$action = isset($array['data']['action']) ? $array['data']['action'] : null;
+	$code = isset($array['data']['code']) ? $array['data']['code'] : null;
+	$usedBy = isset($array['data']['usedby']) ? $array['data']['usedby'] : null;
+	$username = isset($array['data']['username']) ? $array['data']['username'] : null;
+	$email = isset($array['data']['email']) ? $array['data']['email'] : null;
+	$id = isset($array['data']['id']) ? $array['data']['id'] : null;
+	$now = date("Y-m-d H:i:s");
+	$currentIP = userIP();
+	switch ($action) {
+		case "check":
+			try {
+				$connect = new Dibi\Connection([
+					'driver' => 'sqlite3',
+					'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],
+				]);
+				$all = $connect->fetch('SELECT * FROM invites WHERE valid = "Yes" AND code = ?', $code);
+				return ($all) ? true : false;
+			} catch (Dibi\Exception $e) {
+				return false;
+			}
+			break;
+		case "use":
+			try {
+				if (inviteCodes(array('data' => array('action' => 'check', 'code' => $code)))) {
+					$connect = new Dibi\Connection([
+						'driver' => 'sqlite3',
+						'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],
+					]);
+					$connect->query('
 	                	UPDATE invites SET', [
-                            'valid' => 'No',
-                            'usedby' => $usedBy,
-                            'dateused' => $now,
-                            'ip' => $currentIP,
-                        ], '
+						'valid' => 'No',
+						'usedby' => $usedBy,
+						'dateused' => $now,
+						'ip' => $currentIP,
+					], '
 	                	WHERE code=?', $code);
-                    writeLog('success', 'Invite Management Function -  Invite Used ['.$code.']', 'SYSTEM');
-                    return inviteAction($usedBy, 'share', $GLOBALS['INVITES-type-include']);
-                } else {
-                    return false;
-                }
-            } catch (Dibi\Exception $e) {
-                return false;
-            }/*
+					writeLog('success', 'Invite Management Function -  Invite Used [' . $code . ']', 'SYSTEM');
+					return inviteAction($usedBy, 'share', $GLOBALS['INVITES-type-include']);
+				} else {
+					return false;
+				}
+			} catch (Dibi\Exception $e) {
+				return false;
+			}/*
             if(ENABLEMAIL){
                 if (!isset($GLOBALS['USER'])) {
                     require_once("user.php");
@@ -84,243 +82,233 @@ function inviteCodes($array)
                 $body = buildEmail($emailTemplate);
                 sendEmail($GLOBALS['USER']->adminEmail, "Admin", $subject, $body);
             }*/
-            break;
-        default:
-        if (qualifyRequest(1)) {
-            switch ($action) {
-                case "create":
-                    try {
-                        $connect = new Dibi\Connection([
-                            'driver' => 'sqlite3',
-                            'database' => $GLOBALS['dbLocation'].$GLOBALS['dbName'],
-                        ]);
-                        $newCode = [
-                            'code' => $code,
-                            'email' => $email,
-                            'username' => $username,
-                            'valid' => 'Yes',
-                            'type' => $GLOBALS['INVITES-type-include'],
-                        ];
-                        $connect->query('INSERT INTO [invites]', $newCode);
-                        writeLog('success', 'Invite Management Function -  Added Invite ['.$code.']', $GLOBALS['organizrUser']['username']);
-                        if ($GLOBALS['PHPMAILER-enabled']) {
-                            $emailTemplate = array(
-                                'type' => 'invite',
-                                'body' => $GLOBALS['PHPMAILER-emailTemplateInviteUser'],
-                                'subject' => $GLOBALS['PHPMAILER-emailTemplateInviteUserSubject'],
-                                'user' => $username,
-                                'password' => null,
-                                'inviteCode' => $code,
-                            );
-                            $emailTemplate = phpmEmailTemplate($emailTemplate);
-                            $sendEmail = array(
-                                'to' => $email,
-                                'subject' => $emailTemplate['subject'],
-                                'body' => phpmBuildEmail($emailTemplate),
-                            );
-                            phpmSendEmail($sendEmail);
-                        }
-                        return true;
-                    } catch (Dibi\Exception $e) {
-                        writeLog('error', 'Invite Management Function  -  Error ['.$e.']', 'SYSTEM');
-                        return false;
-                    }
-                    break;
-                case "get":
-                    try {
-                        $connect = new Dibi\Connection([
-                            'driver' => 'sqlite3',
-                            'database' => $GLOBALS['dbLocation'].$GLOBALS['dbName'],
-                        ]);
-                        $invites = $connect->fetchAll('SELECT * FROM invites');
-                        return $invites;
-                    } catch (Dibi\Exception $e) {
-                        writeLog('error', 'Invite Management Function  -  Error ['.$e.']', 'SYSTEM');
-                        return false;
-                    }
-                    break;
-                case "delete":
-                    try {
-                        $connect = new Dibi\Connection([
-                            'driver' => 'sqlite3',
-                            'database' => $GLOBALS['dbLocation'].$GLOBALS['dbName'],
-                        ]);
-                        $connect->query('DELETE FROM invites WHERE id = ?', $id);
-                        return true;
-                    } catch (Dibi\Exception $e) {
-                        writeLog('error', 'Invite Management Function  -  Error ['.$e.']', 'SYSTEM');
-                        return false;
-                    }
-                    break;
-                default:
-                return false;
-            }
-        }
-    }
+			break;
+		default:
+			if (qualifyRequest(1)) {
+				switch ($action) {
+					case "create":
+						try {
+							$connect = new Dibi\Connection([
+								'driver' => 'sqlite3',
+								'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],
+							]);
+							$newCode = [
+								'code' => $code,
+								'email' => $email,
+								'username' => $username,
+								'valid' => 'Yes',
+								'type' => $GLOBALS['INVITES-type-include'],
+							];
+							$connect->query('INSERT INTO [invites]', $newCode);
+							writeLog('success', 'Invite Management Function -  Added Invite [' . $code . ']', $GLOBALS['organizrUser']['username']);
+							if ($GLOBALS['PHPMAILER-enabled']) {
+								$emailTemplate = array(
+									'type' => 'invite',
+									'body' => $GLOBALS['PHPMAILER-emailTemplateInviteUser'],
+									'subject' => $GLOBALS['PHPMAILER-emailTemplateInviteUserSubject'],
+									'user' => $username,
+									'password' => null,
+									'inviteCode' => $code,
+								);
+								$emailTemplate = phpmEmailTemplate($emailTemplate);
+								$sendEmail = array(
+									'to' => $email,
+									'subject' => $emailTemplate['subject'],
+									'body' => phpmBuildEmail($emailTemplate),
+								);
+								phpmSendEmail($sendEmail);
+							}
+							return true;
+						} catch (Dibi\Exception $e) {
+							writeLog('error', 'Invite Management Function  -  Error [' . $e . ']', 'SYSTEM');
+							return false;
+						}
+						break;
+					case "get":
+						try {
+							$connect = new Dibi\Connection([
+								'driver' => 'sqlite3',
+								'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],
+							]);
+							$invites = $connect->fetchAll('SELECT * FROM invites');
+							return $invites;
+						} catch (Dibi\Exception $e) {
+							writeLog('error', 'Invite Management Function  -  Error [' . $e . ']', 'SYSTEM');
+							return false;
+						}
+						break;
+					case "delete":
+						try {
+							$connect = new Dibi\Connection([
+								'driver' => 'sqlite3',
+								'database' => $GLOBALS['dbLocation'] . $GLOBALS['dbName'],
+							]);
+							$connect->query('DELETE FROM invites WHERE id = ?', $id);
+							return true;
+						} catch (Dibi\Exception $e) {
+							writeLog('error', 'Invite Management Function  -  Error [' . $e . ']', 'SYSTEM');
+							return false;
+						}
+						break;
+					default:
+						return false;
+				}
+			}
+	}
 }
+
 /* GET PHPMAILER SETTINGS */
 function invitesGetSettings()
 {
-    if ($GLOBALS['plexID'] !== '' && $GLOBALS['plexToken'] !== '' && $GLOBALS['INVITES-type-include'] !== '') {
-        $loop = libraryList($GLOBALS['INVITES-type-include'])['libraries'];
-        foreach ($loop as $key => $value) {
-            $libraryList[] = array(
-                'name' => $key,
-                'value' => $value
-            );
-        }
-    } else {
-        $libraryList = array(
-            array(
-                'name'=>'Refresh page to update List',
-                'value'=>'',
-                'disabled' => true,
-            ),
-        );
-    }
-    return array(
-        'Backend' => array(
-            array(
-                'type' => 'select',
-                'name' => 'INVITES-type-include',
-                'label' => 'Media Server',
-                'value' => $GLOBALS['INVITES-type-include'],
-                'options' => array(
-                    array(
-                        'name'=>'N/A',
-                        'value'=>'n/a'
-                    ),
-                    array(
-                        'name'=>'Plex',
-                        'value'=>'plex'
-                    ),
-                    array(
-                        'name'=>'Emby [Not Ready]',
-                        'value'=>'emby'
-                    )
-                )
-            )
-        ),
-        'Plex Settings' => array(
-            array(
-                'type' => 'password-alt',
-                'name' => 'plexToken',
-                'label' => 'Plex Token',
-                'value' => $GLOBALS['plexToken'],
-                'placeholder' => 'Use Get Token Button'
-            ),
-            array(
-                'type' => 'password-alt',
-                'name' => 'plexID',
-                'label' => 'Plex Machine',
-                'value' => $GLOBALS['plexID'],
-                'placeholder' => 'Use Get Plex Machine Button'
-            ),
-            array(
-                'type' => 'select2',
-                'name' => 'INVITES-plexLibraries',
-                'label' => 'Libraries',
-                'value' => $GLOBALS['INVITES-plexLibraries'],
-                'options' => $libraryList
-            )
-        ),
-        'Emby Settings' => array(
-
-        ),
-        'FYI' => array(
-            array(
-                'type' => 'html',
-                'label' => 'Note',
-                'html' => 'After enabling for the first time, please reload the page'
-            ),
-            array(
-                'type' => 'button',
-                'label' => 'Open Invite Modal',
-                'class' => 'inline-popups inviteModal',
-                'attr' => 'data-effect="mfp-zoom-out"',
-                'href' => '#invite-area',
-                'icon' => 'fa fa-paper-plane',
-                'text' => 'Open'
-            )
-        )
-    );
+	if ($GLOBALS['plexID'] !== '' && $GLOBALS['plexToken'] !== '' && $GLOBALS['INVITES-type-include'] !== '') {
+		$loop = libraryList($GLOBALS['INVITES-type-include'])['libraries'];
+		foreach ($loop as $key => $value) {
+			$libraryList[] = array(
+				'name' => $key,
+				'value' => $value
+			);
+		}
+	} else {
+		$libraryList = array(
+			array(
+				'name' => 'Refresh page to update List',
+				'value' => '',
+				'disabled' => true,
+			),
+		);
+	}
+	return array(
+		'Backend' => array(
+			array(
+				'type' => 'select',
+				'name' => 'INVITES-type-include',
+				'label' => 'Media Server',
+				'value' => $GLOBALS['INVITES-type-include'],
+				'options' => array(
+					array(
+						'name' => 'N/A',
+						'value' => 'n/a'
+					),
+					array(
+						'name' => 'Plex',
+						'value' => 'plex'
+					),
+					array(
+						'name' => 'Emby [Not Ready]',
+						'value' => 'emby'
+					)
+				)
+			)
+		),
+		'Plex Settings' => array(
+			array(
+				'type' => 'password-alt',
+				'name' => 'plexToken',
+				'label' => 'Plex Token',
+				'value' => $GLOBALS['plexToken'],
+				'placeholder' => 'Use Get Token Button'
+			),
+			array(
+				'type' => 'password-alt',
+				'name' => 'plexID',
+				'label' => 'Plex Machine',
+				'value' => $GLOBALS['plexID'],
+				'placeholder' => 'Use Get Plex Machine Button'
+			),
+			array(
+				'type' => 'select2',
+				'name' => 'INVITES-plexLibraries',
+				'label' => 'Libraries',
+				'value' => $GLOBALS['INVITES-plexLibraries'],
+				'options' => $libraryList
+			)
+		),
+		'Emby Settings' => array(),
+		'FYI' => array(
+			array(
+				'type' => 'html',
+				'label' => 'Note',
+				'html' => 'After enabling for the first time, please reload the page - Menu is located under User menu on top right'
+			)
+		)
+	);
 }
-function inviteAction($username, $action=null, $type=null)
-{
-    if ($action == null) {
-        return false;
-    }
-    switch ($type) {
-        case 'plex':
-            if (!empty($GLOBALS['plexToken']) && !empty($GLOBALS['plexID'])) {
-                $url = "https://plex.tv/api/servers/".$GLOBALS['plexID']."/shared_servers/";
-                if ($GLOBALS['INVITES-plexLibraries'] !== "") {
-                    $libraries = explode(',', $GLOBALS['INVITES-plexLibraries']);
-                } else {
-                    $libraries = '';
-                }
-                $headers = array(
-                    "Accept" => "application/json",
-                    "Content-Type" => "application/json",
-                    "X-Plex-Token" => $GLOBALS['plexToken']
-                );
-                $data = array(
-                    "server_id" => $GLOBALS['plexID'],
-                    "shared_server" => array(
-                        "library_section_ids" => $libraries,
-                        "invited_email" => $username
-                    )
-                );
-                try {
-                    switch ($action) {
-                        case 'share':
-                            $response = Requests::post($url, $headers, json_encode($data), array());
-                            break;
-                        case 'unshare':
-                            $id = (is_numeric($username) ? $id : convertPlexName($username, "id"));
-                            $url = $url.$id;
-                            $response = Requests::delete($url, $headers, array());
-                            break;
-                        default:
-                            return false;
-                            break;
-                    }
-                    if ($response->success) {
-                        writeLog('success', 'Plex Invite Function - Plex User now has access to system', $username);
-                        return true;
-                    } else {
-                        switch ($response->status_code) {
-                            case 400:
-                                writeLog('error', 'Plex Invite Function - Plex User already has access', $username);
-                                return false;
-                                break;
-                            case 401:
-                                writeLog('error', 'Plex Invite Function - Incorrect Token', 'SYSTEM');
-                                return false;
-                                break;
-                            default:
-                                writeLog('error', 'Plex Invite Function - An error occured', $username);
-                                return false;
-                                break;
-                        }
-                    }
-                    return false;
-                } catch (Requests_Exception $e) {
-                    writeLog('error', 'Plex Invite Function - Error: '.$e->getMessage(), 'SYSTEM');
-                    return false;
-                };
-            } else {
-                writeLog('error', 'Plex Invite Function - Plex Token/ID not set', 'SYSTEM');
-                return false;
-            }
-            break;
-        case 'emby':
-            # code...
-            break;
 
-        default:
-            return false;
-            break;
-    }
-    return false;
+function inviteAction($username, $action = null, $type = null)
+{
+	if ($action == null) {
+		return false;
+	}
+	switch ($type) {
+		case 'plex':
+			if (!empty($GLOBALS['plexToken']) && !empty($GLOBALS['plexID'])) {
+				$url = "https://plex.tv/api/servers/" . $GLOBALS['plexID'] . "/shared_servers/";
+				if ($GLOBALS['INVITES-plexLibraries'] !== "") {
+					$libraries = explode(',', $GLOBALS['INVITES-plexLibraries']);
+				} else {
+					$libraries = '';
+				}
+				$headers = array(
+					"Accept" => "application/json",
+					"Content-Type" => "application/json",
+					"X-Plex-Token" => $GLOBALS['plexToken']
+				);
+				$data = array(
+					"server_id" => $GLOBALS['plexID'],
+					"shared_server" => array(
+						"library_section_ids" => $libraries,
+						"invited_email" => $username
+					)
+				);
+				try {
+					switch ($action) {
+						case 'share':
+							$response = Requests::post($url, $headers, json_encode($data), array());
+							break;
+						case 'unshare':
+							$id = (is_numeric($username) ? $id : convertPlexName($username, "id"));
+							$url = $url . $id;
+							$response = Requests::delete($url, $headers, array());
+							break;
+						default:
+							return false;
+							break;
+					}
+					if ($response->success) {
+						writeLog('success', 'Plex Invite Function - Plex User now has access to system', $username);
+						return true;
+					} else {
+						switch ($response->status_code) {
+							case 400:
+								writeLog('error', 'Plex Invite Function - Plex User already has access', $username);
+								return false;
+								break;
+							case 401:
+								writeLog('error', 'Plex Invite Function - Incorrect Token', 'SYSTEM');
+								return false;
+								break;
+							default:
+								writeLog('error', 'Plex Invite Function - An error occured', $username);
+								return false;
+								break;
+						}
+					}
+					return false;
+				} catch (Requests_Exception $e) {
+					writeLog('error', 'Plex Invite Function - Error: ' . $e->getMessage(), 'SYSTEM');
+					return false;
+				};
+			} else {
+				writeLog('error', 'Plex Invite Function - Plex Token/ID not set', 'SYSTEM');
+				return false;
+			}
+			break;
+		case 'emby':
+			# code...
+			break;
+		default:
+			return false;
+			break;
+	}
+	return false;
 }

+ 24 - 0
js/custom.js

@@ -1624,6 +1624,30 @@ $(document).on("click", ".testTab", function () {
         });
     }
 });
+$(document).on("click", ".testEditTab", function () {
+    var input = $('#edit-tab-form-inputURL');
+    if(input.val() == ''){
+        message('','Please enter a URL','bottom-right','#FFF','warning','5000');
+    }
+    if(input.val() !== ''){
+        var post = {
+            url:input.val()
+        }
+        organizrAPI('POST','api/?v1/test/iframe',post).success(function(data) {
+            var html = JSON.parse(data);
+            if(html.data == true){
+                $('.tabEditTestMessage.alert-success').removeClass('hidden');
+                $('.tabEditTestMessage.alert-danger').addClass('hidden');
+            }else{
+                $('.tabEditTestMessage.alert-danger').removeClass('hidden');
+                $('.tabEditTestMessage.alert-success').addClass('hidden');
+            }
+
+        }).fail(function(xhr) {
+            console.error("Organizr Function: Check Failed");
+        });
+    }
+});
 // new api key
 $(document).on("click", ".newAPIKey", function () {
     $('#settings-main-form [name=organizrAPI]').val(generateCode());

+ 9 - 7
js/functions.js

@@ -616,7 +616,7 @@ function buildFormItem(item){
 			return smallLabel+pwgMgr+'<input data-changed="false" lang="en" type="password" class="form-control'+extraClass+'"'+placeholder+value+id+name+disabled+type+attr+' autocomplete="new-password" />';
 			break;
 		case 'password-alt':
-			return smallLabel+'<div class="input-group m-b-30">'+pwgMgr+'<input data-changed="false" lang="en" type="password" class="password-alt form-control'+extraClass+'"'+placeholder+value+id+name+disabled+type+attr+' autocomplete="new-password" /><span class="input-group-btn"> <button class="btn btn-default showPassword" type="button"><i class="fa fa-eye passwordToggle"></i></button></span></div>';
+			return smallLabel+'<div class="input-group">'+pwgMgr+'<input data-changed="false" lang="en" type="password" class="password-alt form-control'+extraClass+'"'+placeholder+value+id+name+disabled+type+attr+' autocomplete="new-password" /><span class="input-group-btn"> <button class="btn btn-default showPassword" type="button"><i class="fa fa-eye passwordToggle"></i></button></span></div>';
 			break;
 		case 'hidden':
 			return '<input data-changed="false" lang="en" type="hidden" class="form-control'+extraClass+'"'+placeholder+value+id+name+disabled+type+attr+' />';
@@ -811,9 +811,11 @@ function buildFormGroup(array){
 		}else{
 			group += `
 				<!-- FORM GROUP -->
-				<h4 class="box-title" lang="en">`+i+`</h4>
-				<hr class="m-t-0 m-b-40">
-				<div class="row">
+				<div class="panel bg-org panel-info">
+                    <div class="panel-heading" lang="en">
+                        `+i+`
+                    </div>      
+				    <div class="panel-body">
 			`;
 			$.each(v, function(i,v) {
 				var override = '6';
@@ -828,8 +830,8 @@ function buildFormGroup(array){
 					<!-- INPUT BOX -->
 					<div class="col-md-`+override+` p-b-10">
 						<div class="form-group">
-							<label class="control-label col-md-3" lang="en">`+v.label+`</label>
-							<div class="col-md-9">
+							<label class="control-label col-md-12" lang="en">`+v.label+`</label>
+							<div class="col-md-12">
 								`+buildFormItem(v)+`
 							</div>
 						</div>
@@ -840,7 +842,7 @@ function buildFormGroup(array){
                     group += '</div><!--end-->';
                 }
             });
-			group += '</div>';
+			group += '</div></div>';
 		}
 	});
 	return group;