extends base html block title Добавление товара endblock block content

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{%extends base.html%}
{%block title%}
Добавление товара
{%endblock%}
{%block content%}
<div class="row">
<div class="sixteen columns clearfix">
<div class="breadcrumb">
<a href="/" class="first_bc"><span>Главная</span></a>
<a href="/profile/" class="bc"><span>Личный кабинет</span></a>
<a href="/profile/goods/add/" class="last_bc"><span>Добавить товар</span></a>
</div>
<div class="page_heading"><h1>Добавление товара</h1></div>
</div>
</div>
{{SUCCESS}}
<div class="TTWForm-container">
<form action="/controllers/users/users.php?action=add_goods" class="TTWForm" method="post" novalidate=""
enctype="multipart/form-data">
{{ERRZ}}
<div id="field1-container" class="field f_100">
<label for="field1">
Название<span class="red_star">*</span>
</label>
<input type="text" name="tile" value="{{tileF}}" id="field1" required="required" />
<span style="background-color:#FFFFFF; padding:3px; color:#CC0000;">{{tileERR}}</span>
</div>
<div style="clear: both;"></div>
<div id="field1-container" class="field f_100">
<label for="field1">
Категория<span class="red_star">*</span>
</label>
<select name="cat">
{{cats}}
</select>
<span style="background-color:#FFFFFF; padding:3px; color:#CC0000;">{{catERR}}</span>
</div>
<div style="clear: both;"></div>
<div id="field2-container" class="field f_100">
<label for="field2">
Стоимость(RUR)<span class="red_star">*</span>
</label>
<input type="text" name="price" value="{{priceF}}" id="field2" required="required" />
<span style="background-color:#FFFFFF; padding:3px; color:#CC0000;">{{priceERR}}</span>
</div>
<div style="clear: both;"></div>
<div id="field2-container" class="field f_100">
<label for="field12122">
Количество продаж<span class="red_star">*</span>
<p style="font-size:12px;">
Укажите лимит количества продаж, по достижению которого товар будет снят с продажи.<br/>
Что бы указать бесконечное количество, впишите ноль.
</p>
</label>
<input type="number" value="0" min="0" name="sellscount" value="{{sellscountF}}" id="field12122" required="required" />
<span style="background-color:#FFFFFF; padding:3px; color:#CC0000;">{{sellscountERR}}</span>
</div>
<div style="clear: both;"></div>
<div id="field3-container" class="field f_100">
<label for="field3">
Картинка (300x300 / макс. 250кб)<span class="red_star">*</span>
</label>
<input type="file" name="pic1" id="field3" required="required" />
<span style="background-color:#FFFFFF; padding:3px; color:#CC0000;">{{img1ERR}}</span>
</div>
<div style="clear: both;"></div>
<div onclick="jQuery(this).hide().next('div').fadeIn('slow');" style="cursor: pointer;"><img src="/media/images/site_elems/plus.png" /> Добавить еще картинки...</div>
<div style="display:none; background-color:#DDDDDD; padding:10px; border-radius:7px;">
<div style="font-size: 30px; margin-bottom:5px; font-weight:bold; opacity:0.3;">Еще картинки...</div>
<div id="field7-container" class="field f_100">
<label for="field7">
</label>
<input type="file" name="pic2" id="field7" /><img style="cursor: pointer;" onclick="jQuery(this).prev().val('');" src="/media/images/site_elems/x.png" />
<span style="padding:3px; color:#CC0000;">{{img2ERR}}</span>
</div>
<div style="clear: both;"></div>
<div id="field8-container" class="field f_100">
<label for="field8">
</label>
<input type="file" name="pic3" id="field8" /><img style="cursor: pointer;" onclick="jQuery(this).prev().val('');" src="/media/images/site_elems/x.png" />
<span style="padding:3px; color:#CC0000;">{{img3ERR}}</span>
</div>
<div id="field9-container" class="field f_100">
<label for="field9">
</label>
<input type="file" name="pic4" id="field9" /><img style="cursor: pointer;" onclick="jQuery(this).prev().val('');" src="/media/images/site_elems/x.png" />
<span style="padding:3px; color:#CC0000;">{{img4ERR}}</span>
</div>
<div style="clear: both;"></div>
</div>
<div id="field3-container" class="field f_100">
<label for="field100500">
Прикрепить архив<span class="red_star">*</span>
</label>
<input type="file" name="zip" id="field100500" required="required" /><br />
<span style="background-color:#FFFFFF; padding:3px; color:#CC0000;">{{zipERR}}</span>
</div>
<div style="clear: both;"></div>
<div id="field4-container" class="field f_100">
<label for="field4">
Описание<span class="red_star">*</span>
</label>
Макс. 10.000 символов
<textarea rows="7" cols="50" name="des" style="width: 100%;" id="field4" required="required">{{desF}}</textarea>
<span style="background-color:#FFFFFF; padding:3px; color:#CC0000;">{{desERR}}</span>
</div>
<div id="form-submit" class="field f_100 clearfix submit" style="float: left;">
<input type="submit" value="Добавить" id="add_go" style="float: left;" />
</div>
<script type="text/javascript">
jQuery("body #add_go").click(function () {
if(jQuery('#field1').val() == '') {
alert('Введите название!');
return false;
}
if(jQuery('#field2').val() == '') {
alert('Введите стоимость!');
return false;
}
if(jQuery('#field3').val() == '') {
alert('Выберите главную картинку!');
return false;
}
if(jQuery('#field100500').val() == '') {
alert('Не выбран архив!');
return false;
}
if(jQuery('#field4').val() == '') {
alert('Введите описание!');
return false;
}
});
</script>
</form>
</div>
{%endblock%}