<form
  role="form"
  ng-submit="opts.save()"
>
  <div class="kuiLocalDropdownTitle">Save {{opts.displayName}}</div>
  <div class="kuiLocalDropdownSection">
    <div class="kuiLocalDropdownHeader">
      <div class="kuiLocalDropdownHeader__label">
        Title
      </div>
    </div>
    <input
      class="kuiLocalDropdownInput"
      id="dashboardTitle"
      type="text"
      ng-model="model.title"
      placeholder="Dashboard title"
      input-focus="select"
    >
  </div>
  <div class="kuiLocalDropdownSection">
    <div class="kuiLocalDropdownHeader">
      <div class="kuiLocalDropdownHeader__label">
        Description
      </div>
    </div>
    <input
      class="kuiLocalDropdownInput"
      id="dashboardDescription"
      type="text"
      ng-model="model.description"
      placeholder="Dashboard description"
    >
  </div>

  <saved-object-save-as-check-box saved-object="opts.dashboard"></saved-object-save-as-check-box>

  <div class="form-group">
    <label>
      <input
        type="checkbox"
        ng-model="model.timeRestore"
        ng-checked="model.timeRestore"
        data-test-subj="storeTimeWithDashboard"
      >
      Store time with {{opts.displayName}}
      <kbn-info placement="bottom" info="Change the time filter to the currently selected time each time this dashboard is loaded"></kbn-info>
    </label>
  </div>

  <button
    data-test-subj="confirmSaveDashboardButton"
    type="submit"
    ng-disabled="!model.title"
    class="kuiButton kuiButton--primary"
    aria-label="Save dashboard"
  >
    Save
  </button>
</form>
