Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.65 KB | None | 0 0
  1.  
  2. <form dojoType="dijit.form.Form">
  3. <script type="dojo/event" event="onSubmit" args="e">
  4.             dojo.stopEvent(e); // prevent the default submit
  5.             var newData = this.get("value");
  6.             console.log(newData);
  7.  
  8.             window.alert("Would submit here via xhr");
  9.             dojo.xhrPost( {
  10.                 url: '/system/admin/account/bsdUsers/add/',
  11.                  content: newData,
  12.                  handleAs: 'text',
  13.                  load: function(data) { dijit.byId('add_dialog').set('content', data); },
  14.                  error: function(data) { alert("error"); }
  15.              });
  16.            
  17.         </script>
  18.         <table>
  19. <tr><th><label for="id_bsdusr_uid">User ID:</label></th><td><input name="bsdusr_uid" required="true" promptMessage="" constraints="{&#39;places&#39;: 0}" type="text" id="id_bsdusr_uid" dojoType="dijit.form.NumberTextBox" /></td></tr>
  20. <tr><th><label for="id_bsdusr_username">Username:</label></th><td><input id="id_bsdusr_username" type="text" name="bsdusr_username" maxlength="30" /><br />Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.</td></tr>
  21. <tr><th><label for="id_bsdusr_home">Home Directory:</label></th><td><input name="bsdusr_home" required="true" maxLength="120" promptMessage="" type="text" id="id_bsdusr_home" dojoType="dijit.form.ValidationTextBox" /></td></tr>
  22. <tr><th><label for="id_bsdusr_shell">Shell:</label></th><td><select id="id_bsdusr_shell" required="true" name="bsdusr_shell" dojoType="dijit.form.Select">
  23. <option value="sh">sh</option>
  24. <option value="csh" selected="selected">csh</option>
  25. <option value="ksh">ksh</option>
  26. <option value="bash">bash</option>
  27. </select></td></tr>
  28. <tr><th><label for="id_bsdusr_full_name">Full Name:</label></th><td><input name="bsdusr_full_name" required="true" maxLength="120" promptMessage="" type="text" id="id_bsdusr_full_name" dojoType="dijit.form.ValidationTextBox" /></td></tr>
  29. <tr><th><label for="id_bsdusr_gid">Group ID:</label></th><td><select multiple="multiple" id="id_bsdusr_gid" name="bsdusr_gid" dojoType="dijit.form.MultiSelect">
  30. </select><br /> Hold down "Control", or "Command" on a Mac, to select more than one.</td></tr>
  31. <tr><th><label for="id_bsdusr_password1">Password:</label></th><td><input type="password" name="bsdusr_password1" id="id_bsdusr_password1" /></td></tr>
  32. <tr><th><label for="id_bsdusr_password2">Password confirmation:</label></th><td><input type="password" name="bsdusr_password2" id="id_bsdusr_password2" /><br />Enter the same password as above, for verification.</td></tr>
  33. <tr><td>
  34. <button dojoType="dijit.form.Button" type="submit"> OK </button>
  35.         </td></tr>
  36. </table>
  37. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement