Merge branch 'dev' of https://git.steelants.cz/JonatanRek/PHP_SMART_HOME_V3
This commit is contained in:
		
							
								
								
									
										16
									
								
								app/templates/css/override.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								app/templates/css/override.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
table.table td, table.table th {
 | 
			
		||||
  border: 2px solid #121a2b;
 | 
			
		||||
  padding: 8px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*tr:nth-child(even){background-color: #f2f2f2;}*/
 | 
			
		||||
 | 
			
		||||
table.table tr:hover {background-color: #121a2b;}
 | 
			
		||||
 | 
			
		||||
table.table th {
 | 
			
		||||
  padding-top: 12px;
 | 
			
		||||
  padding-bottom: 12px;
 | 
			
		||||
  text-align: left;
 | 
			
		||||
  background-color: #121a2b;
 | 
			
		||||
  color: white;
 | 
			
		||||
}
 | 
			
		||||
@@ -37,4 +37,22 @@ function sendTestNotification(){
 | 
			
		||||
            console.log("ERROR ", request, error);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$( "button[name='deactivateOta']" ).click(function(){
 | 
			
		||||
    console.log("Didabling ota");
 | 
			
		||||
    $.ajax({
 | 
			
		||||
        url: 'ajax',
 | 
			
		||||
        type: 'POST',
 | 
			
		||||
        data: {
 | 
			
		||||
            "ota" : 'X',
 | 
			
		||||
            "action": 'disable'
 | 
			
		||||
        },
 | 
			
		||||
        success: function(data){
 | 
			
		||||
            console.log(data);
 | 
			
		||||
        },
 | 
			
		||||
        error: function (request, status, error) {
 | 
			
		||||
            console.log("ERROR ", request, error);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -8,26 +8,16 @@
 | 
			
		||||
	<title><?php echo $TITLE ?></title>
 | 
			
		||||
</head>
 | 
			
		||||
<body class="no-transitions">
 | 
			
		||||
	<div class="modal-container">
 | 
			
		||||
		<div class="modal">
 | 
			
		||||
			<h4 class="mb-4">Login</h4>
 | 
			
		||||
			<form method="post">
 | 
			
		||||
				<div class="field">
 | 
			
		||||
					<div class="label">Name:</div>
 | 
			
		||||
					<input class="input" type="text" name="username" placeholder="Jméno.."/>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="field">
 | 
			
		||||
					<div class="label">Password:</div>
 | 
			
		||||
					<input class="input" type="password" name="password" placeholder="Heslo.."/>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="field">
 | 
			
		||||
					<div class="label">Remember me:</div>
 | 
			
		||||
					<input class="" type="checkbox" name="remember" value="true"/>
 | 
			
		||||
				</div>
 | 
			
		||||
				<input type="submit" class="button" name="login" value="Login"/>
 | 
			
		||||
			</form>
 | 
			
		||||
		</div>
 | 
			
		||||
	</div>
 | 
			
		||||
	<?php
 | 
			
		||||
	if (isset($ota) && $ota != '') {	
 | 
			
		||||
		$partial = new Partial('loginOta');
 | 
			
		||||
		$partial->prepare('ota',$ota);
 | 
			
		||||
		$partial->render();
 | 
			
		||||
	} else {
 | 
			
		||||
		$partial = new Partial('loginForm');
 | 
			
		||||
		$partial->render();
 | 
			
		||||
	}
 | 
			
		||||
	?>
 | 
			
		||||
	
 | 
			
		||||
	<?php
 | 
			
		||||
	$partial = new Partial('footer');
 | 
			
		||||
 
 | 
			
		||||
@@ -23,3 +23,4 @@
 | 
			
		||||
<link rel="stylesheet" href="./app/templates/css/modal.css">
 | 
			
		||||
<link rel="stylesheet" href="./app/templates/css/pre.css">
 | 
			
		||||
<link rel="stylesheet" href="./app/templates/css/loading.css">
 | 
			
		||||
<link rel="stylesheet" href="./app/templates/css/override.css">
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								app/templates/part/loginForm.phtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								app/templates/part/loginForm.phtml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
<div class="modal-container">
 | 
			
		||||
    <div class="modal">
 | 
			
		||||
        <h4 class="mb-4">Login</h4>
 | 
			
		||||
        <form method="post">
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="label">Name:</div>
 | 
			
		||||
                <input class="input" type="text" name="username" placeholder="Jméno.."/>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="label">Password:</div>
 | 
			
		||||
                <input class="input" type="password" name="password" placeholder="Heslo.."/>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="label">Remember me:</div>
 | 
			
		||||
                <input class="" type="checkbox" name="remember" value="true"/>
 | 
			
		||||
            </div>
 | 
			
		||||
            <input type="submit" class="button" name="login" value="Login"/>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
							
								
								
									
										13
									
								
								app/templates/part/loginOta.phtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								app/templates/part/loginOta.phtml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
<div class="modal-container">
 | 
			
		||||
    <div class="modal">
 | 
			
		||||
        <h4 class="mb-4">OTA</h4>
 | 
			
		||||
        <form method="post">
 | 
			
		||||
            <input type="hidden" name="otaSecret" value="<?php echo $OTA; ?>"/>
 | 
			
		||||
            <div class="field">
 | 
			
		||||
                <div class="label">Code:</div>
 | 
			
		||||
                <input class="input" type="text" name="otaCode" placeholder=""/>
 | 
			
		||||
            </div>
 | 
			
		||||
            <input type="submit" class="button" name="login" value="Login"/>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
		Reference in New Issue
	
	Block a user