By
Warrangie
<div class="block-signup"> <form action="" method="post"> <table class="form-table"> <tr> <th colspan="2">Информация о клиенте</th> </tr> <tr> <td class="label"> </td> <td class="value"> <?php if ($user_shopper_group->shopper_group_id == 5): ?> <input type="radio" id="shopper_group_id_5" name="data[shopper_group_id]" value="5" checked="checked" /> <label for="shopper_group_id_5"><span></span>Физическое лицо</label> <div class="example"> Преимущества: отслеживание заказа on-line, дисконтная программа, участие в конкурсах и многое другое </div> <?php endif; ?> <?php if ($user_shopper_group->shopper_group_id == 9): ?> <input type="radio" id="shopper_group_id_9" name="data[shopper_group_id]" value="9" checked="checked" /> <label for="shopper_group_id_9"><span></span>Юридическое лицо</label> <div class="example"> Преимущества: отслеживание заказа on-line, дисконтная программа, участие в конкурсах, просмотри оптовых цен и многое другое </div> <?php endif; ?> </td> </tr> <tr> <td class="label"> <span class="required">*</span> E-mail: </td> <td class="value"> <input type="text" class="short" name="data[email]" value="<?php print htmlspecialchars($data['email']); ?>" /> <span class="validation"><?php print $validation['email']; ?></span> </td> </tr> <tr> <td class="label"> Логин: </td> <td class="value"> <span class="value"><?php print $user->username; ?></span> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Пароль: </td> <td class="value"> <input type="password" class="short" name="data[password]" value="<?php print htmlspecialchars($data['password']); ?>" /> <span class="validation"><?php print $validation['password']; ?></span> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Подтвердите пароль: </td> <td class="value"> <input type="password" class="short" name="data[confirm_password]" value="<?php print htmlspecialchars($data['confirm_password']); ?>" /> <span class="validation"><?php print $validation['confirm_password']; ?></span> </td> </tr> <tr> <td colspan="2" class="separator"> </td> </tr> <tr> <td class="label"> Обращение: </td> <td class="value"> <select class="short" name="data[title]"> <option value="" <?php if ($data['title'] == ''): ?>selected="selected"<?php endif; ?>>Нет</option> <option value="Г-н" <?php if ($data['title'] == 'Г-н'): ?>selected="selected"<?php endif; ?>>Г-н</option> <option value="Г-жа" <?php if ($data['title'] == 'Г-жа'): ?>selected="selected"<?php endif; ?>>Г-жа</option> <option value="Доктор" <?php if ($data['title'] == 'Доктор'): ?>selected="selected"<?php endif; ?>>Доктор</option> <option value="Профессор." <?php if ($data['title'] == 'Профессор.'): ?>selected="selected"<?php endif; ?>>Профессор.</option> </select> <span class="validation"><?php print $validation['title']; ?></span> </td> </tr> <?php if ($user_shopper_group->shopper_group_id == 5): ?> <tr> <td class="label"> <span class="required">*</span> Фамилия: </td> <td class="value"> <input type="text" class="short" name="data[last_name]" value="<?php print htmlspecialchars($data['last_name']); ?>" /> <span class="validation"><?php print $validation['last_name']; ?></span> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Имя: </td> <td class="value"> <input type="text" class="short" name="data[first_name]" value="<?php print htmlspecialchars($data['first_name']); ?>" /> <span class="validation"><?php print $validation['first_name']; ?></span> </td> </tr> <tr> <td class="label"> Дата рождения: </td> <td class="value"> <script src="http://test.loc/brainfuck/includes/js/calendar/calendar.js" type="text/javascript"></script> <script src="http://test.loc/brainfuck/includes/js/calendar/lang/calendar-en-GB.js" type="text/javascript"></script> <link type="text/css" href="http://test.loc/brainfuck/includes/js/calendar/calendar-mos.css" rel="stylesheet" media="screen, projection"> <input id="vm_date_field" name="data[vm_bdate]" value="<?php print htmlspecialchars($data['vm_bdate']); ?>" class="inputbox" type="text" style="width: 220px;" readonly="readonly"> <input name="reset" class="button" onclick="return showCalendar('vm_date_field', 'y-mm-dd');" value="..." type="reset"> </td> </tr> <?php endif; ?> <?php if ($user_shopper_group->shopper_group_id == 9): ?> <tr> <td class="label"> <span class="required">*</span> ФИО руководителя: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_fio]" value="<?php print htmlspecialchars($data['vm_ur_fio']); ?>" /> <span class="validation"><?php print $validation['vm_ur_fio']; ?></span> <div class="example">Например: Иванов Иван Иванович</div> </td> </tr> <tr> <td class="label"> <span class="required">*</span> На основании чего действует: </td> <td class="value"> <select class="short" name="data[vm_ur_certificate]"> <option value="0" <?php if (!$data['vm_ur_certificate']): ?>selected="selected"<?php endif; ?>>Выбрать</option> <option value="1" <?php if ($data['vm_ur_certificate'] == '1'): ?>selected="selected"<?php endif; ?>>Устав</option> <option value="2" <?php if ($data['vm_ur_certificate'] == '2'): ?>selected="selected"<?php endif; ?>>Приказ</option> <option value="3" <?php if ($data['vm_ur_certificate'] == '3'): ?>selected="selected"<?php endif; ?>>Свидетельство о регистрации</option> </select> <span class="validation"><?php print $validation['vm_ur_certificate']; ?></span> </td> </tr> <?php endif; ?> <tr> <td class="label"> <span class="required">*</span> Телефон: </td> <td class="value"> <input name="data[phone_1]" type="text" class="short" value="<?=$data['phone_1']?>"> <span class="validation"><?php print $validation['phone_1']; ?></span> <div class="example">Например: +375 25 123 45 65</div> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Страна: </td> <td class="value"> <select class="short" name="data[country]"> <option value="0" <?php if (!$data['country']): ?>selected="selected"<?php endif; ?>>Выбрать</option> <option value="BLR" <?php if ($data['country'] == 'BLR'): ?>selected="selected"<?php endif; ?>>Беларусь</option> </select> <span class="validation"><?php print $validation['country']; ?></span> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Город: </td> <td class="value"> <input type="text" class="short" name="data[city]" value="<?php print htmlspecialchars($data['city']); ?>" /> <span class="validation"><?php print $validation['city']; ?></span> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Адрес доставки: </td> <td class="value"> <input type="text" class="short" name="data[address_1]" value="<?php print htmlspecialchars($data['address_1']); ?>" /> <span class="validation"><?php print $validation['address_1']; ?></span> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Индекс: </td> <td class="value"> <input type="text" class="short" name="data[zip]" value="<?php print htmlspecialchars($data['zip']); ?>" /> <span class="validation"><?php print $validation['zip']; ?></span> </td> </tr> <?php if ($user_shopper_group->shopper_group_id == 9): ?> <tr> <td class="label"> Факс: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_fax]" value="<?php print htmlspecialchars($data['vm_ur_fax']); ?>" /> <span class="validation"><?php print $validation['vm_ur_fax']; ?></span> </td> </tr> <tr class="shopper_group_id_9_content"> <td colspan="2" class="separator"> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Наименование организации: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_company_name]" value="<?php print htmlspecialchars($data['vm_ur_company_name']); ?>" /> <span class="validation"><?php print $validation['vm_ur_company_name']; ?></span> <div class="example">Например: ООО «Компания» или ИП Иванов</div> </td> </tr> <tr> <td class="label"> <span class="required">*</span> Юридический адрес: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_company_adress]" value="<?php print htmlspecialchars($data['vm_ur_company_adress']); ?>" /> <span class="validation"><?php print $validation['vm_ur_company_adress']; ?></span> </td> </tr> <tr> <td class="label"> <span class="required">*</span> УНП: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_company_unp]" value="<?php print htmlspecialchars($data['vm_ur_company_unp']); ?>" /> <span class="validation"><?php print $validation['vm_ur_company_unp']; ?></span> </td> </tr> <tr> <td class="label"> р/с: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_company_rs]" value="<?php print htmlspecialchars($data['vm_ur_company_rs']); ?>" /> <span class="validation"><?php print $validation['vm_ur_company_rs']; ?></span> </td> </tr> <tr> <td class="label"> Банк: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_company_bank]" value="<?php print htmlspecialchars($data['vm_ur_company_bank']); ?>" /> <span class="validation"><?php print $validation['vm_ur_company_bank']; ?></span> </td> </tr> <tr> <td class="label"> Код банка: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_company_bank_code]" value="<?php print htmlspecialchars($data['vm_ur_company_bank_code']); ?>" /> <span class="validation"><?php print $validation['vm_ur_company_bank_code']; ?></span> </td> </tr> <tr> <td class="label"> Адрес банка: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_company_bank_address]" value="<?php print htmlspecialchars($data['vm_ur_company_bank_address']); ?>" /> <span class="validation"><?php print $validation['vm_ur_company_bank_address']; ?></span> </td> </tr> <tr> <td class="label"> Контактное лицо: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_contact_person]" value="<?php print htmlspecialchars($data['vm_ur_contact_person']); ?>" /> <span class="validation"><?php print $validation['vm_ur_contact_person']; ?></span> </td> </tr> <tr> <td class="label"> Телефон контактного лица: </td> <td class="value"> <input type="text" class="short" name="data[vm_ur_contact_person_phone]" value="<?php print htmlspecialchars($data['vm_ur_contact_person_phone']); ?>" /> <span class="validation"><?php print $validation['vm_ur_contact_person_phone']; ?></span> </td> </tr> <?php endif; ?> <tr> <td colspan="2" class="separator"> </td> </tr> <tr> <td class="label"> </td> <td class="value"> <input type="submit" value="Сохранить" /> </td> </tr> </table> </form></div>Если у любого одного инпута, кроме селекта и субмита, удалить value, то форма отправляется и пост приходит, а без удаления - форма даже не отправляется, пОста просто нет.