/mall/upload/admin/view/template/catalog/manufacturer_form.tpl

https://bitbucket.org/allanxyh/uniquemall · Smarty Template · 105 lines · 103 code · 2 blank · 0 comment · 8 complexity · 64967cbc88fc992a71ed47a2bade633e MD5 · raw file

  1. <?php echo $header; ?>
  2. <div id="content">
  3. <div class="breadcrumb">
  4. <?php foreach ($breadcrumbs as $breadcrumb) { ?>
  5. <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
  6. <?php } ?>
  7. </div>
  8. <?php if ($error_warning) { ?>
  9. <div class="warning"><?php echo $error_warning; ?></div>
  10. <?php } ?>
  11. <div class="box">
  12. <div class="heading">
  13. <h1><img src="view/image/shipping.png" alt="" /> <?php echo $heading_title; ?></h1>
  14. <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a href="<?php echo $cancel; ?>" class="button"><?php echo $button_cancel; ?></a></div>
  15. </div>
  16. <div class="content">
  17. <div id="tabs" class="htabs"><a href="#tab-general"><?php echo $tab_general; ?></a></div>
  18. <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
  19. <div id="tab-general">
  20. <table class="form">
  21. <tr>
  22. <td><span class="required">*</span> <?php echo $entry_name; ?></td>
  23. <td><input type="text" name="name" value="<?php echo $name; ?>" size="100" />
  24. <?php if ($error_name) { ?>
  25. <span class="error"><?php echo $error_name; ?></span>
  26. <?php } ?></td>
  27. </tr>
  28. <tr>
  29. <td><?php echo $entry_store; ?></td>
  30. <td><div class="scrollbox">
  31. <?php $class = 'even'; ?>
  32. <div class="<?php echo $class; ?>">
  33. <?php if (in_array(0, $manufacturer_store)) { ?>
  34. <input type="checkbox" name="manufacturer_store[]" value="0" checked="checked" />
  35. <?php echo $text_default; ?>
  36. <?php } else { ?>
  37. <input type="checkbox" name="manufacturer_store[]" value="0" />
  38. <?php echo $text_default; ?>
  39. <?php } ?>
  40. </div>
  41. <?php foreach ($stores as $store) { ?>
  42. <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
  43. <div class="<?php echo $class; ?>">
  44. <?php if (in_array($store['store_id'], $manufacturer_store)) { ?>
  45. <input type="checkbox" name="manufacturer_store[]" value="<?php echo $store['store_id']; ?>" checked="checked" />
  46. <?php echo $store['name']; ?>
  47. <?php } else { ?>
  48. <input type="checkbox" name="manufacturer_store[]" value="<?php echo $store['store_id']; ?>" />
  49. <?php echo $store['name']; ?>
  50. <?php } ?>
  51. </div>
  52. <?php } ?>
  53. </div></td>
  54. </tr>
  55. <tr>
  56. <td><?php echo $entry_keyword; ?></td>
  57. <td><input type="text" name="keyword" value="<?php echo $keyword; ?>" /></td>
  58. </tr>
  59. <tr>
  60. <td><?php echo $entry_image; ?></td>
  61. <td valign="top"><div class="image"><img src="<?php echo $thumb; ?>" alt="" id="thumb" />
  62. <input type="hidden" name="image" value="<?php echo $image; ?>" id="image" />
  63. <br /><a onclick="image_upload('image', 'thumb');"><?php echo $text_browse; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('#thumb').attr('src', '<?php echo $no_image; ?>'); $('#image').attr('value', '');"><?php echo $text_clear; ?></a></div></td>
  64. </tr>
  65. <tr>
  66. <td><?php echo $entry_sort_order; ?></td>
  67. <td><input type="text" name="sort_order" value="<?php echo $sort_order; ?>" size="1" /></td>
  68. </tr>
  69. </table>
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. </div>
  75. <script type="text/javascript"><!--
  76. function image_upload(field, thumb) {
  77. $('#dialog').remove();
  78. $('#content').prepend('<div id="dialog" style="padding: 3px 0px 0px 0px;"><iframe src="index.php?route=common/filemanager&token=<?php echo $token; ?>&field=' + encodeURIComponent(field) + '" style="padding:0; margin: 0; display: block; width: 100%; height: 100%;" frameborder="no" scrolling="auto"></iframe></div>');
  79. $('#dialog').dialog({
  80. title: '<?php echo $text_image_manager; ?>',
  81. close: function (event, ui) {
  82. if ($('#' + field).attr('value')) {
  83. $.ajax({
  84. url: 'index.php?route=common/filemanager/image&token=<?php echo $token; ?>&image=' + encodeURIComponent($('#' + field).val()),
  85. dataType: 'text',
  86. success: function(data) {
  87. $('#' + thumb).replaceWith('<img src="' + data + '" alt="" id="' + thumb + '" />');
  88. }
  89. });
  90. }
  91. },
  92. bgiframe: false,
  93. width: 800,
  94. height: 400,
  95. resizable: false,
  96. modal: false
  97. });
  98. };
  99. //--></script>
  100. <script type="text/javascript"><!--
  101. $('#tabs a').tabs();
  102. //--></script>
  103. <?php echo $footer; ?>