Cleanup some of the setup html code

This commit is contained in:
Johannes Zellner
2017-01-05 14:43:18 +01:00
parent d9865f9b0f
commit 0f70b73e81
2 changed files with 106 additions and 95 deletions

View File

@@ -32,63 +32,70 @@
<body class="setup" ng-app="Application" ng-controller="SetupController">
<center class="ng-cloak" ng-show="provider === 'caas' && !setupToken">
<h1> <i class="fa fa-frown-o fa-fw text-danger"></i> No setup token provided. </h1>
Please use the setup link for this cloudron.
</center>
<div class="main-container ng-cloak text-center" ng-show="provider === 'caas' && !setupToken">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1> <i class="fa fa-frown-o fa-fw text-danger"></i> No setup token provided. </h1>
Please use the setup link for this cloudron.
</div>
</div>
</div>
<div class="main-container ng-cloak" ng-show="initialized">
<div class="main-container ng-cloak text-center" ng-show="!busy">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<i class="fa fa-cog fa-spin fa-5x"></i>
</div>
</div>
</div>
<div class="main-container ng-cloak" ng-show="initialized && !busy">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="card" style="max-width: none; padding: 20px;">
<div ng-show="busy">
<i class="fa fa-spinner fa-pulse fa-5x"></i>
</div>
<div ng-hide="busy">
<form role="form" name="setupForm" ng-submit="activateCloudron()" novalidate>
<div class="row">
<div class="col-md-12 text-center">
<h1>Welcome to your Cloudron</h1>
<h3>Create an Admin Account</h3>
</div>
<form role="form" name="setupForm" ng-submit="activateCloudron()" novalidate>
<div class="row">
<div class="col-md-12 text-center">
<h1>Welcome to your Cloudron</h1>
<h3>Create an Admin Account</h3>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4 text-center">
<div class="form-group" ng-class="{ 'has-error': setupForm.displayName.$dirty && setupForm.displayName.$invalid }">
<input type="text" class="form-control" ng-model="account.displayName" id="inputDisplayName" name="displayName" placeholder="Display Name" required autocomplete="off" autofocus>
</div>
<div ng-show="account.requireEmail" class="form-group" ng-class="{ 'has-error': setupForm.email.$dirty && setupForm.email.$invalid }">
<input type="email" class="form-control" ng-model="account.email" id="inputEmail" name="email" placeholder="Email" required autocomplete="off">
</div>
<div class="form-group" ng-class="{ 'has-error': setupForm.username.$dirty && setupForm.username.$invalid }">
<input type="text" class="form-control" ng-model="account.username" id="inputUsername" name="username" placeholder="Username" ng-maxlength="512" ng-minlength="3" required autocomplete="off">
</div>
<div class="form-group" ng-class="{ 'has-error': setupForm.password.$dirty && setupForm.password.$invalid }">
<input type="password" class="form-control" ng-model="account.password" id="inputPassword" name="password" placeholder="Password" ng-pattern="/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,30}$/" required autocomplete="off">
<div class="control-label" ng-show="setupForm.password.$dirty && setupForm.password.$invalid">
<small ng-show="setupForm.password.$dirty && setupForm.password.$invalid">Password must be 8-30 character with at least one uppercase, one numeric and one special character</small>
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center">
<div class="form-group" ng-class="{ 'has-error': setupForm.displayName.$dirty && setupForm.displayName.$invalid }">
<input type="text" class="form-control" ng-model="account.displayName" id="inputDisplayName" name="displayName" placeholder="Display Name" required autocomplete="off" autofocus>
</div>
<div ng-show="account.requireEmail" class="form-group" ng-class="{ 'has-error': setupForm.email.$dirty && setupForm.email.$invalid }">
<input type="email" class="form-control" ng-model="account.email" id="inputEmail" name="email" placeholder="Email" required autocomplete="off">
</div>
<div class="form-group" ng-class="{ 'has-error': setupForm.username.$dirty && setupForm.username.$invalid }">
<input type="text" class="form-control" ng-model="account.username" id="inputUsername" name="username" placeholder="Username" ng-maxlength="512" ng-minlength="3" required autocomplete="off">
</div>
<div class="form-group" ng-class="{ 'has-error': setupForm.password.$dirty && setupForm.password.$invalid }">
<input type="password" class="form-control" ng-model="account.password" id="inputPassword" name="password" placeholder="Password" ng-pattern="/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,30}$/" required autocomplete="off">
<div class="control-label" ng-show="setupForm.password.$dirty && setupForm.password.$invalid">
<small ng-show="setupForm.password.$dirty && setupForm.password.$invalid">Password must be 8-30 character with at least one uppercase, one numeric and one special character</small>
</div>
</div>
</div>
<div class="row" ng-hide="provider === 'caas'">
<div class="col-md-12 text-center">
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="createAppstoreAccount"> Create <a href="https://cloudron.io" target="_blank">Cloudron Store</a> account
</label>
</div>
</div>
<div class="row" ng-hide="provider === 'caas'">
<div class="col-md-12 text-center">
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="createAppstoreAccount"> Create <a href="https://cloudron.io" target="_blank">Cloudron Store</a> account
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<input type="submit" class="btn btn-primary" ng-disabled="setupForm.$invalid" value="Done">
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<input type="submit" class="btn btn-primary" ng-disabled="setupForm.$invalid" value="Done">
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</div>