SproutCMS

This is the code documentation for the SproutCMS project

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

  1. <?php
  2. /*
  3.  * kate: tab-width 4; indent-width 4; space-indent on; word-wrap off; word-wrap-column 120;
  4.  * :tabSize=4:indentSize=4:noTabs=true:wrap=false:maxLineLen=120:mode=php:
  5.  *
  6.  * Copyright (C) 2015 Karmabunny Pty Ltd.
  7.  *
  8.  * This file is a part of SproutCMS.
  9.  *
  10.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  11.  * of the GNU General Public License as published by the Free Software Foundation, either
  12.  * version 3 of the License, or (at your option) any later version.
  13.  *
  14.  * For more information, visit <http://getsproutcms.com>.
  15.  */
  16.  
  17. use Sprout\Helpers\Enc;
  18. use Sprout\Helpers\Fb;
  19. use Sprout\Helpers\Form;
  20.  
  21.  
  22. Form::setData($data);
  23. Form::setErrors($errors);
  24. ?>
  25.  
  26.  
  27. <form action="SITE/dbtools/moduleBuilderExistingAction/<?php echo Enc::html($input_xml); ?>" method="post" enctype="multipart/form-data">
  28.  
  29. <div class="mainbar-with-right-sidebar">
  30. <h3>Module settings</h3>
  31. <?php
  32. Form::nextFieldDetails('Module author', true, '(CamelCaps)');
  33. echo Form::text('module_author');
  34.  
  35. Form::nextFieldDetails('Module name', true, '(CamelCaps)');
  36. echo Form::text('module_name');
  37. ?>
  38.  
  39. <h3>Tables</h3>
  40. <table class="main-list">
  41. <thead>
  42. <tr>
  43. <th>Table</th>
  44. <th>Admin controller</th>
  45. <th>Controller name</th>
  46. <th>Single name</th>
  47. <th>Plural name</th>
  48. <th>Single label</th>
  49. <th>Plural label</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <?php foreach ($tables as $name => $defn): ?>
  54. <tr>
  55. <td><b><?php echo Enc::html($name); ?></b></td>
  56. <td><?php echo Fb::dropdown("tables[{$name}]", [], $templates); ?></td>
  57. <td><?php echo Fb::text("tables_cname[{$name}]"); ?></td>
  58. <td><?php echo Fb::text("tables_sname[{$name}]"); ?></td>
  59. <td><?php echo Enc::html($name); ?></td>
  60. <td><?php echo Fb::text("tables_snice[{$name}]"); ?></td>
  61. <td><?php echo Fb::text("tables_pnice[{$name}]"); ?></td>
  62. </tr>
  63. <?php endforeach; ?>
  64. </tbody>
  65. </table>
  66. </div>
  67.  
  68. <div class="right-sidebar">
  69. <div class="right-sidebar-anchor"></div>
  70. <div class="right-sidebar-inner">
  71. <div class="save-changes-box">
  72. <h2 class="icon-before icon-keyboard_arrow_right">Create Module</h2>
  73. <div class="save-changes-box-bottom -clearfix">
  74. <button type="submit" class="save-changes-save-button button button-regular button-green icon-after icon-file_download">Save</button>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79.  
  80. </form>
  81.