<form class="form-horizontal" ng-controller="ActiveMQ.DestinationController">
  <fieldset>
    <div class="control-group">
      <label class="pull-left" style="margin-top:5px;"> {{destinationTypeName}} name:</label>
      <input class="span10 pull-left"  type="text" size="60" style="margin-left:15px;" maxlength="300" name="destinationName" ng-model="destinationName" placeholder="{{destinationTypeName}} name"/>
    </div>
    <div class="alert alert-warning">
        The JMS API does not define a standard address syntax. Although a standard address syntax was considered, it was decided that the differences in address semantics between existing message-oriented middleware (MOM) products were too wide to bridge with a single syntax.
    </div>

    <div class="control-group">
      <label class="checkbox">
        <input type="radio" ng-model="queueType" value="true"> Queue
      </label>
      <label class="checkbox">
        <input type="radio" ng-model="queueType" value=""> Topic
      </label>
    </div>

    <div class="control-group">
      <button type="submit" class="btn btn-info" ng-click="validateAndCreateDestination(destinationName, queueType)"
              ng-disabled="!destinationName">Create {{destinationTypeName}}
      </button>
    </div>

    <div hawtio-confirm-dialog="createDialog"
         ok-button-text="Create"
         on-ok="createDestination(destinationName, queueType)">
      <div class="dialog-body">
        <p>{{destinationTypeName}} name <b>{{destinationName}}</b> contains unrecommended characters: ":"</p>
        <p>This may cause unexpected problems. Are you really sure to create this {{destinationTypeName.charAt(0).toLowerCase() + destinationTypeName.substring(1)}}?</p>
      </div>
    </div>
  </fieldset>
</form>
