view 3rdparty/bootstrap/less/tests/forms.html @ 5548:fea11d05110e

Avoid errors from selecting "no selection" on multilink (issue2550722). As discussed in issue 2550722 there are various cases where selecting "no selection" on a multilink can result in inappropriate errors from Roundup: * If selecting "no selection" produces a null edit (a value was set in the multilink in an edit with an error, then removed again, along with all other changes, in the next form submission), so the page is rendered from the form contents including the "-<id>" value for "no selection" for the multilink. * If creating an item with a nonempty value for a multilink has an error, and the resubmission changes that multilink to "no selection" (and this in turn has subcases, according to whether the creation then succeeds or fails on the resubmission, which need fixes in different places in the Roundup code). All of these cases have in common that it is expected and OK to have a "-<id>" value for a submission for a multilink when <id> is not set in that multilink in the database (because the original attempt to set <id> in that multilink had an error), so the hyperdb.py logic to give an error in that case is thus removed. In the subcase of the second case where the resubmission with "no selection" has an error, the templating code tries to produce a menu entry for the "-<id>" multilink value, which also results in an error, hence the templating.py change to ignore such values in the list for a multilink.
author Joseph Myers <jsm@polyomino.org.uk>
date Thu, 27 Sep 2018 11:33:01 +0000
parents c109f7c1e477
children
line wrap: on
line source

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap, from Twitter</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="../../docs/assets/css/bootstrap.css" rel="stylesheet">
    <link href="../../docs/assets/css/bootstrap-responsive.css" rel="stylesheet">
    <style>
      body {
        padding-top: 30px;
        padding-bottom: 30px;
      }
    </style>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../../docs/assets/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../../docs/assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../../docs/assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../../docs/assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="../../docs/assets/ico/apple-touch-icon-57-precomposed.png">
  </head>

  <body>

    <form class="container">

      <div class="page-header">
        <h1>Form controls</h1>
      </div>

      <div class="row">
        <div class="span4">

          <label>Select</label>
          <select>
            <option>Select</option>
            <option>Option 2</option>
            <option>Option 3</option>
          </select>

          <hr>

          <label>textarea</label>
          <textarea>Textarea</textarea>

          <hr>

          <label>text</label>
          <input type="text" value="Text input">

          <hr>

          <label>password</label>
          <input type="password" value="Password input">

          <hr>

          <label>checkbox</label>
          <input type="checkbox" value="">

          <hr>

          <label>radio</label>
          <input type="radio" value="">

          <hr>

          <label>button</label>
          <input type="button" value="Button">

          <hr>

          <label>submit</label>
          <input type="submit" value="Submit">

          <hr>

          <label>reset</label>
          <input type="reset" value="Reset">

        </div><!-- /span4 -->
        <div class="span4">

          <label>file</label>
          <input type="file" value="">

          <hr>

          <label>hidden</label>
          <input type="hidden" value="hidden">

          <hr>

          <label>image</label>
          <input type="image" value="">

          <hr>

          <label>datetime</label>
          <input type="datetime" value="">

          <hr>

          <label>datetime-local</label>
          <input type="datetime-local" value="">

          <hr>

          <label>date</label>
          <input type="date" value="">

          <hr>

          <label>month</label>
          <input type="month" value="">

          <hr>

          <label>time</label>
          <input type="time" value="">

          <hr>

          <label>week</label>
          <input type="week" value="">

        </div><!-- /span4 -->
        <div class="span4">

          <label>number</label>
          <input type="number" value="">

          <hr>

          <label>range</label>
          <input type="range" value="">

          <hr>

          <label>email</label>
          <input type="email" value="">

          <hr>

          <label>url</label>
          <input type="url" value="">

          <hr>

          <label>search</label>
          <input type="search" value="">

          <hr>

          <label>tel</label>
          <input type="tel" value="">

          <hr>

          <label>color</label>
          <input type="color" value="">

        </div><!-- /span4 -->
      </div><!-- /row -->

    </form> <!-- /container -->

  </body>
</html>

Roundup Issue Tracker: http://roundup-tracker.org/