Hide the customer add button if the limit customer access setting is enabled
This commit is contained in:
parent
e390ab6b42
commit
d7e5817484
1 changed files with 13 additions and 8 deletions
|
@ -23,7 +23,7 @@
|
||||||
<div class="record-details col-12 col-md-7">
|
<div class="record-details col-12 col-md-7">
|
||||||
<div class="btn-toolbar mb-4">
|
<div class="btn-toolbar mb-4">
|
||||||
<div id="add-edit-delete-group" class="btn-group">
|
<div id="add-edit-delete-group" class="btn-group">
|
||||||
<?php if (can('add',PRIV_CUSTOMERS)): ?>
|
<?php if (can('add', PRIV_CUSTOMERS) && ( ! setting('limit_customer_access') || vars('role_slug') === DB_SLUG_ADMIN)): ?>
|
||||||
<button id="add-customer" class="btn btn-primary">
|
<button id="add-customer" class="btn btn-primary">
|
||||||
<i class="fas fa-plus-square me-2"></i>
|
<i class="fas fa-plus-square me-2"></i>
|
||||||
<?= lang('add') ?>
|
<?= lang('add') ?>
|
||||||
|
@ -72,7 +72,8 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="first-name"
|
<input type="text" id="first-name"
|
||||||
class="<?= vars('require_first_name') ? 'required' : '' ?> form-control" maxlength="100" disabled/>
|
class="<?= vars('require_first_name') ? 'required' : '' ?> form-control" maxlength="100"
|
||||||
|
disabled/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
@ -83,7 +84,8 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="last-name"
|
<input type="text" id="last-name"
|
||||||
class="<?= vars('require_last_name') ? 'required' : '' ?> form-control" maxlength="120" disabled/>
|
class="<?= vars('require_last_name') ? 'required' : '' ?> form-control" maxlength="120"
|
||||||
|
disabled/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
@ -94,7 +96,8 @@
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="email"
|
<input type="text" id="email"
|
||||||
class="<?= vars('require_email') ? 'required' : '' ?> form-control" maxlength="120" disabled/>
|
class="<?= vars('require_email') ? 'required' : '' ?> form-control" maxlength="120"
|
||||||
|
disabled/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
@ -115,7 +118,8 @@
|
||||||
<span class="text-danger" hidden>*</span>
|
<span class="text-danger" hidden>*</span>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="address" class="<?= vars('require_address') ? 'required' : '' ?> form-control"
|
<input type="text" id="address"
|
||||||
|
class="<?= vars('require_address') ? 'required' : '' ?> form-control"
|
||||||
maxlength="120" disabled/>
|
maxlength="120" disabled/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -137,7 +141,8 @@
|
||||||
<span class="text-danger" hidden>*</span>
|
<span class="text-danger" hidden>*</span>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="zip-code" class="<?= vars('require_zip_code') ? 'required' : '' ?> form-control"
|
<input type="text" id="zip-code"
|
||||||
|
class="<?= vars('require_zip_code') ? 'required' : '' ?> form-control"
|
||||||
maxlength="120" disabled/>
|
maxlength="120" disabled/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue