PageRenderTime 25ms CodeModel.GetById 42ms RepoModel.GetById 0ms app.codeStats 0ms

/themes/admin/views/category/category.php

https://gitlab.com/fredec/ionizecms-1.0.8.x
PHP | 113 lines | 75 code | 25 blank | 13 comment | 1 complexity | 639881ba99456f5dbc4b4521ee3ad91f MD5 | raw file
  1. <!-- Category edit view - Modal window -->
  2. <form name="categoryForm<?php echo $id_category; ?>" id="categoryForm<?php echo $id_category; ?>" action="<?php echo admin_url(); ?>category/save">
  3. <!-- Hidden fields -->
  4. <input id="id_category" name="id_category" type="hidden" value="<?php echo $id_category; ?>" />
  5. <input id="parent" name="parent" type="hidden" value="<?php echo $parent; ?>" />
  6. <input id="id_parent" name="id_parent" type="hidden" value="<?php echo $id_parent; ?>" />
  7. <input id="ordering" name="ordering" type="hidden" value="<?php echo $ordering; ?>" />
  8. <!-- Name -->
  9. <dl class="small">
  10. <dt>
  11. <label for="name"><?php echo lang('ionize_label_name'); ?></label>
  12. </dt>
  13. <dd>
  14. <input id="name" name="name" class="inputtext required" type="text" value="<?php echo $name; ?>" />
  15. </dd>
  16. </dl>
  17. <fieldset id="blocks">
  18. <!-- Tabs -->
  19. <div id="categoryTab<?php echo $id_category; ?>" class="mainTabs">
  20. <ul class="tab-menu">
  21. <?php foreach(Settings::get_languages() as $l) :?>
  22. <li class="tab_edit_category<?php echo $id_category; ?>" rel="<?php echo $l['lang']; ?>"><a><?php echo ucfirst($l['name']); ?></a></li>
  23. <?php endforeach ;?>
  24. </ul>
  25. <div class="clear"></div>
  26. </div>
  27. <div id="categoryTabContent<?php echo $id_category; ?>">
  28. <!-- Text block -->
  29. <?php foreach(Settings::get_languages() as $l) :?>
  30. <?php $lang = $l['lang']; ?>
  31. <div class="tabcontent<?php echo $id_category; ?>">
  32. <!-- title -->
  33. <dl class="small">
  34. <dt>
  35. <label for="title"><?php echo lang('ionize_label_title'); ?></label>
  36. </dt>
  37. <dd>
  38. <input id="title_<?php echo $lang; ?>" name="title_<?php echo $lang; ?>" class="inputtext w180" type="text" value="<?php echo $languages[$lang]['title']; ?>"/>
  39. </dd>
  40. </dl>
  41. <!-- subtitle -->
  42. <dl class="small">
  43. <dt>
  44. <label for="subtitle<?php echo $lang; ?><?php echo $id_category; ?>"><?php echo lang('ionize_label_subtitle'); ?></label>
  45. </dt>
  46. <dd>
  47. <input id="subtitle_<?php echo $lang; ?><?php echo $id_category; ?>" name="subtitle_<?php echo $lang; ?>" class="inputtext" type="text" value="<?php echo $languages[$lang]['subtitle']; ?>"/>
  48. </dd>
  49. </dl>
  50. <!-- description -->
  51. <dl class="small">
  52. <dt>
  53. <label for="description_<?php echo $lang; ?><?php echo $id_category; ?>"><?php echo lang('ionize_label_description'); ?></label>
  54. </dt>
  55. <dd>
  56. <textarea id="description_<?php echo $lang; ?><?php echo $id_category; ?>" name="description_<?php echo $lang; ?>" class="tinyCategory w220 h120" rel="<?php echo $lang; ?>"><?php echo $languages[$lang]['description']; ?></textarea>
  57. </dd>
  58. </dl>
  59. </div>
  60. <?php endforeach ;?>
  61. </div>
  62. </fieldset>
  63. </form>
  64. <!-- Save / Cancel buttons
  65. Must be named bSave[windows_id] where 'window_id' is the used ID for the window opening through ION.formWindow()
  66. -->
  67. <div class="buttons">
  68. <button id="bSavecategory<?php echo $id_category; ?>" type="button" class="button yes right"><?php echo lang('ionize_button_save_close'); ?></button>
  69. <button id="bCancelcategory<?php echo $id_category; ?>" type="button" class="button no right"><?php echo lang('ionize_button_cancel'); ?></button>
  70. </div>
  71. <script type="text/javascript">
  72. /**
  73. * Window resize
  74. *
  75. */
  76. ION.windowResize('category<?php echo $id_category; ?>', {width:550, height:400});
  77. /**
  78. * Tabs init
  79. *
  80. */
  81. new TabSwapper({tabsContainer: 'categoryTab<?php echo $id_category; ?>', sectionsContainer: 'categoryTabContent<?php echo $id_category; ?>', selectedClass: 'selected', deselectedClass: '', tabs: 'li', clickers: 'li a', sections: 'div.tabcontent<?php echo $id_category; ?>' });
  82. /**
  83. * TinyEditors
  84. * Must be called after tabs init.
  85. *
  86. */
  87. ION.initTinyEditors('.tab_edit_category<?php echo $id_category; ?>', '#categoryTabContent<?php echo $id_category; ?> .tinyCategory', 'small', {'height':120});
  88. </script>