/
var
/
www
/
doncode.com.ua
/
www
/
views
/
users
/
js
/
forms
/
/var/www/doncode.com.ua/www/views/users/js/forms
mkdir
upload
Name
Size
Mode
Actions
create.php
2693
0644
edit
dl
rm
edit.php
5621
0644
edit
dl
rm
Edit:
/var/www/doncode.com.ua/www/views/users/js/forms/edit.php
(5621B)
<script> var b =document.location.href.split('/'); $('#editClients').submit( function (){ var url = $(this).attr('action'); var pos = $(this).serialize(); $.post(url,pos ,function (prevent){ if(prevent.success){ $('#main-table tr:not(.header)').remove(); if(!!b[4]){ loadPageContractor (document.location.href); }else{ loadPageContractor (document.location.href+'/getList'); } $('.modal').modal('hide'); } if (prevent.fail){ alert (prevent.fail); } }, 'json' ); return false; }); </script> <form id="editClients" class="form-horizontal" method="POST" action="<?php echo URL;?>contractor/saveEditRecords"> <legend><?php echo $this->clients['FIO']; ?></legend> <fieldset> <input type="hidden" name="id" value="<?php echo $this->clients['id'];?>" /> <div class="control-group"> <label class="control-label" for="FIO">ФИО</label> <div class="controls"> <input type="text" id="FIO" value="<?php echo $this->clients['FIO']; ?>" name="FIO" /> </div> </div> <div class="control-group"> <label class="control-label" for="email">Email:</label> <div class="controls"> <input type="text" id="email" value="<?php echo $this->clients['email']; ?>" name="email" /> </div> </div> <div class="control-group"> <label class="control-label" for="phone">Телефон:</label> <div class="controls"> <input type="text" id="phone" value="<?php echo $this->clients['phone']; ?>" name="phone" /> </div> </div> <div class="control-group"> <label class="control-label" for="adress">Адрес:</label> <div class="controls"> <input type="text" value="<?php echo $this->clients['adress'];?>" id="adress" name="adress" /> </div> </div> <div class="control-group"> <label class="control-label" for="town">Город:</label> <div class="controls"> <input type="text" value="<?php echo $this->clients['town'];?>" id="town" name="town" /> </div> </div> <div class="control-group"> <label class="control-label" for="discount">Дисконт:</label> <div class="controls"> <input type="text" value="<?php echo $this->clients['discount'];?>" id="discount" name="discount" /> </div> </div> <div class="control-group"> <label class="control-label" for="max_credit">Кредит:</label> <div class="controls"> <input type="text" value="<?php echo $this->clients['max_credit'];?>" name="max_credit" id="max_credit" /> </div> </div> <div class="control-group"> <label class="control-label" for="code_clients">Код:</label> <div class="controls"> <input type="text" value="<?php echo $this->clients['code_clients'];?>" id="code_clients" name="code_clients" /> </div> </div> <div class="control-group"> <label class="control-label" for="type">Тип:</label> <div class="controls"> <select name="type" id="type"> <?php foreach ($this->type as $v){ if($v['id']==$this->clients['type']){ echo '<option value="'.$v['id'].'" selected="">'.$v['name'].'</option>'; }else{ echo '<option value="'.$v['id'].'">'.$v['name'].'</option>'; } } ?> </select> </div> </div> <div class="control-group"> <label class="control-label" for="price_type">Цена:</label> <div class="controls"> <select name="price_type" id="price_type"> <option value="A" <?php if($this->clients['price_type']=='A')echo 'selected=""';?>>[A] Розничная цена</option>'; <option value="B" <?php if($this->clients['price_type']=='B')echo 'selected=""';?>>[B] Дилер 1</option>'; <option value="C" <?php if($this->clients['price_type']=='C')echo 'selected=""';?>>[C] Дилер 2</option>'; <option value="S" <?php if($this->clients['price_type']=='S')echo 'selected=""';?>>[S] Закупочная цена</option>'; </select> </div> </div> </div> <input type="submit" class="btn " value="сохранить" /> </fieldset> </form>
Save
clients['FIO']; ?>
ФИО
Email:
Телефон:
Адрес:
Город:
Дисконт:
Кредит:
Код:
Тип:
type as $v){ if($v['id']==$this->clients['type']){ echo '
'.$v['name'].'
'; }else{ echo '
'.$v['name'].'
'; } } ?>
Цена:
clients['price_type']=='A')echo 'selected=""';?>>[A] Розничная цена
';
clients['price_type']=='B')echo 'selected=""';?>>[B] Дилер 1
';
clients['price_type']=='C')echo 'selected=""';?>>[C] Дилер 2
';
clients['price_type']=='S')echo 'selected=""';?>>[S] Закупочная цена
';