Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form dojoType="dijit.form.Form">
- <script type="dojo/event" event="onSubmit" args="e">
- dojo.stopEvent(e); // prevent the default submit
- var newData = this.get("value");
- console.log(newData);
- window.alert("Would submit here via xhr");
- dojo.xhrPost( {
- url: '/system/admin/account/bsdUsers/add/',
- content: newData,
- handleAs: 'text',
- load: function(data) { dijit.byId('add_dialog').set('content', data); },
- error: function(data) { alert("error"); }
- });
- </script>
- <table>
- <tr><th><label for="id_bsdusr_uid">User ID:</label></th><td><input name="bsdusr_uid" required="true" promptMessage="" constraints="{'places': 0}" type="text" id="id_bsdusr_uid" dojoType="dijit.form.NumberTextBox" /></td></tr>
- <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>
- <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>
- <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">
- <option value="sh">sh</option>
- <option value="csh" selected="selected">csh</option>
- <option value="ksh">ksh</option>
- <option value="bash">bash</option>
- </select></td></tr>
- <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>
- <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">
- </select><br /> Hold down "Control", or "Command" on a Mac, to select more than one.</td></tr>
- <tr><th><label for="id_bsdusr_password1">Password:</label></th><td><input type="password" name="bsdusr_password1" id="id_bsdusr_password1" /></td></tr>
- <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>
- <tr><td>
- <button dojoType="dijit.form.Button" type="submit"> OK </button>
- </td></tr>
- </table>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement