SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/operator_edit.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\Admin;
  18. use Sprout\Helpers\Fb;
  19. use Sprout\Helpers\Form;
  20.  
  21. Form::setData($data);
  22. Form::setErrors($errors);
  23. ?>
  24.  
  25.  
  26. <div class="main-tabs">
  27. <ul>
  28. <li><a href="#main-tabs-settings">Details</a></li>
  29. <li><a href="#main-tabs-change">Change Password</a></li>
  30. <li><a href="#main-tabs-cats">Categories</a></li>
  31. </ul>
  32.  
  33. <div id="main-tabs-settings">
  34. <h3>Details</h3>
  35.  
  36. <?php
  37. Form::nextFieldDetails('Username', true, 'Must be a single word, only letters and numbers allowed');
  38. echo Form::text('username');
  39. ?>
  40.  
  41. <?php
  42. Form::nextFieldDetails('Real name', true);
  43. echo Form::text('name');
  44. ?>
  45.  
  46. <?php
  47. Form::nextFieldDetails('Email', true);
  48. echo Form::text('email');
  49. ?>
  50. </div>
  51.  
  52. <div id="main-tabs-change">
  53. <h3>Change Password</h3>
  54.  
  55. <div class="clear-group">
  56. <div class="col col--one-half">
  57. <?php
  58. Form::nextFieldDetails('Enter new password', true);
  59. echo Form::password('password1', ['autocomplete' => 'off']);
  60. ?>
  61. </div>
  62. <div class="col col--one-half">
  63. <?php
  64. Form::nextFieldDetails('Enter it again', true);
  65. echo Form::password('password2', ['autocomplete' => 'off']);
  66. ?>
  67. </div>
  68. </div>
  69. </div>
  70.  
  71. <div id="main-tabs-cats">
  72. <?php Fb::heading('Categories'); ?>
  73. <?= Form::checkboxSet('categories', [], $cats); ?>
  74. </div>
  75. </div>
  76.  
  77. <?php Admin::clearFieldErrors(); ?>
  78.