Reports To | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Owns Team ? | diff --git a/omod/src/main/webapp/roleEditForm.jsp b/omod/src/main/webapp/roleEditForm.jsp index 7b7e00f..96da522 100644 --- a/omod/src/main/webapp/roleEditForm.jsp +++ b/omod/src/main/webapp/roleEditForm.jsp @@ -17,19 +17,22 @@ jQuery(document).ready(function() { jQuery("#ownsTeam").attr('checked', false); + console.log("edit") }); function validation() { document.getElementById("saveButton").disabled = true; var name = roleName.value; - var reportsTo = document.getElementById("reportsTo"); - var selectedValue = reportsTo.options[reportsTo.selectedIndex].value; + var reportsTo = document.getElementById("reportsTo").value; + + console.log("name: "+name); + console.log("reportsTo: "+reportsTo); var mustSelectMessage = ""; if (name == null || name == "") { mustSelectMessage += "Role name can't be empty."; alertify.alert(mustSelectMessage); document.getElementById("saveButton").disabled = false; } - if (selectedValue == 0) { + if (reportsTo == 0) { mustSelectMessage += "Must Select Report To Field"; alertify.alert(mustSelectMessage); document.getElementById("saveButton").disabled = false; @@ -42,7 +45,9 @@ contentType : "application/json;charset=UTF-8", dataType : "json", success : function(data, status) { - document.getElementById("saveRole").submit(); + console.log(data) + console.log(status) + document.getElementById("saveRole").submit(); } }); } @@ -51,6 +56,9 @@
Reports To | -
+ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Owns Team ? | diff --git a/omod/src/main/webapp/team.jsp b/omod/src/main/webapp/team.jsp index eb9b7da..479a323 100644 --- a/omod/src/main/webapp/team.jsp +++ b/omod/src/main/webapp/team.jsp @@ -41,16 +41,16 @@ GenerateTable(); $('#general').DataTable({ "language": { - "search": "_INPUT_", - "searchPlaceholder": "Search..." - }, - "paging" : true, - "lengthChange" : false, - "searching" : true, - "ordering" : true, - "info" : false, - "autoWidth" : true, - "sDom" : 'lfrtip', + "search": "_INPUT_", + "searchPlaceholder": "Search..." + }, + "paging" : true, + "lengthChange" : false, + "searching" : true, + "ordering" : true, + "info" : false, + "autoWidth" : true, + "sDom" : 'lfrtip', }); }); }); diff --git a/omod/src/main/webapp/teamAddForm.jsp b/omod/src/main/webapp/teamAddForm.jsp index 1fe4fcc..5cb4ab9 100644 --- a/omod/src/main/webapp/teamAddForm.jsp +++ b/omod/src/main/webapp/teamAddForm.jsp @@ -16,22 +16,12 @@ +
Retire Team ? | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | Reason - must be written | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Retire Reason | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
diff --git a/omod/src/main/webapp/teamEditForm.jsp b/omod/src/main/webapp/teamEditForm.jsp index 32e9971..d016249 100644 --- a/omod/src/main/webapp/teamEditForm.jsp +++ b/omod/src/main/webapp/teamEditForm.jsp @@ -31,6 +31,7 @@ }); function validation() { document.getElementById("saveButton").disabled = true; + document.getElementById("teamName").disabled = true; var regexp = /^[a-z/i][a-z\- ]*[a-z/i\-|0-9]{2,}$/i; var idRegExp = /^[a-z|0-9]+[a-z.\-_]*[a-z|0-9]{2,}$/i; var name = teamName.value; @@ -64,18 +65,16 @@ alertify.alert(dataTypeMessage); document.getElementById("saveButton").disabled = false; }else{jQuery.ajax({ - url:"/openmrs/ws/rest/v1/team/team?teamName="+name+"&locationId="+selectedValue+"&v=full", + url:"/openmrs/ws/rest/v1/team/team?identifier="+id+"&teamName="+name+"&locationId="+selectedValue+"&v=full", type:"GET", contentType:"application/json;charset=UTF-8", dataType:"json", success: function(data,status){ - alert(status) - if(status==200) - { - document.getElementById("saveTeam").submit(); - } + //document.getElementById("saveTeam").submit(); + document.getElementById("savedId").innerHTML = "Team Updated Successfully"; + document.getElementById("saveButton").disabled = false; } - }); + }); } @@ -83,10 +82,10 @@ - |
Team Name | Must start with alphabet.Min 3 and - max 20.Alphanumeric text,- is allowed | +|
Team Identifier | ||
Retire Team ? | diff --git a/omod/src/main/webapp/teamMemberAddForm.jsp b/omod/src/main/webapp/teamMemberAddForm.jsp index 9e5c914..bf5d90d 100644 --- a/omod/src/main/webapp/teamMemberAddForm.jsp +++ b/omod/src/main/webapp/teamMemberAddForm.jsp @@ -432,15 +432,8 @@ Choose Existing Person+ | |
@@ -452,6 +445,7 @@ |
+ ||
@@ -476,6 +470,7 @@ * Min 3 and max 20.Alphabets,[-.] are allowed | +||
@@ -486,6 +481,7 @@ * Min 3 and max 20.Alphabets,[-.] are allowed | +||
@@ -500,6 +496,7 @@ Date shouldn't be in future | +||
@@ -513,11 +510,14 @@ * | +||
Add Login Detail | ++ | |
@@ -526,6 +526,7 @@ | + | |
@@ -561,6 +562,7 @@ | +||
@@ -571,6 +573,7 @@ * Min 3 and max 20.All data types and [-_] are allowed | +||
@@ -585,6 +588,7 @@ * | +||
@@ -599,6 +603,7 @@ * | +||
@@ -608,6 +613,7 @@
|
+ ||
@@ -617,6 +623,7 @@
|
+ ||
@@ -625,6 +632,7 @@ |
|
+ |
@@ -633,6 +641,7 @@ |
|
+ |
@@ -641,12 +650,16 @@ Add + | ||
- Back to Team List + Back to Team Member List | ++ |
Identifier: | "+team.teamIdentifier+" |
Name: | "+team.teamName+" |
Supervisor: | "+team.supervisor+" |
Voided: | "+team.voided+" |
Location: | "+team.location.display+" |
Members: | "+team.members+" |
Identifier: | "+team.teamIdentifier+" |
Name: | "+team.teamName+" |
Supervisor: | "+team.supervisor+" |
Voided: | "+team.voided+" |
Location: | "+team.location.display+" |
Members: | "+team.members+" |
Team Member Role Updated Successfully
"; - $('#editTeamMemberRoleDiv').dialog('close'); - } - } - }, error: function(jqXHR, textStatus, errorThrown) { console.log("ERROR-EDIT TEAM MEMBER ROLE"); console.log(jqXHR); document.getElementById("saveHead").innerHTML = ""; document.getElementById("errorHead").innerHTML = "Error Occured While Updating Team Member Role
"; } - }); */ - } - else if(type==="memberRoleInfo") { + if(type==="memberRoleInfo") { var uuid = members[index].uuid; var role = document.getElementById("teamMemberRole"+index).value; var url = "/openmrs/ws/rest/v1/team/teammember/"+uuid+"/role"; @@ -326,16 +312,7 @@ html += ""; } html += "