Put the alternate domain settings behind a checkbox

This commit is contained in:
Johannes Zellner
2018-07-03 18:00:22 +02:00
parent cd3fb77033
commit 6108fcf17b
2 changed files with 8 additions and 4 deletions

View File

@@ -121,12 +121,13 @@
<div class="has-error" ng-show="appConfigure.error.alternateDomains">{{ appConfigure.error.alternateDomains }}</div>
<div class="form-group" ng-class="{ 'has-error': (appConfigureForm.alternateSubdomain.$dirty && appConfigureForm.alternateSubdomain.$invalid) || (!appConfigureForm.alternateSubdomain.$dirty && appConfigure.error.alternateDomains) }">
<label class="control-label" for="appConfigureAlternateSubdomainInput">Alternate domain, which redirects to this app</label>
<input type="checkbox" id="appConfigureAlternateSubdomainInput" ng-model="appConfigure.alternateDomainEnabled">
<label class="control-label" for="appConfigureAlternateSubdomainInput">Enable alternate domain redirecting to this app</label>
<div class="input-group form-inline">
<input type="text" class="form-control" ng-model="appConfigure.alternateSubdomain" id="appConfigureAlternateSubdomainInput" name="alternateSubdomain" placeholder="{{ 'Leave empty to use bare domain' }}">
<input type="text" class="form-control" ng-model="appConfigure.alternateSubdomain" id="appConfigureAlternateSubdomainInput" name="alternateSubdomain" placeholder="{{ 'Leave empty to use bare domain' }}" ng-disabled="!appConfigure.alternateDomainEnabled">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" ng-disabled="!appConfigure.alternateDomainEnabled">
{{ (!appConfigure.alternateSubdomain ? '' : '.') + appConfigure.alternateDomain }}
<span class="caret"></span>
</button>