Skip to content
fossil-skin Artifact [ad2d642559]
Login

Artifact [ad2d642559]

Artifact ad2d64255967f78524548cdf1e61349ec80de4856323ecc5191075891b159ab3:


<th1>
  if {![info exists mutype]} { set mutype Markdown }
  if {[info exists submit] || [info exists submitandnew]} {
     set status Open
     if {$mutype eq "HTML"} {
       set mimetype "text/html"
     } elseif {$mutype eq "Wiki"} {
       set mimetype "text/x-fossil-wiki"
     } elseif {$mutype eq "Markdown"} {
       set mimetype "text/x-markdown"
     } elseif {$mutype eq {[links only]}} {
       set mimetype "text/x-fossil-plain"
     } else {
       set mimetype "text/plain"
     }
     submit_ticket
     set preview 1
  }
</th1>
<div class="tkt-shell">
  <div class="tkt-layout">
    <div class="tkt-main">
      <div class="tkt-card">
        <div class="tkt-card-hdr">
          <strong>New ticket</strong>
          <span>Format: <th1>combobox mutype {Markdown Wiki {Plain Text} {[links only]} HTML} 1</th1></span>
        </div>
        <div class="tkt-form-stack">
          <div class="tkt-field">
            <label class="tkt-field-label" for="tkt-new-title">Title</label>
            <input id="tkt-new-title" type="text" name="title" value="$<title>" placeholder="One-line summary of the issue">
          </div>
          <div class="tkt-field">
            <label class="tkt-field-label" for="tkt-new-desc">Description</label>
            <th1>set nline [linecount $icomment 40 12]</th1>
            <textarea id="tkt-new-desc" name="icomment" rows="$nline" class="wikiedit" placeholder="Describe the problem, reproduction steps, or proposal...">$<icomment></textarea>
          </div>
          <div class="tkt-form-actions">
            <span class="tkt-help">Preview is optional. Click Create ticket when ready.</span>
            <div class="tkt-form-btns">
              <input type="submit" name="cancel" value="Cancel" class="tkt-btn">
              <input type="submit" name="preview" value="Preview" class="tkt-btn">
              <input type="submit" name="submitandnew" value="Create &amp; New" class="tkt-btn">
              <input type="submit" name="submit" value="Create ticket" class="tkt-btn tkt-btn-primary">
            </div>
          </div>
        </div>
      </div>

      <th1>enable_output [info exists preview]</th1>
      <div class="tkt-preview-box">
        <h3>Description preview</h3>
        <th1>
        if {$mutype eq "Wiki"} {
          wiki $icomment
        } elseif {$mutype eq "Plain Text"} {
          set r [randhex]
          wiki "<verbatim-$r>[string trimright $icomment]\n</verbatim-$r>"
        } elseif {$mutype eq "Markdown"} {
          html [lindex [markdown "$icomment\n"] 1]
        } elseif {$mutype eq {[links only]}} {
          set r [randhex]
          wiki "<verbatim-$r links>[string trimright $icomment]\n</verbatim-$r>"
        } else {
          wiki "<nowiki>$icomment\n</nowiki>"
        }
        </th1>
      </div>
      <th1>enable_output 1</th1>
    </div>

    <aside class="tkt-sidebar" aria-label="Ticket metadata">
      <div class="tkt-field">
        <span class="tkt-field-label">Type</span>
        <th1>combobox type $type_choices 1</th1>
      </div>
      <div class="tkt-field">
        <span class="tkt-field-label">Severity</span>
        <th1>combobox severity $severity_choices 1</th1>
      </div>
      <th1>
      if {[capexpr {w}]} {
        html "<div class='tkt-field'><span class='tkt-field-label'>Priority</span>"
        combobox priority $priority_choices 1
        html "</div>"
        html "<div class='tkt-field'><span class='tkt-field-label'>Subsystem</span>"
        combobox subsystem $subsystem_choices 1
        html "</div>"
      }
      </th1>
      <div class="tkt-field">
        <label class="tkt-field-label" for="tkt-new-foundin">Version found in</label>
        <input id="tkt-new-foundin" type="text" name="foundin" value="$<foundin>" placeholder="Branch, tag, or hash">
      </div>
      <div class="tkt-field">
        <label class="tkt-field-label" for="tkt-new-contact">Contact email (private)</label>
        <input id="tkt-new-contact" type="text" name="private_contact" value="$<private_contact>" placeholder="Optional; not public">
      </div>
    </aside>
  </div>
</div>