Merge pull request #8 from SansPseudoFix/webdev

Redirections and autofocus
This commit is contained in:
Bigard Florian 2016-08-29 10:27:40 +02:00 committed by GitHub
commit 1f05dba7c9
4 changed files with 35 additions and 33 deletions

View File

@ -10,7 +10,7 @@
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">
<label for="configuration_username">Username</label> <label for="configuration_username">Username</label>
<input type="text" id="configuration_username" name="configuration_username" class="form-control" /> <input type="text" id="configuration_username" name="configuration_username" class="form-control" autofocus/>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -10,7 +10,7 @@
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">
<label for="admin_username">Admin username:</label> <label for="admin_username">Admin username:</label>
<input type="text" id="admin_username" name="admin_username" class="form-control" /> <input type="text" id="admin_username" name="admin_username" class="form-control" autofocus/>
</div> </div>
<br /><br /> <br /><br />

View File

@ -10,7 +10,7 @@
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">
<label for="admin_username">Username</label> <label for="admin_username">Username</label>
<input type="text" id="admin_username" name="admin_username" class="form-control" /> <input type="text" id="admin_username" name="admin_username" class="form-control" autofocus/>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -107,7 +107,8 @@
// --------------- INSTALLATION --------------- // --------------- INSTALLATION ---------------
if(isset($_GET['installation'])) { if(isset($_GET['installation'])) {
if(isInstalled($bdd) == true) { if(isInstalled($bdd) == true) {
printError('OpenVPN-admin is already installed.'); printError('OpenVPN-admin is already installed. Redirection.');
header( "refresh:3;url=index.php?admin.php" );
exit -1; exit -1;
} }
@ -142,7 +143,8 @@
unlink($sql_file); unlink($sql_file);
rmdir(dirname(__FILE__) . '/sql'); rmdir(dirname(__FILE__) . '/sql');
printSuccess('Well done, OpenVPN-Admin is installed.'); printSuccess('Well done, OpenVPN-Admin is installed. Redirection.');
header( "refresh:3;url=index.php?admin.php" );
} }
// Print the installation form // Print the installation form
else { else {