<div class="modal center"  ng-controller="CourseAddCtrl">
<div cg-busy="{promise:myPromise,message:'正在加载...'}"></div>
<div class="modal-dialog" style="max-width: 600px;width: 600px;">
<div class="modal-content">
	<div class="modal-header">
				<button type="button" class="close" aria-label="Close"
					ng-click="$hide()">
					<span aria-hidden="true">×</span>
				</button>
				<h4 class="modal-title">编辑课程： {{model.code}} - {{model.name}}</h4>
	</div>
	<div class="modal-body">
<form class="form-horizontal {{submitted ? 'submitted' : ''}}" name="form" novalidate ng-submit="submit()">
  <div class="form-group">
    <label for="" class="col-sm-3 control-label" style="width: 40%;margin-left: 0px;margin-right: 0px;">课程代码<span class="req">*</span></label>
    <div class="col-sm-4">
      <input type="text" name="courseCode" class="form-control" ng-minlength="5" maxlength="5" ng-model="model.code" placeholder="课程代码" ng-required="true"/>
    </div>
    <p class="help-block text-danger" ng-show="form.courseCode.$dirty && form.courseCode.$invalid">请输入5位数字</p>
  </div>
  <div class="form-group">
    <label for="" class="col-sm-3 control-label" style="width: 40%;margin-left: 0px;margin-right: 0px;">课程名称<span class="req">*</span></label>
    <div class="col-sm-4">
      <input type="text" class="form-control" ng-model="model.name" placeholder="课程名称" ng-required="true">
    </div>
  </div>
  <div class="form-group">
    <label for="form-control" class="col-sm-3 control-label" style="width: 40%;margin-left: 0px;margin-right: 0px;">状态<span class="req">*</span></label>
    <div class="col-sm-4">
      <select class="form-control" ng-model="model.status">
      	<option value="1" ng-selected="model.status == 1">开考</option>
      	<option value="0" ng-selected="model.status == 0">停考</option>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label for="form-control" class="col-sm-3 control-label" style="width: 40%;margin-left: 0px;margin-right: 0px;">是否开放编辑</label>
    <div class="col-sm-4">
      <select class="form-control" ng-model="model.openEdit">
      	<option value="1" ng-selected="model.openEdit == 1">是</option>
      	<option value="0" ng-selected="model.openEdit == 0">否</option>
      </select>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-3 col-sm-9" style="width: 100%;margin-left: 0px;margin-right: 0px;text-align: center;">
      <button type="submit" class="btn btn-info btn-lg">保存</button>
    </div>
  </div>
</form>
    </div>
    </div>
</div>
</div>
