Web Interfaces of PROSUME

add.ctp 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /**
  3. * @var \App\View\AppView $this
  4. * @var \App\Model\Entity\User $user
  5. */
  6. $this->layout = false;
  7. ?>
  8. <!DOCTYPE html>
  9. <html>
  10. <?= $this->element('Eprosume/header') ?>
  11. <body class="hold-transition skin-green sidebar-mini">
  12. <div class="wrapper">
  13. <?= $this->element('Eprosume/mainHeader') ?>
  14. <!-- Left side column. contains the logo and sidebar -->
  15. <?= $this->element('Eprosume/leftSideColumn') ?>
  16. <!-- Content Wrapper. Contains page content -->
  17. <div class="content-wrapper">
  18. <!-- Content Header (Page header) -->
  19. <section class="content-header">
  20. <h1>
  21. Users
  22. <small></small>
  23. </h1>
  24. <ol class="breadcrumb">
  25. <li><a href="/"><i class="fa fa-dashboard"></i> <?= $app_name ?></a></li>
  26. <li><a href="/users">Users</a></li>
  27. <li class="active">New User</li>
  28. </ol>
  29. </section>
  30. <!-- Main content -->
  31. <section class="content">
  32. <div class="row">
  33. <div class="col-xs-12">
  34. <div class="box">
  35. <!-- /.box-header -->
  36. <div class="box-body">
  37. <nav class="user-nav large-3 medium-4 columns" id="actions-sidebar">
  38. <ul class="side-nav">
  39. <li class="heading"><?= __('Actions') ?></li>
  40. <li><?= $this->Html->link(__('List Users'), ['action' => 'index']) ?></li>
  41. </ul>
  42. </nav>
  43. <div class="users form large-9 medium-8 columns content">
  44. <?= $this->Form->create($user) ?>
  45. <fieldset>
  46. <legend><?= __('Add User') ?></legend>
  47. <?php
  48. echo $this->Form->control('username');
  49. echo $this->Form->control('password');
  50. echo $this->Form->control('emailaddress');
  51. echo $this->Form->control('role', [
  52. "type" => "select",
  53. "options" => ['admin'=>'admin', 'reader'=>'reader'],
  54. 'value' => $user->role
  55. ]);
  56. echo $this->Form->control('meter_id', [
  57. "label" => "Associated meter",
  58. "type" => "select",
  59. "options" => $meterList,
  60. 'value' => $user->meter_id
  61. ]);
  62. ?>
  63. </fieldset>
  64. <?= $this->Form->button(__('Submit'), ['class'=>'btn btn-success']) ?>
  65. <?= $this->Form->end() ?>
  66. </div>
  67. </div>
  68. <!-- /.box-body -->
  69. </div>
  70. <!-- /.box -->
  71. </div>
  72. <!-- /.col -->
  73. </div>
  74. <!-- /.row -->
  75. </section>
  76. <!-- /.content -->
  77. </div>
  78. <!-- /.content-wrapper -->
  79. <?= $this->element('Eprosume/footer') ?>
  80. </div>
  81. <!-- ./wrapper -->
  82. <?= $this->element('Eprosume/scripts') ?>
  83. </body>
  84. </html>