Advertisement
Guest User

Untitled

a guest
Nov 24th, 2020
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.88 KB | None | 0 0
  1. [session]
  2. security = "all"
  3. ==
  4. <form class="" data-request="onSave"  data-request-flash data-request-files  data-request-validate data-request-update="user: '#customfields'">
  5.  
  6.         <input name="id" type="text"  id="accountName" value="{{ user.id }}" hidden>
  7.  
  8.         <div class="form-group">
  9.             <label for="accountName">Full Name</label>
  10.             <input name="name" type="text" class="form-control" id="accountName" value="{{ user.name }}">
  11.             <span data-validate-for="name"></span>
  12.         </div>
  13.  
  14.         <div class="form-group">
  15.             <label for="accountEmail">Email</label>
  16.             <input name="email" type="email" class="form-control" id="accountEmail" value="{{ user.email }}">
  17.             <span data-validate-for="email"></span>
  18.         </div>        
  19.  
  20.         <div class="form-group">
  21.             <label for="accountPassword">New Password</label>
  22.             <input name="password" type="password" class="form-control" id="accountPassword">
  23.             <span data-validate-for="password"></span>
  24.         </div>
  25.  
  26.         <div class="form-group">
  27.             <label for="accountPasswordConfirm">Confirm New Password</label>
  28.             <input name="password_confirmation" type="password" class="form-control" id="accountPasswordConfirm">
  29.             <span data-validate-for="password_confirmation"></span>
  30.         </div>
  31.  
  32.         <!-- notes count -->
  33.         <input id="notescount" name="notescount" value="{{ user.getRepeatField('notes') | length }}"  hidden>
  34.  
  35.           <div id="notes">
  36.  
  37.         <!-- textareas -->
  38.  
  39.         {% for item in user.getRepeatField('notes') %}
  40.             <div  id="note{{loop.index}}"  class="form-group">
  41.             <label>Note</label>
  42.             <button type="button" class="btn btn-default" onclick="$( '#note{{loop.index}}' ).remove();">Del</button>              
  43.                 <textarea class="form-control" name="note{{loop.index}}">{{ item.notes }}</textarea>
  44.             </div> 
  45.         {% endfor %}
  46.  
  47.         </div> 
  48.        
  49.         <script>
  50.             function addnote(){
  51.  
  52.                 $( "#notescount" ).val(Number.parseInt($( "#notescount" ).val()) + 1);
  53.                 var notecount = $( "#notescount" ).val()
  54.                 $( "#notes" ).append(
  55.                 `<div id="note` +  notecount + `" class="form-group">          
  56.                 <label>Notes</label>
  57.                 <button type="button" class="btn btn-default" onclick="$( '#note` +  notecount + `' ).remove();">Del</button>              
  58.                 <textarea class="form-control" name="note` +  notecount + `"></textarea>                        
  59.                 </div>  `
  60.                 );
  61.             }
  62.         </script>
  63.        
  64.         <div class="form-group">
  65.             <button type="button" class="btn btn-default" onclick="addnote()">Add Notes</button>
  66.         </div>  
  67.  
  68.  
  69.  
  70.         <div class="form-group">
  71.             <button type="submit" class="btn btn-default">Save</button>
  72.         </div>
  73.     </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement