Use simple input field for custom data dir instead of checkbox (email)

This commit is contained in:
Girish Ramakrishnan
2019-09-19 18:00:18 -07:00
parent 6ffa00026e
commit 50d29f8ef0
2 changed files with 17 additions and 15 deletions

View File

@@ -466,17 +466,17 @@
<div class="task-active-overlay" ng-show="app.taskId"></div>
<div class="row">
<div class="col-md-12">
<label class="control-label" for="emailMailboxNameEnabled">Custom Mail FROM</label>
<p>This sets the address from which this app sends email. This app is already configured to send mail using {{app.domain}}'s <a ng-href="/#/email/{{ app.domain }}">Outbound Email</a> settings.</p>
<fieldset>
<form role="form" name="emailForm" ng-submit="email.submit()" autocomplete="off">
<!-- recvmail currently only works with cloudron email -->
<div class="form-group">
<input type="checkbox" id="emailMailboxNameEnabled" ng-model="email.mailboxNameEnabled">
<label class="control-label" for="emailMailboxNameEnabled">Custom Mail FROM</label>
<p>This sets the address from which this app sends email. This app is already configured to send mail using {{app.domain}}'s <a ng-href="/#/email/{{ app.domain }}">Outbound Email</a> settings.</p>
<div class="has-error" ng-show="email.error.mailboxName">{{ email.error.mailboxName }}</div>
<div class="form-group" ng-class="{ 'has-error': emailForm.$dirty && email.error.mailboxName }">
<div ng-show="email.error.mailboxName">{{ email.error.mailboxName }}</div>
<div class="input-group form-inline" ng-class="{ 'has-error': !emailForm.mailboxName.$dirty && email.error.mailboxName }">
<input type="text" class="form-control" ng-required="email.mailboxNameEnabled" name="mailboxName" ng-model="email.mailboxName" ng-disabled="!email.mailboxNameEnabled">
<input type="text" class="form-control" name="mailboxName" placeholder="Leave empty to use platform default" ng-model="email.mailboxName">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" ng-disabled="!email.mailboxNameEnabled">
@@ -487,15 +487,14 @@
<br/>
</div>
<input class="ng-hide" type="submit" ng-disabled="emailForm.$invalid || email.busy"/>
<input class="ng-hide" type="submit" ng-disabled="!emailForm.$dirty || email.busy"/>
</form>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
<button class="btn btn-outline btn-primary pull-right" ng-click="email.submit()" ng-disabled="email.$invalid || email.busy"><i class="fa fa-circle-notch fa-spin" ng-show="email.busy"></i> Save</button>
<button class="btn btn-outline btn-primary pull-right" ng-click="email.submit()" ng-disabled="!emailForm.$dirty || email.busy"><i class="fa fa-circle-notch fa-spin" ng-show="email.busy"></i> Save</button>
</div>
</div>
</div>