| 1 |
lars |
1 |
<script>
|
|
|
2 |
$(function(){
|
|
|
3 |
$('#add_statuscode').button({
|
|
|
4 |
icons:
|
|
|
5 |
{
|
|
|
6 |
primary: "ui-icon-plus"
|
|
|
7 |
}
|
|
|
8 |
}).click(add_statuscode);
|
|
|
9 |
$('.del_code').button({
|
|
|
10 |
icons:
|
|
|
11 |
{
|
|
|
12 |
primary:"ui-icon-trash"
|
|
|
13 |
}
|
|
|
14 |
}).click(del_code_row);
|
|
|
15 |
function add_statuscode()
|
|
|
16 |
{
|
|
|
17 |
anz=$('.code').length;
|
|
|
18 |
$('#code_table').append("<tr class='rechts code' id='code_row_"+anz+"'><td><input type='text' name='code["+anz+"][key]'></td><td><input type='text' name='code["+anz+"][value]'></td><td><input type='text' name='code["+anz+"][iamge]'><input type='hidden' name='code["+anz+"][id]' value='"+anz+"'></td><td><button class='delete' id='del_code_"+anz+"'></button></tr>");
|
|
|
19 |
$('#del_code_'+anz).button({
|
|
|
20 |
icons:
|
|
|
21 |
{
|
|
|
22 |
primary:"ui-icon-trash"
|
|
|
23 |
}
|
|
|
24 |
}).click(del_code_row);
|
|
|
25 |
return false;
|
|
|
26 |
}
|
|
|
27 |
function del_code_row()
|
|
|
28 |
{
|
|
|
29 |
id=this.id.split("_");
|
|
|
30 |
$('#code_row_'+id[2]).remove();
|
|
|
31 |
return false;
|
|
|
32 |
}
|
|
|
33 |
});
|
|
|
34 |
</script>
|
|
|
35 |
<form method="post" id="lager_form">
|
|
|
36 |
<table width="100%">
|
|
|
37 |
<tr>
|
|
|
38 |
<td class="links">Name</td>
|
|
|
39 |
<td class="rechts">
|
|
|
40 |
<input type="text" name="l_name" value="{$lager.name}" id="f_l_name">
|
|
|
41 |
</td>
|
|
|
42 |
</tr>
|
|
|
43 |
<tr>
|
|
|
44 |
<td class="links">Rang</td>
|
|
|
45 |
<td class="rechts">
|
|
|
46 |
<input type="text" name="l_rang" id="f_l_rang" value="{$lager.rang}">
|
|
|
47 |
</td>
|
|
|
48 |
</tr>
|
|
|
49 |
<tr>
|
|
|
50 |
<td class="links">Artikel bestellbar?</td>
|
|
|
51 |
<td>
|
|
|
52 |
<input type="hidden" name="l_id" value="{$lager.id}" id="f_l_id">
|
|
|
53 |
<input type="hidden" name="l_lieferant_id" value="{$lager.lieferanten_id}">
|
|
|
54 |
<input type="hidden" name="l_bestellbar" value="0">
|
|
|
55 |
<input type="checkbox" name="l_bestellbar" value="1" id="f_l_bestellbar" {if $lager.bestellbar==1}checked="checked"{/if}>
|
|
|
56 |
</td>
|
|
|
57 |
</tr>
|
|
|
58 |
{if isset($user_rechte.bestellwesen.lieferanten.verf_codes)}
|
|
|
59 |
<tr>
|
|
|
60 |
<td class="links">Verfügbarkeits-Codes:</td>
|
|
|
61 |
<td class="rechts">
|
|
|
62 |
<table width="100%" id="code_table">
|
|
|
63 |
<tr class="links">
|
|
|
64 |
<td>Code</td>
|
|
|
65 |
<td>enstrpicht-Text</td>
|
|
|
66 |
<td>Bildnummer</td>
|
|
|
67 |
<td>
|
|
|
68 |
<button id="add_statuscode"></button>
|
|
|
69 |
</td>
|
|
|
70 |
</tr>
|
|
|
71 |
{section loop=$lager.verf_codes name=c_ind}
|
|
|
72 |
<tr class="rechts code" id="code_row_{$lager.verf_codes[c_ind].id}">
|
|
|
73 |
<td>
|
|
|
74 |
<input type="text" name="code[{$lager.verf_codes[c_ind].id}][key]" value="{$lager.verf_codes[c_ind].key}">
|
|
|
75 |
</td>
|
|
|
76 |
<td>
|
|
|
77 |
<input type="text" name="code[{$lager.verf_codes[c_ind].id}][value]" value="{$lager.verf_codes[c_ind].value}">
|
|
|
78 |
</td>
|
|
|
79 |
<td>
|
|
|
80 |
<input type="text" name="code[{$lager.verf_codes[c_ind].id}][image]" value="{$lager.verf_codes[c_ind].image}">
|
|
|
81 |
<input type="hidden" name="code[{$lager.verf_codes[c_ind].id}][id]" value="{$lager.verf_codes[c_ind].id}">
|
|
|
82 |
</td>
|
|
|
83 |
<td>
|
|
|
84 |
<button id="delete_code_{$lager.verf_codes[c_ind].id}" class="del_code"></button>
|
|
|
85 |
</td>
|
|
|
86 |
</tr>
|
|
|
87 |
{sectionelse}
|
|
|
88 |
<tr class="rechts code">
|
|
|
89 |
<td>
|
|
|
90 |
<input type="text" name="code[0][key]" value="0">
|
|
|
91 |
</td>
|
|
|
92 |
<td>
|
|
|
93 |
<input type="text" name="code[0][value]">
|
|
|
94 |
</td>
|
|
|
95 |
<td>
|
|
|
96 |
<input type="text" name="code[0][image]" value="0">
|
|
|
97 |
<input type="hidden" name="code[0][id]" value="0">
|
|
|
98 |
</td>
|
|
|
99 |
</tr>
|
|
|
100 |
{/section}
|
|
|
101 |
</table>
|
|
|
102 |
</td>
|
|
|
103 |
</tr>
|
|
|
104 |
{/if}
|
|
|
105 |
</table>
|
|
|
106 |
<input type="hidden" name="mode" value="{if $lager.id}update{else}save{/if}">
|
|
|
107 |
</form>
|