2eaac28576
Replace the submit-time check with form validation pre submit.
106 lines
4.7 KiB
HTML
106 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
|
|
|
<title> Cloudron Setup </title>
|
|
|
|
<!-- Bootstrap Core CSS -->
|
|
<link href="3rdparty/sb-admin-2/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
<!-- Custom CSS -->
|
|
<link href="3rdparty/sb-admin-2/css/sb-admin-2.css" rel="stylesheet">
|
|
|
|
<!-- Custom Fonts -->
|
|
<link href="3rdparty/sb-admin-2/font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
|
|
|
<style>
|
|
|
|
.animateMe {
|
|
opacity: 1;
|
|
transform: scale(1, 1);
|
|
-webkit-transition: 0.25s linear all;
|
|
transition: 0.25s linear all;
|
|
}
|
|
|
|
.animateMe.ng-hide-add,
|
|
.animateMe.ng-hide-remove {
|
|
display: block !important;
|
|
transform: scale(0.9, 0.9);
|
|
opacity: 0;
|
|
}
|
|
|
|
</style>
|
|
|
|
<!-- angularjs scripts -->
|
|
<script src="3rdparty/js/angular.js"></script>
|
|
<script src="3rdparty/js/angular-loader.min.js"></script>
|
|
<script src="3rdparty/js/angular-animate.min.js"></script>
|
|
<script src="3rdparty/js/angular-md5.js"></script>
|
|
<script src="3rdparty/js/autofill-event.js"></script>
|
|
|
|
<!-- jQuery Version 1.11.0 -->
|
|
<script src="3rdparty/sb-admin-2/js/jquery-1.11.0.js"></script>
|
|
|
|
<!-- Bootstrap Core JavaScript -->
|
|
<script src="3rdparty/sb-admin-2/js/bootstrap.min.js"></script>
|
|
|
|
<!-- setup application -->
|
|
<script src="js/setup.js"></script>
|
|
|
|
<!-- services and factories -->
|
|
<script src="js/client.js"></script>
|
|
|
|
</head>
|
|
|
|
<body ng-app="Application" ng-controller="SetupController">
|
|
|
|
<div class="container animateMe ng-hide" ng-show="initialized && !busy">
|
|
<div class="row">
|
|
<div class="col-md-12 text-center">
|
|
<h1>Welcome to your Cloudron</h1>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12 text-center">
|
|
<h3 class="">Start by creating your first user</h3>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6 col-md-offset-3">
|
|
<fieldset>
|
|
<form class="signin-form" role="form" name="setup_form" novalidate ng-submit="submit()">
|
|
<div class="form-group" ng-class="{ 'has-error': setup_form.username.$dirty && setup_form.username.$invalid }">
|
|
<label class="control-label" for="inputUsername">Username</label>
|
|
<input type="text" class="form-control" ng-model="username" id="inputUsername" name="username" ng-maxlength="512" ng-minlength="3" autofocus required>
|
|
</div>
|
|
<div class="form-group" ng-class="{ 'has-error': setup_form.email.$dirty && setup_form.email.$invalid }">
|
|
<label class="control-label" for="inputEmail">Email</label>
|
|
<input type="email" class="form-control" ng-model="email" id="inputEmail" name="email" required>
|
|
</div>
|
|
<div class="form-group" ng-class="{ 'has-error': setup_form.password.$dirty && setup_form.password.$invalid }">
|
|
<label class="control-label" for="inputPassword">Password</label>
|
|
<input type="password" class="form-control" ng-model="password" id="inputPassword" name="password" ng-maxlength="512" ng-minlength="5" required>
|
|
</div>
|
|
<div class="form-group" ng-class="{ 'has-error': setup_form.repeatPassword.$dirty && (setup_form.repeatPassword.$invalid || password !== passwordRepeat) }">
|
|
<label class="control-label" for="inputPasswordRepeat">Repeat Password</label>
|
|
<input type="password" class="form-control" ng-model="passwordRepeat" id="inputPasswordRepeat" name="repeatPassword" required>
|
|
</div>
|
|
<input class="btn btn-primary btn-outline pull-right" type="submit" ng-disabled="setup_form.$invalid || password !== passwordRepeat || busy" value="Create User"/>
|
|
</form>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container animateMe ng-hide" ng-show="busy">
|
|
<div class="col-lg-12" style="text-align: center;">
|
|
<h2>Your Cloudron is being initialized</h2>
|
|
<i class="fa fa-circle-o-notch fa-spin fa-5x"></i>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|