member_model_edit.tpl.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php defined('IN_ADMIN') or exit('No permission resources.');?>
  2. <?php include $this->admin_tpl('header', 'admin');?>
  3. <script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>formvalidator.js" charset="UTF-8"></script>
  4. <script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>formvalidatorregex.js" charset="UTF-8"></script>
  5. <script type="text/javascript">
  6. <!--
  7. $(function(){
  8. $.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
  9. $("#modelname").formValidator({onshow:"<?php echo L('input').L('model_name')?>",onfocus:"<?php echo L('model_name').L('between_2_to_20')?>"}).inputValidator({min:2,max:20,onerror:"<?php echo L('model_name').L('between_2_to_20')?>"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"<?php echo L('model_name').L('format_incorrect')?>"}).ajaxValidator({
  10. type : "get",
  11. url : "",
  12. data :"m=member&c=member_model&a=public_checkmodelname_ajax&oldmodelname=<?php echo $modelinfo['name']?>",
  13. datatype : "html",
  14. async:'false',
  15. success : function(data){
  16. if( data == "1" ) {
  17. return true;
  18. } else {
  19. return false;
  20. }
  21. },
  22. buttons: $("#dosubmit"),
  23. onerror : "<?php echo L('modelname_already_exist')?>",
  24. onwait : "<?php echo L('connecting_please_wait')?>"
  25. }).defaultPassed();
  26. });
  27. //-->
  28. </script>
  29. <div class="pad-10">
  30. <div class="common-form">
  31. <form name="myform" action="?m=member&c=member_model&a=edit" method="post" id="myform">
  32. <input type="hidden" name="info[modelid]" value="<?php echo $_GET['modelid']?>">
  33. <fieldset>
  34. <legend><?php echo L('basic_configuration')?></legend>
  35. <table width="100%" class="table_form">
  36. <tr>
  37. <td width="80"><?php echo L('model_name')?></td>
  38. <td><input type="text" name="info[modelname]" class="input-text" id="modelname" size="30" value="<?php echo $modelinfo['name']?>"></input></td>
  39. </tr>
  40. <tr>
  41. <td><?php echo L('table_name')?></td>
  42. <td>
  43. <?php echo $this->db->db_tablepre.$modelinfo['tablename']?>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td><?php echo L('model_description')?></td>
  48. <td>
  49. <input type="text" name="info[description]" value="<?php echo $modelinfo['description']?>" class="input-text" id="description" size="80"></input>
  50. </td>
  51. </tr>
  52. <tr>
  53. <td><?php echo L('deny_model')?></td>
  54. <td>
  55. <input type="checkbox" value="1" name="info[disabled]" <?php if($modelinfo['disabled']) {?>checked<?php }?>>
  56. </td>
  57. </tr>
  58. </table>
  59. </fieldset>
  60. <div class="bk15"></div>
  61. <input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="dialog">
  62. </form>
  63. </div>
  64. </div>
  65. </body>
  66. </html>