소스 검색

Revert "[Web] Mailbox create/edit check if unlimited quota available (#3813)" (#3815)

This reverts commit c1405f5507f5bc33549d5fcb5550ff2b5f0f3bfe.
André Peters 4 년 전
부모
커밋
4817de6d27
2개의 변경된 파일3개의 추가작업 그리고 12개의 파일을 삭제
  1. 1 6
      data/web/edit.php
  2. 2 6
      data/web/modals/mailbox.php

+ 1 - 6
data/web/edit.php

@@ -592,13 +592,8 @@ if (isset($_SESSION['mailcow_cc_role'])) {
               <br><span id="quotaBadge" class="badge">max. <?=intval($result['max_new_quota'] / 1048576)?> MiB</span>
             </label>
             <div class="col-sm-10">
-              <?php
-              $quotaMin = ((!isset($_SESSION['acl']['unlimited_quota']) || $_SESSION['acl']['unlimited_quota'] != "1") && intval($result['quota']) > 0) ? 1 : 0;
-              ?>
-              <input type="number" name="quota" style="width:100%" min="<?=$quotaMin?>" max="<?=intval($result['max_new_quota'] / 1048576);?>" value="<?=intval($result['quota']) / 1048576;?>" class="form-control">
-              <?php if($quotaMin === 0): ?>
+              <input type="number" name="quota" style="width:100%" min="0" max="<?=intval($result['max_new_quota'] / 1048576);?>" value="<?=intval($result['quota']) / 1048576;?>" class="form-control">
               <small class="help-block">0 = ∞</small>
-              <?php endif; ?>
             </div>
           </div>
           <div class="form-group">

+ 2 - 6
data/web/modals/mailbox.php

@@ -42,13 +42,9 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
             <label class="control-label col-sm-2" for="addInputQuota"><?=$lang['add']['quota_mb'];?>
               <br /><span id="quotaBadge" class="badge">max. - MiB</span>
             </label>
-            <?php
-              $quotaMin = (!isset($_SESSION['acl']['unlimited_quota']) || $_SESSION['acl']['unlimited_quota'] != "1") > 0) ? 1 : 0;
-            ?>
-            <input type="text" class="form-control" name="quota" min="<?=$quotaMin?>" max="" id="addInputQuota" disabled value="<?=$lang['add']['select_domain'];?>" required>
-            <?php if($quotaMin === 0): ?>
+            <div class="col-sm-10">
+            <input type="text" class="form-control" name="quota" min="0" max="" id="addInputQuota" disabled value="<?=$lang['add']['select_domain'];?>" required>
             <small class="help-block">0 = ∞</small>
-            <?php endif; ?>
             <div class="label label-warning addInputQuotaExhausted" style="display:none;"><?=$lang['warning']['quota_exceeded_scope'];?></div>
             </div>
           </div>