Replace the ugly oauth proxy checkbox

This commit is contained in:
Johannes Zellner
2015-10-22 13:18:58 +02:00
parent f9f4a8e7ad
commit f72d89fa76
2 changed files with 8 additions and 9 deletions

View File

@@ -42,11 +42,10 @@
</div>
<div class="form-group">
<label class="control-label" for="oauthProxy">Website Visibility</label>
<div class="checkbox">
<label>
<input type="checkbox" id="oauthProxy" ng-model="appConfigure.oauthProxy"> Cloudron users only
</label>
</div>
<select class="form-control" id="oauthProxy" ng-model="appConfigure.oauthProxy">
<option value="">Visible to all</option>
<option value="1">Visible only to Cloudron users</option>
</select>
</div>
<a ng-show="!!appConfigure.app.manifest.configurePath" ng-href="https://{{ appConfigure.app.location }}{{ !appConfigure.app.location ? '' : (config.isCustomDomain ? '.' : '-') }}{{ config.fqdn }}/{{ appConfigure.app.manifest.configurePath }}" target="_blank">Application Specific Settings</a>
<br/>

View File

@@ -19,7 +19,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
portBindings: {},
portBindingsEnabled: {},
portBindingsInfo: {},
oauthProxy: false
oauthProxy: ''
};
$scope.appUninstall = {
@@ -52,7 +52,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.location = '';
$scope.appConfigure.password = '';
$scope.appConfigure.portBindings = {};
$scope.appConfigure.oauthProxy = false;
$scope.appConfigure.oauthProxy = '';
$scope.appConfigureForm.$setPristine();
$scope.appConfigureForm.$setUntouched();
@@ -89,7 +89,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
$scope.appConfigure.app = app;
$scope.appConfigure.location = app.location;
$scope.appConfigure.oauthProxy = app.oauthProxy;
$scope.appConfigure.oauthProxy = app.oauthProxy ? '1' : '';
$scope.appConfigure.portBindingsInfo = app.manifest.tcpPorts || {}; // Portbinding map only for information
$scope.appConfigure.portBindings = {}; // This is the actual model holding the env:port pair
$scope.appConfigure.portBindingsEnabled = {}; // This is the actual model holding the enabled/disabled flag
@@ -125,7 +125,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
var data = {
location: $scope.appConfigure.location || '',
portBindings: finalPortBindings,
oauthProxy: $scope.appConfigure.oauthProxy,
oauthProxy: !!$scope.appConfigure.oauthProxy,
accessRestriction: $scope.appConfigure.app.accessRestriction
};