Advertisement
Guest User

Untitled

a guest
Feb 19th, 2016
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.87 KB | None | 0 0
  1. <div class="container" ng-controller="DishDetailController">
  2.   A bunch of shit here to display the original array.
  3.  
  4. <!--- The new form submission part -->
  5. <div class="row" ng-controller="CommentsController">
  6.                     <div class="col-xs-12 col-sm-9">
  7.                         <blockquote ng-show="!commentsForm.$pristine && !commentsForm.$invalid">
  8.                         <p>{{newcomment.rating}} Stars</p>
  9.                         <p>{{newcomment.comment}}</p>
  10.                         <footer>
  11.                             <cite title="Comment Author">{{newcomment.author}}</cite>
  12.                         </footer>
  13.                         </blockquote>
  14.                     </div>
  15.                     <div class="col-xs-12 col-sm3"></div>
  16.                    
  17.                     <form class="form-horizontal" role="form" name="commentsForm" ng-submit="submitComment()" novalidate>
  18.                         <div class="form-group" ng-class="{ 'has-error' : commentsForm.author.$error.required && !commentsForm.author.$pristine }">
  19.                             <label for="author" class="col-sm-2 control-label">Your Name</label>
  20.                             <div class="col-sm-10">
  21.                                 <input type="text" class="form-control" id="author" name="author" placeholder="Please Enter Your Name" ng-model="newcomment.author" required>
  22.                                  <span ng-show="commentsForm.author.$error.required && !commentsForm.author.$pristine" class="help-block">You Must Enter your name</span>
  23.                             </div>
  24.                         </div>
  25.                        
  26.                         <div class="form-group">
  27.                            Radio buttons Here
  28.                        
  29.                         </div>
  30.                         <div class="form-group" ng-class="{ 'has-error' : commentsForm.comment.$error.required && !commentsForm.comment.$pristine }">
  31.                             <label for="comment" class="col-sm-2 control-label">Comments</label>
  32.                             <div class="col-sm-10">
  33.                                 <textarea class="form-control" name="comment" id="comment" placeholder="Your Comments" ng-model="newcomment.comment" required></textarea>
  34.                                 <span ng-show="commentsForm.comment.$error.required && !commentsForm.comment.$pristine" class="help-block">You Must Enter Comments</span>
  35.                             </div>
  36.                         </div>
  37.                         <div class="form-group">
  38.                             <div class="col-sm-2"></div>
  39.                             <div class="col-sm-10">
  40.                                 <button type="submit" class="btn btn-primary" ng-disabled="commentsForm.$invalid">Submit Comment</button>
  41.                             </div>
  42.                         </div>
  43.                     </form>
  44.                 </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement