Warn the user when he performs an upgrade instead of update

Fixes #481
This commit is contained in:
Johannes Zellner
2015-09-10 14:32:56 +02:00
parent 2f5e9e2e26
commit 954d14cd66

View File

@@ -73,27 +73,34 @@
<br/>
<br/>
</div>
<p>This update will install version <b>{{config.update.box.version}}</b> on your Cloudron.</p>
<p>Recent Changes:</p>
<ul>
<li ng-repeat="change in config.update.box.changelog">{{change}}</li>
</ul>
<br/>
<fieldset ng-show="installedApps | readyToUpdate">
<form name="update_form" role="form" ng-submit="doUpdate()" autocomplete="off">
<div class="form-group" ng-class="{ 'has-error': update_form.password.$dirty && update_form.password.$invalid }">
<label class="control-label" for="inputUpdatePassword">Give your password to verify that you are performing that action</label>
<div class="control-label" ng-show="(!update_form.password.$dirty && update.error.password) || (update_form.password.$dirty && update_form.password.$invalid)">
<small ng-show="update_form.password.$error.required && !update.error.password">A password is required</small>
<small ng-show="update_form.password.$error.minlength">The password is too short</small>
<small ng-show="update_form.password.$error.maxlength">The password is too long</small>
<small ng-show="update.error.password">Incorrect password</small>
<div ng-show="installedApps | readyToUpdate">
<b ng-show="config.update.box.upgrade" class="text-danger">
The update is a base system upgrade.<br/>
This will cause some application downtime!<br/>
<br/>
</b>
<p>New version: <b>{{config.update.box.version}}</b></p>
<p>Recent Changes:</p>
<ul>
<li ng-repeat="change in config.update.box.changelog">{{change}}</li>
</ul>
<br/>
<fieldset>
<form name="update_form" role="form" ng-submit="doUpdate()" autocomplete="off">
<div class="form-group" ng-class="{ 'has-error': update_form.password.$dirty && update_form.password.$invalid }">
<label class="control-label" for="inputUpdatePassword">Give your password to verify that you are performing that action</label>
<div class="control-label" ng-show="(!update_form.password.$dirty && update.error.password) || (update_form.password.$dirty && update_form.password.$invalid)">
<small ng-show="update_form.password.$error.required && !update.error.password">A password is required</small>
<small ng-show="update_form.password.$error.minlength">The password is too short</small>
<small ng-show="update_form.password.$error.maxlength">The password is too long</small>
<small ng-show="update.error.password">Incorrect password</small>
</div>
<input type="password" class="form-control" ng-model="update.password" id="inputUpdatePassword" name="password" placeholder="Password" ng-maxlength="512" ng-minlength="5" required autofocus>
</div>
<input type="password" class="form-control" ng-model="update.password" id="inputUpdatePassword" name="password" placeholder="Password" ng-maxlength="512" ng-minlength="5" required autofocus>
</div>
<input class="ng-hide" type="submit" ng-disabled="update_form.$invalid || update.busy"/>
</form>
</fieldset>
<input class="ng-hide" type="submit" ng-disabled="update_form.$invalid || update.busy"/>
</form>
</fieldset>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>