<div>
  <div class="linkModal">
    <h1><%- insertHeading %></h1>

    <div class="linkTypes pat-autotoc autotabs"
         data-pat-autotoc="section:fieldset;levels:legend;IDPrefix:tinymce-autotoc-">

      <fieldset class="linkType internal" data-linkType="internal">
        <legend id="tinylink-internal">Internal</legend>
        <div>
          <div class="form-group main">
            <!-- this gives the name to the "linkType" -->
            <input type="text" name="internal" />
          </div>
          <div class="form-group urltype">
            <label for="external">URL Type</label>
            <select type="text" class="form-control url-type" name="urlType">
              <option value="/view" selected="true">View</option>
              <option value="_direct_">Download</option>
            </select>
          </div>
        </div>
      </fieldset>

      <fieldset class="linkType external" data-linkType="external">
        <legend id="tinylink-external">External</legend>
        <div class="form-group main">
          <label for="external"><%- externalText %></label>
          <input type="text" class="form-control" name="external" />
        </div>
      </fieldset>

      <fieldset class="linkType email" data-linkType="email">
        <legend id="tinylink-email">Email</legend>
        <div class="form-inline">
          <div class="form-group main">
            <label><%- emailText %></label>
            <input type="text" class="form-control" name="email" />
          </div>
          <div class="form-group">
            <label><%- subjectText %></label>
            <input type="text" class="form-control" name="subject" />
          </div>
        </div>
      </fieldset>

      <fieldset class="linkType anchor" data-linkType="anchor">
        <legend id="tinylink-anchor">Anchor</legend>
        <div>
          <div class="form-group main">
            <label>Select an anchor</label>
            <div class="input-wrapper">
              <select name="anchor" class="pat-select2" style="width:500px" />
            </div>
          </div>
        </div>
      </fieldset>

    </div><!-- / tabs -->

    <div class="common-controls">
      <div class="form-group">
        <label>Target</label>
        <select name="target" class="form-control">
          <% _.each(targetList, function(target){ %>
            <option value="<%- target.value %>"><%- target.text %></option>
          <% }); %>
        </select>
      </div>
      <div class="form-group">
        <label><%- titleText %></label>
        <input type="text" name="title" />
      </div>
    </div>

    <input type="submit" class="plone-btn" name="cancel" value="<%- cancelBtn %>" />
    <input type="submit" class="plone-btn plone-btn-primary context" name="insert" value="<%- insertBtn %>" />
  </div>
</div>
