github.com/fanux/shipyard@v0.0.0-20161009071005-6515ce223235/controller/static/app/accounts/add.html (about) 1 <div class="ui padded grid"> 2 <div class="row"> 3 <div class="column"> 4 <div class="ui segment"> 5 <div class="ui form" ng-submit="vm.addAccount()" ng-method="post"> 6 <h4 class="ui dividing header">Account Details</h4> 7 <label>Username</label> 8 <div class="field"> 9 <input type="text" name="username" ng-model="vm.username"> 10 </div> 11 <label>First Name</label> 12 <div class="field"> 13 <input type="text" name="firstName" ng-model="vm.firstName"> 14 </div> 15 <label>Last Name</label> 16 <div class="field"> 17 <input type="text" name="lastName" ng-model="vm.lastName"> 18 </div> 19 <label>Password</label> 20 <div class="field"> 21 <input type="password" name="password" ng-model="vm.password"> 22 </div> 23 <label>Roles</label> 24 <div class="field"> 25 <selectize options="vm.roleOptions" ng-model="vm.userRoles" config="vm.roleConfig"></selectize> 26 </div> 27 <div class="ui hidden divider"></div> 28 <div class="ui green submit button">Add Account</div> 29 </div> 30 </div> 31 </div> 32 </div> 33 </div> 34 <script> 35 $(function(){ 36 $('.ui.form') 37 .form({ 38 onSuccess: function() { 39 vm.addAccount(); 40 }, 41 username: { 42 identifier : 'username', 43 rules: [ 44 { 45 type : 'empty', 46 prompt : 'Please enter a username' 47 } 48 ] 49 }, 50 firstName: { 51 identifier : 'firstName', 52 rules: [ 53 { 54 type : 'empty', 55 prompt : 'Please enter a first name' 56 } 57 ] 58 }, 59 lastName: { 60 identifier : 'lastName', 61 rules: [ 62 { 63 type : 'empty', 64 prompt : 'Please enter a last name' 65 } 66 ] 67 }, 68 password: { 69 identifier : 'password', 70 rules: [ 71 { 72 type : 'empty', 73 prompt : 'Please enter a password' 74 } 75 ] 76 } 77 }); 78 79 $('.ui.checkbox').checkbox(); 80 }); 81 82 $('.ui.dropdown').dropdown(); 83 </script>