示例#1
0
 public function getView()
 {
     $o = $this;
     h::div(array('class' => 'clearfix'), function () use($o) {
         h::label(array('for' => 'username'), 'API Username');
         h::div(array('class' => 'input'), function () use($o) {
             h::input(array('class' => 'span6', 'type' => 'text', 'name' => 'username', 'value' => $o->getUsername()));
         });
     });
     h::div(array('class' => 'clearfix'), function () use($o) {
         h::label(array('for' => 'key'), 'API Secret');
         h::div(array('class' => 'input'), function () use($o) {
             h::input(array('class' => 'span6', 'type' => 'text', 'name' => 'key', 'value' => $o->getKey()));
         });
     });
 }
示例#2
0
 /**
  * This centralizes all input type textarea to-HTML necessities.
  *
  * @param array $params This array expects three parameters:
  * . name - the form element's name
  * . label (optional) - human readable description
  * . value (optional) - the value
  * . help (optional) - the help block to append to the text input
  * . size (optional) - the Bootstrap CSS size of the textarea (e.g., xxlarge)
  * . rows (optional) - number of rows
  */
 public function getHtmlInputTextarea(array $params = array())
 {
     if (empty($params['label'])) {
         $params['label'] = ucfirst($params['name']);
     }
     h::div(array('class' => 'clearfix'), function () use($params) {
         h::label(array('for' => $params['name']), $params['label']);
         h::div(array('class' => 'input'), function () use($params) {
             if (empty($params['size'])) {
                 $params['size'] = 'large';
             }
             $rows = '3';
             if (!empty($params['rows'])) {
                 $rows = $params['rows'];
             }
             h::textarea(array('class' => $params['size'], 'name' => $params['name'], 'value' => $params['value'], 'rows' => $rows));
             if (!empty($params['help'])) {
                 h::span(array('class' => 'help-block'), $params['help']);
             }
         });
     });
 }
示例#3
0
 public function getViewExecutables()
 {
     require_once 'lib/lib.htmlgen.php';
     $o = $this;
     h::fieldset(function () use($o) {
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_PHP), 'PHP');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_PHP, 'value' => $o[SystemSettings::EXECUTABLE_PHP]));
                 h::span(array('class' => 'help-block'), "The path to the host system's PHP executable.");
             });
         });
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_GIT), 'Git');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_GIT, 'value' => $o[SystemSettings::EXECUTABLE_GIT]));
                 h::span(array('class' => 'help-block'), "The path to the host system's Git executable. Required in order to allow Git as the configured SCM for projects.");
             });
         });
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_SVN), 'SVN');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_SVN, 'value' => $o[SystemSettings::EXECUTABLE_SVN]));
                 h::span(array('class' => 'help-block'), "The path to the host system's SVN executable. Required in order to allow SVN as the configured SCM for projects.");
             });
         });
         /*    });
         
             h::fieldset(function () use ($o) {
               h::legend('Archivers');*/
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_TAR), 'tar');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_TAR, 'value' => $o[SystemSettings::EXECUTABLE_TAR]));
                 h::span(array('class' => 'help-block'), "The path to the host system's tar executable. Will be used to generate all release packages.");
             });
         });
     });
 }