5395ed2bdca421065fb10449926f821c.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <?php /*a:2:{s:60:"/data/web/pl.valimart.net/app/admin/view/type/attr_edit.html";i:1657785098;s:59:"/data/web/pl.valimart.net/app/admin/view/public/header.html";i:1657785098;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <title><?php echo htmlentities((isset($html_title) && ($html_title !== '')?$html_title:config('ds_config.site_name'))); ?><?php echo htmlentities(lang('system_backend')); ?></title>
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
  10. <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
  11. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
  12. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
  13. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
  14. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
  15. <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
  16. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
  17. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
  18. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
  19. <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
  20. <script type="text/javascript">
  21. var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
  22. var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
  23. var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
  24. var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
  25. var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
  26. </script>
  27. </head>
  28. <body>
  29. <div id="append_parent"></div>
  30. <div id="ajaxwaitid"></div>
  31. <div class="page">
  32. <form class="" method="post">
  33. <div class="ncap-form-default">
  34. <dl>
  35. <dt><?php echo htmlentities(lang('type_add_attr_name')); ?></dt>
  36. <dd>
  37. <input type="hidden" name="attr_id" value="<?php echo htmlentities($attribute['attr_id']); ?>" />
  38. <input type="hidden" name="type_id" value="<?php echo htmlentities($attribute['type_id']); ?>" />
  39. <input type="text" name="attr_name" id="attr_name" value="<?php echo htmlentities($attribute['attr_name']); ?>" />
  40. <span class="err"></span>
  41. <p class="notic"></p>
  42. </dd>
  43. </dl>
  44. <dl>
  45. <dt><?php echo htmlentities(lang('ds_sort')); ?></dt>
  46. <dd>
  47. <input type="text" name="attr_sort" id="attr_sort" value="<?php echo htmlentities($attribute['attr_sort']); ?>" />
  48. <span class="err"></span>
  49. <p class="notic"></p>
  50. </dd>
  51. </dl>
  52. <dl>
  53. <dt><?php echo htmlentities(lang('type_edit_type_attr_is_show')); ?></dt>
  54. <dd class="onoff">
  55. <label for="attr_show1" class="cb-enable <?php if($attribute['attr_show'] == '1'): ?>selected<?php endif; ?>" ><span><?php echo htmlentities(lang('ds_yes')); ?></span></label>
  56. <label for="attr_show2" class="cb-disable <?php if($attribute['attr_show'] == '0'): ?>selected<?php endif; ?>" ><span><?php echo htmlentities(lang('ds_no')); ?></span></label>
  57. <input id="attr_show1" name="attr_show" <?php if($attribute['attr_show'] == '1'): ?>checked="checked"<?php endif; ?> value="1" type="radio">
  58. <input id="attr_show2" name="attr_show" <?php if($attribute['attr_show'] == '0'): ?>checked="checked"<?php endif; ?> value="0" type="radio">
  59. </dd>
  60. </dl>
  61. </div>
  62. <table class="ds-default-table">
  63. <thead>
  64. <tr>
  65. <th width="200"><?php echo htmlentities(lang('ds_del')); ?></th>
  66. <th width="100"><?php echo htmlentities(lang('ds_sort')); ?></th>
  67. <th><?php echo htmlentities(lang('type_add_attr_value')); ?></th>
  68. <th width="100"><?php echo htmlentities(lang('ds_handle')); ?></th>
  69. </tr>
  70. </thead>
  71. <tbody id="tr_model">
  72. <tr></tr>
  73. <?php if($attributevalue_list): if(is_array($attributevalue_list) || $attributevalue_list instanceof \think\Collection || $attributevalue_list instanceof \think\Paginator): if( count($attributevalue_list)==0 ) : echo "" ;else: foreach($attributevalue_list as $key=>$val): ?>
  74. <tr>
  75. <td>
  76. <input type="hidden" name='attr_value[<?php echo htmlentities($val['attrvalue_id']); ?>][form_submit]' value='' />
  77. <input type="checkbox" name="attr_del[<?php echo htmlentities($val['attrvalue_id']); ?>]" value="<?php echo htmlentities($val['attrvalue_id']); ?>" />
  78. </td>
  79. <td><input type="text" class="form-control" name="attr_value[<?php echo htmlentities($val['attrvalue_id']); ?>][sort]" value="<?php echo htmlentities($val['attrvalue_sort']); ?>"/></td>
  80. <td><input type="text" class="form-control" name="attr_value[<?php echo htmlentities($val['attrvalue_id']); ?>][name]" value="<?php echo htmlentities($val['attrvalue_name']); ?>"/></td>
  81. <td></td>
  82. </tr>
  83. <?php endforeach; endif; else: echo "" ;endif; ?>
  84. <?php endif; ?>
  85. </tbody>
  86. <tbody>
  87. <tr>
  88. <td>
  89. <a id="add_type" class="btn-add-nofloat marginleft" href="JavaScript:void(0);"> <span><?php echo htmlentities(lang('type_add_attr_add_one')); ?></span> </a>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td>
  94. <input class="btn" type="submit" value="<?php echo htmlentities(lang('ds_submit')); ?>"/>
  95. </td>
  96. </tr>
  97. </tbody>
  98. </table>
  99. </form>
  100. </div>
  101. <!--载入-->
  102. <script>
  103. $(function() {
  104. var i = 0;
  105. var tr_model = '<tr><td></td>' +
  106. '<td><input type="text" class="form-control" name="attr_value[key][sort]" value="0" /></td>' +
  107. '<td><input type="text" class="form-control" name="attr_value[key][name]" value="" /></td>' +
  108. '<td><a onclick="remove_tr($(this));" href="JavaScript:void(0);"><?php echo htmlentities(lang('ds_del')); ?></a></td>' +
  109. '</tr>';
  110. $("#add_type").click(function() {
  111. $('#tr_model > tr:last').after(tr_model.replace(/key/g, 's_' + i));
  112. i++;
  113. });
  114. });
  115. function remove_tr(o) {
  116. o.parents('tr:first').remove();
  117. }
  118. </script>
  119. </body>