github.com/keysonZZZ/kmg@v0.0.0-20151121023212-05317bfd7d39/kmgView/kmgBootstrap/tplForm.gotplhtml (about)

     1  <? package kmgBootstrap
     2  func tplForm (config Form) string {
     3      method:="post"
     4      if config.IsGet{
     5          method="get"
     6      }
     7  ?>
     8      <form <? if config.IsHidden { ?>style="display: none;"<? } ?> id="<?= config.Id ?>" class="form-horizontal" autocomplete="off" role="form" action="<?=config.Url?>" method="<?=method?>">
     9          <div class="panel-body">
    10              <? for _,input:=range config.InputList{ ?>
    11                  <?=raw(input.HtmlRender())?>
    12              <? } ?>
    13          </div>
    14  
    15      <? if !config.NoSubmit { ?>
    16          <div class="panel-footer">
    17              <center>
    18                  <button type="submit" class="btn btn-primary" style="width: 170px;">
    19                      <span class="fa fa-check"></span>
    20                      提交
    21                  </button>
    22              </center>
    23          </div>
    24      <? } ?>
    25      </form>
    26  <? } ?>