Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(id){
- var users = json.Users[id];
- users.tempId = id;
- utils.loadTemplate(
- 'tpl/forms/privilegesForm.html',
- users,
- function(template){
- var submitButton = $('.input-fields-' + id + ' .submit-button'),
- $formUserName = $('.input-fields-' + id +' #user-name'),
- $formUserRole = $('.input-fields-' + id +' #user-role');
- console.log(users.tempId);
- submitButton.on('click',function(eventData){
- utils.sendData('http://localhost:8081/myForum/privilegesForm',{
- userName: $formUserName.val(),
- userRole: $formUserRole.val()
- },function(response){
- console.log(response);
- if(response.success == 'true'){
- //
- alert('Done!');
- }else{
- alert('Something went wrong');
- }
- });
- });
- }
- );
- })(i);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement