SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/dbtools/module_builder_db.php

  1. <?php
  2. use Sprout\Helpers\Fb;
  3. use Sprout\Helpers\Form;
  4.  
  5.  
  6. Fb::setData($data);
  7.  
  8. if (empty($data['xml'])) {
  9. $disabled = 'disabled';
  10. } else {
  11. $disabled = '';
  12. }
  13. ?>
  14.  
  15. <form action="" method="get">
  16.  
  17. <div class="mainbar-with-right-sidebar">
  18.  
  19. <div class="field-group-wrap -clearfix">
  20. <div class="field-group-item col col--one-half">
  21. <?php Form::nextFieldDetails('Table name', true); ?>
  22. <?php echo Form::text('table', ['-wrapper-class' => 'white']); ?>
  23. </div>
  24.  
  25. <div class="field-group-item col col--one-half">
  26. <?php Form::nextFieldDetails('Module type', true); ?>
  27. <?php echo Form::dropdown('type', ['-wrapper-class' => 'white'], ['has_categories' => 'Categories', 'list' => 'List', 'tree' => 'Tree']) ?>
  28. </div>
  29.  
  30. </div>
  31.  
  32. <?php Form::nextFieldDetails('XML data', false); ?>
  33. <?php echo Form::multiline('xml', ['-wrapper-class' => 'white', 'rows'=> '6', $disabled => true]); ?>
  34. </div>
  35.  
  36. <div class="right-sidebar">
  37. <div class="right-sidebar-anchor"></div>
  38. <div class="right-sidebar-inner">
  39. <div class="save-changes-box">
  40. <h2 class="icon-before icon-keyboard_arrow_right">Create Module</h2>
  41. <div class="save-changes-box-bottom -clearfix">
  42. <button type="submit" class="save-changes-save-button button button-regular button-green icon-before icon-keyboard_arrow_right">Generate db_struct.xml</button>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47.  
  48. </form>
  49.