Skip to content

Instantly share code, notes, and snippets.

@onzag onzag/wat.html Secret
Last active Oct 11, 2016

Embed
What would you like to do?
<div class="modal fade" id="newTeacherModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Create a New Teacher</h4>
</div>
<div class="modal-body">
<form name="newTeacherForm" action="" novalidate>
<div class="form-group">
<label for="newTeacherEmail">Teacher Email?</label>
<input id="newTeacherEmail" class="form-control" type="email" name="email" ng-model="newTeacher.email" placeholder="Email for the new teacher?">
<p class="text-danger" ng-show="newTeacherForm.email.$invalid">Invalid email</p>
</div>
<div class="form-group">
<label for="newTeacherFirstName">Teacher First Name?</label>
<input id="newTeacherFirstName" class="form-control" type="text" name="firstName" ng-model="newTeacher.first_name" ng-pattern="/^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$/" required placeholder="First name for the new teacher?">
<p class="text-danger" ng-show="newTeacherForm.firstName.$invalid && newTeacher.first_name">Invalid name</p>
</div>
<div class="form-group">
<label for="newTeacherLastName">Teacher Last Name?</label>
<input id="newTeacherLastName" class="form-control" type="text" name="lastName" ng-model="newTeacher.last_name" ng-pattern="/^[a-zA-ZàáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$/" required placeholder="Last name for the new teacher?">
<p class="text-danger" ng-show="newTeacherForm.lastName.$invalid && newTeacher.last_name">Invalid last name</p>
</div>
</form>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-success btn-default"
data-dismiss="modal"
ng-click="createTeacher()" ng-disabled="!newTeacherForm.$valid">Create Teacher</button>
<button type="button" class="btn btn-danger btn-primary" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.