Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 371 | Revision 373 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 371 Revision 372
Zeile 19... Zeile 19...
19
                    "primary": "ui-icon-unlocked"
19
                    "primary": "ui-icon-unlocked"
20
                }
20
                }
21
            });
21
            });
Zeile 22... Zeile 22...
22
 
22
 
-
 
23
            $('#en2fa').click(activate2fa)
-
 
24
            $('#editDlg').dialog({
-
 
25
                autoOpen:false,
-
 
26
                modal:true,
-
 
27
                resizable:false,
-
 
28
                width:900,
-
 
29
                height:400,
-
 
30
                buttons:[
-
 
31
                    {
-
 
32
                        text:"Speichern",
-
 
33
                        icon:"ui-icon-check",
-
 
34
                        click:function (){
-
 
35
                            let url="/bestellwesen/suppliers";
-
 
36
                            if($("#ID").val())
-
 
37
                            {
-
 
38
                                url+="/"+$("#ID").val()
-
 
39
                            }
-
 
40
                            /*$.post(url,$('#supplierForm').serializeArray(),function(){
-
 
41
                                $('#editDlg').dialog("close")
-
 
42
                                location.reload()
-
 
43
                            });*/
-
 
44
                            $.ajax({
-
 
45
                                type:"post",
-
 
46
                                url:url,
-
 
47
                                data:$('#supplierForm').serializeArray(),
-
 
48
                                dataType: 'json',
-
 
49
                                success:function ()
-
 
50
                                {
-
 
51
                                    $('#editDlg').dialog("close");
-
 
52
                                    location.reload();
-
 
53
                                },
-
 
54
                                error:function (response)
-
 
55
                                {
-
 
56
                                    $('#supplierError').html(response.responseJSON.message);
-
 
57
                                    let errors = response.responseJSON.errors
-
 
58
                                    if(errors.name)
-
 
59
                                    {
-
 
60
                                        $('#supplierNameError').html(errors.name)
-
 
61
                                    }
-
 
62
                                    if(errors.rank)
-
 
63
                                    {
-
 
64
                                        $('#supplierRankError').html(errors.rank)
-
 
65
                                    }
-
 
66
                                }
-
 
67
                            })
-
 
68
                        }
-
 
69
                    },
-
 
70
                    {
-
 
71
                        text:"Abbrechen",
-
 
72
                        icon:"ui-icon-cancel",
-
 
73
                        click:function (){
-
 
74
                            $('#editDlg').dialog("close");
-
 
75
                        }
-
 
76
                    }
-
 
77
                ]
-
 
78
            })
-
 
79
            $('#delDlg').dialog({
-
 
80
                autoOpen:false,
-
 
81
                modal:true,
-
 
82
                resizable:false,
-
 
83
                width:800,
-
 
84
                buttons:[
-
 
85
                    {
-
 
86
                        text:"Löschen",
-
 
87
                        icon:"ui-icon-trash",
-
 
88
                        click:function (){
-
 
89
                            let url="/bestellwesen/suppliers/"+$("#mId").html();
-
 
90
                            $.post(url,$('#supplierDelForm').serializeArray(),function(){
-
 
91
                                $('#delDlg').dialog("close")
-
 
92
                                location.reload()
-
 
93
                            });
-
 
94
                        }
-
 
95
                    },
-
 
96
                    {
-
 
97
                        text:"Abbrechen",
-
 
98
                        icon:"ui-icon-cancel",
-
 
99
                        click:function (){
-
 
100
                            $('#delDlg').dialog("close");
-
 
101
                        }
-
 
102
                    }
-
 
103
                ]
-
 
104
            })
-
 
105
            $("#new").uibutton({
-
 
106
                icons:{
-
 
107
                    primary:"ui-icon-plus"
-
 
108
                }
-
 
109
            }).click(function()
-
 
110
            {
-
 
111
                let url="/bestellwesen/suppliers/create/";
-
 
112
                $('#editDlg').load(url).dialog("open");
-
 
113
            });
-
 
114
            $(".edit").uibutton({
-
 
115
                icons:{
-
 
116
                    primary:"ui-icon-pencil"
-
 
117
                }
-
 
118
            }).click(function() {
-
 
119
                let url="/bestellwesen/suppliers/"+$(this).attr("data-id")+"/edit/";
-
 
120
                $('#editDlg').load(url).dialog("open");
-
 
121
            });
-
 
122
            $(".del").uibutton({
-
 
123
                icons:{
-
 
124
                    primary:"ui-icon-trash"
-
 
125
                }
-
 
126
            }).click(function() {
-
 
127
                let mId=$(this).attr("data-id");
-
 
128
                $.get("/bestellwesen/suppliers/"+mId,function(name) {
-
 
129
                    $('#supplierName').html(name);
-
 
130
                    $('#mId').html(mId);
-
 
131
                    $('#delDlg').dialog("open");
-
 
132
                })
-
 
133
            })
23
            $('#en2fa').click(activate2fa)
134
 
Zeile 24... Zeile 135...
24
        })
135
        })
25
 
136
 
26
        function deactivate2fa() {
137
        function deactivate2fa() {
Zeile 179... Zeile 290...
179
            clear: both;
290
            clear: both;
180
            float: left;
291
            float: left;
Zeile 181... Zeile 292...
181
 
292
 
182
        }
293
        }
-
 
294
    </style>
-
 
295
    <button id="new"></button>
183
    </style>
296
    <br><br>
184
    <table class="keinRand" width="100%" cellspacing="0" cellpadding="3" id="dataTableBackendUsers">
297
    <table class="keinRand" width="100%" cellspacing="0" cellpadding="3" id="dataTableBackendUsers">
185
        <thead>
298
        <thead>
186
        <tr>
-
 
187
            <td class="headline" colspan="3">
-
 
188
                Benutzer: Bearbeiten
-
 
189
            </td>
-
 
190
        </tr>
-
 
191
        <tr>
299
        <tr>
192
            <td class="headline">
300
            <td class="headline">
193
                Login
301
                Login
194
            </td>
302
            </td>
195
            <td class="headline">
303
            <td class="headline">
Zeile 203... Zeile 311...
203
        <tbody>
311
        <tbody>
204
        {foreach $users as $user}
312
        {foreach $users as $user}
205
            {cycle values=' ,gerade' assign='class'}
313
            {cycle values=' ,gerade' assign='class'}
206
            <tr class="rechts {$class}">
314
            <tr class="rechts {$class}">
207
                <td>
315
                <td>
208
                    <a href="/backend_users/{$user.id}/edit">
-
 
209
                        {$user.email}
316
                    {$user.email}
210
                    </a>
-
 
211
                </td>
317
                </td>
212
                <td>
318
                <td>
213
                    {if $user["2fa"] == true}
319
                    {if $user["2fa"] == true}
214
                        <div class="locked" title="Zwei-Faktor-Authentifizierung aktiv"
320
                        <div class="locked" title="Zwei-Faktor-Authentifizierung aktiv"
215
                             data-id="{$users.id}"></div>
321
                             data-id="{$users.id}"></div>
Zeile 224... Zeile 330...
224
                        {$user.last_login|date_format:"%d.%m.%Y %H:%M"} |
330
                        {$user.last_login|date_format:"%d.%m.%Y %H:%M"} |
225
                        <a href="#" id="ip_{$smarty.section.u_ind.index}_{$user.ip}"
331
                        <a href="#" id="ip_{$smarty.section.u_ind.index}_{$user.ip}"
226
                           class="ipAddress">{$user.ip}</a>
332
                           class="ipAddress">{$user.ip}</a>
227
                    {/if}
333
                    {/if}
228
                </td>
334
                </td>
-
 
335
                <td  style="text-align:left !important;">
-
 
336
                    <button class="edit" data-id="{$user.id}"></button>
-
 
337
                    <button class="del" data-id="{$user.id}"></button>
-
 
338
                </td>
Zeile 229... Zeile 339...
229
 
339
 
230
            </tr>
340
            </tr>
231
        {/foreach}
341
        {/foreach}
232
        </tbody>
342
        </tbody>
-
 
343
    </table>
-
 
344
    <div id="editDlg"></div>
-
 
345
    <div id="delDlg" title="Lieferant löschen">
-
 
346
        Wollen Sie den Lieferanten <span id="supplierName"></span> wirklich löschen?
-
 
347
        <span id="mId" style="display: none"></span>
-
 
348
        <form id="supplierDelForm">
-
 
349
            <input type="hidden" name="_method" value="DELETE">
-
 
350
            <input type="hidden" name="_token" value="{csrf_token()}">
-
 
351
        </form>
233
    </table>
352
    </div>