mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify
This commit is contained in:
commit
f586c76418
@ -1,4 +1,4 @@
|
|||||||
{% if app.auth.id == adv.created_by_id %}
|
{% if auth_user().id == adv.created_by_id or auth_user().hasPermission('visiosoft.module.advs::advs.write') %}
|
||||||
<div class="btn-group dropleft dropleft-edit position-fixed">
|
<div class="btn-group dropleft dropleft-edit position-fixed">
|
||||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
{{ trans('visiosoft.module.advs::field.ad_actions') }}
|
{{ trans('visiosoft.module.advs::field.ad_actions') }}
|
||||||
|
|||||||
@ -642,8 +642,8 @@ class AdvsController extends PublicController
|
|||||||
$isActive = new AdvModel();
|
$isActive = new AdvModel();
|
||||||
$adv = $advRepository->getAdvArray($id);
|
$adv = $advRepository->getAdvArray($id);
|
||||||
|
|
||||||
|
if ($adv['created_by_id'] != auth()->id()
|
||||||
if ($adv['created_by_id'] != Auth::id() && !Auth::user()->hasRole('admin')) {
|
&& !auth()->user()->hasPermission('visiosoft.module.advs::advs.write')) {
|
||||||
abort(403);
|
abort(403);
|
||||||
}
|
}
|
||||||
$cats_d = array();
|
$cats_d = array();
|
||||||
|
|||||||
@ -27,10 +27,12 @@ function phoneMask(fields) {
|
|||||||
|
|
||||||
function maskPhone(name) {
|
function maskPhone(name) {
|
||||||
var currentMask = $("input[name='" + name + "']").attr('placeholder');
|
var currentMask = $("input[name='" + name + "']").attr('placeholder');
|
||||||
$("input[name='" + name + "']").mask(currentMask.replace(/[0-9+]/ig, '9'), {
|
if (currentMask) {
|
||||||
autoclear: true,
|
$("input[name='" + name + "']").mask(currentMask.replace(/[0-9+]/ig, '9'), {
|
||||||
clearIncomplete: true
|
autoclear: true,
|
||||||
});
|
clearIncomplete: true
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user