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

Revision

Revision 223 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 223 Revision 317
Zeile 1... Zeile 1...
1
{extends file="index.tpl"}
1
{extends file="index.tpl"}
2
{block name="maincontent"}
2
{block name="maincontent"}
3
    <!-- $Id: supplierList.tpl 223 2023-08-06 12:23:48Z lars $ BEGIN -->
3
    <!-- $Id: supplierList.tpl 317 2023-08-12 19:58:02Z lars $ BEGIN -->
4
    <button id="new"></button>
4
    <button id="new"></button>
5
    <br><br>
5
    <br><br>
6
    <table class="keinRand" width="100%" cellspacing="0" cellpadding="3" id="dataTable">
6
    <table class="keinRand" width="100%" cellspacing="0" cellpadding="3" id="dataTable">
7
        <thead>
7
        <thead>
8
        <tr class="links">
8
        <tr class="links">
Zeile 67... Zeile 67...
67
                            let url="/bestellwesen/suppliers";
67
                            let url="/bestellwesen/suppliers";
68
                            if($("#ID").val())
68
                            if($("#ID").val())
69
                            {
69
                            {
70
                                url+="/"+$("#ID").val()
70
                                url+="/"+$("#ID").val()
71
                            }
71
                            }
72
                            $.post(url,$('#supplierForm').serializeArray(),function(){
72
                            /*$.post(url,$('#supplierForm').serializeArray(),function(){
73
                                $('#editDlg').dialog("close")
73
                                $('#editDlg').dialog("close")
74
                                location.reload()
74
                                location.reload()
-
 
75
                            });*/
-
 
76
                            $.ajax({
-
 
77
                                type:"post",
-
 
78
                                url:url,
-
 
79
                                data:$('#supplierForm').serializeArray(),
-
 
80
                                dataType: 'json',
-
 
81
                                success:function ()
-
 
82
                                {
-
 
83
                                    $('#editDlg').dialog("close");
-
 
84
                                    location.reload();
-
 
85
                                },
-
 
86
                                error:function (response)
-
 
87
                                {
-
 
88
                                    $('#supplierError').html(response.responseJSON.message);
-
 
89
                                    let errors = response.responseJSON.errors
-
 
90
                                    if(errors.name)
-
 
91
                                    {
-
 
92
                                        $('#supplierNameError').html(errors.name)
-
 
93
                                    }
-
 
94
                                    if(errors.rank)
-
 
95
                                    {
-
 
96
                                        $('#supplierRankError').html(errors.rank)
-
 
97
                                    }
-
 
98
                                }
75
                            });
99
                            })
76
                        }
100
                        }
77
                    },
101
                    },
78
                    {
102
                    {
79
                        text:"Abbrechen",
103
                        text:"Abbrechen",
80
                        icon:"ui-icon-cancel",
104
                        icon:"ui-icon-cancel",