Commit 09a5498b178628485768de4acaf21837ecbf7924
1 parent
e905cec2e3
Exists in
master
and in
1 other branch
Баг с ajax запросами рекламы
Showing 3 changed files with 4 additions and 5 deletions Side-by-side Diff
resources/views/admin/employer/index.blade.php
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | console.log('click button'); |
44 | 44 | let id = e.target.id; |
45 | 45 | let form = document.getElementById("form_modal_del"); |
46 | - form.action = "<?=$_SERVER['REDIRECT_URL']?>/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); | |
46 | + form.action = "<?=$_SERVER['APP_URL']?>admin/employers/delete/"+e.target.getAttribute('data-employer')+'/'+e.target.getAttribute('data-user'); | |
47 | 47 | //document.getElementById("title_modal").innerHTML = id; |
48 | 48 | console.log(e.target.getAttribute('data-employer')); |
49 | 49 | console.log(e.target.getAttribute('data-user')); |
resources/views/admin/reclames/index.blade.php
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | console.log('click button'); |
38 | 38 | //let id = e.target.id; |
39 | 39 | let form = document.getElementById("form_modal_del"); |
40 | - form.action = "<?=$_SERVER['REDIRECT_URL'];?>/delete/"+e.target.getAttribute('data-reclame'); | |
40 | + form.action = "<?=$_SERVER['APP_URL'];?>admin/reclames/delete/"+e.target.getAttribute('data-reclame'); | |
41 | 41 | //document.getElementById("title_modal").innerHTML = id; |
42 | 42 | console.log(e.target.getAttribute('data-employer')); |
43 | 43 | console.log(e.target.getAttribute('data-user')); |
resources/views/admin/reclames/index_ajax.blade.php
... | ... | @@ -46,13 +46,12 @@ |
46 | 46 | @method('DELETE') |
47 | 47 | @if ($reclame->is_hidden) |
48 | 48 | <img class="btn-eye" name="btn_close_{{$reclame->id}}" data-status="close" data-id="{{$reclame->id}}" src="{{asset('/assets/img/close-eye.png')}}" style="width:25px; float:left; margin: 0px 5px 0px 5px; cursor: pointer;" /> |
49 | - <p style="float:left">|</p> | |
50 | 49 | @else |
51 | 50 | <img class="btn-eye" name="btn_open_{{$reclame->id}}" data-status="open" data-id="{{$reclame->id}}" src="{{asset('/assets/img/open-eye.png')}}" style="width:25px; float: left; margin: 0px 5px 0px 5px; cursor: pointer;"/> |
52 | - <p style="float:left">|</p> | |
53 | 51 | @endif |
54 | 52 | |
55 | - <input class="btn btn-danger" type="submit" style="float:left" value="Удалить"/> | |
53 | + <a @click="openModal" style="cursor: pointer;" data-reclame="{{$reclame->id}}" class="btn_del btn btn-danger">| Удалить</a> | |
54 | + <!--<input class="btn btn-danger" type="submit" style="float:left" value="Удалить"/>--> | |
56 | 55 | </form> |
57 | 56 | </td> |
58 | 57 | </tr> |