/
var
/
www
/
myprog.com.ua
/
cashcontrol
/
views
/
reference
/
/var/www/myprog.com.ua/cashcontrol/views/reference
mkdir
upload
Name
Size
Mode
Actions
company.php
10352
0644
edit
dl
rm
currency.php
2147
0644
edit
dl
rm
currencys.php
3173
0644
edit
dl
rm
Edit:
/var/www/myprog.com.ua/cashcontrol/views/reference/currency.php
(2147B)
<div class="row"> <div class="col-xs-12"> <div class="page-header"> <h2><a class="btn btn-info" href="<?php echo URL;?>reference/currencys"><span class="glyphicon glyphicon-arrow-left"></span></a> Валюта <?php echo $this->currency['name'];?> <small class="pull-right"></small></h2> </div> <br> <form id="settings"> <div class="row"> <div class="col-xs-6"> <table class="table table-striped"> <thead> <tr> <td>Название</td> <td><input class="form-control" id="name" name="name" value="<?php echo $this->currency['name'];?>"></td> </tr> <tr> <td>Код</td> <td><input class="form-control" id="code" name="code" value="<?php echo $this->currency['code'];?>"></td> </tr> </thead> </table> </div> <div class="col-xs-6"> </div> </div> <br><hr> <div class="row"> <div class="col-xs-12"> <center> <button class="btn btn-success btn-lg" type="submit">Сохранить</button> </center> </div> </div> </form> </div> </div> <script> function no_error(){ $('#msgdiv').hide(); } no_error(); $('#settings').submit(function (e){ e.preventDefault(); var data = $(this).serialize(); var url = "<?php echo URL; ?>reference/save_currency/id/<?php echo $this->currency_id; ?>"; no_error(); $.post(url,data,function(json){ if (!json.success) { $('#msg').html(json.fail); $('#msgdiv').show(); $('#'+json.failid+'div').attr('class','form-group has-error'); $('#'+json.focus).focus(); $("body").animate({"scrollTop":0},"slow"); }else{ location.assign("<?php echo URL; ?>reference/currencys"); } },'json'); }); </script>
Save
Валюта currency['name'];?>
Название
Код
Сохранить