Skip to content

Commit

Permalink
Fixes #461 - Update button on finding edit screen isn't working properly
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSeccubus committed Jun 28, 2017
1 parent af785c5 commit fab7058
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -157,6 +157,7 @@ Enhancements
Bug Fixes
---------
* #132 - We have CSRF protection now. Non-get requests should have content-type application/json.
* #461 - Update button on finding edit screen isn't working properly
* #474 - Some typo/style fixes by Jericho (attrition.org)
* #478 - Conralive should check if cron isn't ignored
* #480 - Editing/showing notifications broken
Expand Down
2 changes: 2 additions & 0 deletions jmvc/seccubus/finding/bulkedit/bulkedit.js
Expand Up @@ -78,6 +78,7 @@ $.Controller('Seccubus.Finding.Bulkedit',
* default event and calls bulkUpdate to perform a bulk update
*/
submit : function(el, ev) {
console.log("Submit");
ev.preventDefault();
var params = this.element.formParams();
this.bulkUpdate();
Expand Down Expand Up @@ -123,6 +124,7 @@ $.Controller('Seccubus.Finding.Bulkedit',
* This is the callback function for update on the list
*/
saved : function() {
console.log("Saved");
this.element.find('[type=submit]').val('Update');
this.element[0].reset();
// Update our view
Expand Down
14 changes: 7 additions & 7 deletions jmvc/seccubus/finding/table/views/finding.ejs
Expand Up @@ -16,16 +16,16 @@
<% if (columns[i] == "") { %>
<% if(columns[i+1] == "Action") { %>
<td>
<% if ( ! noEdit ) { %>
<% if ( typeof(noEdit) == "undefined" || ! noEdit ) { %>
<img class='editFinding' src='img/edit.png'><br>
<% } %>
<% if ( ! noLink ) { %>
<% if ( typeof(noLink) == "undefined" ||! noLink ) { %>
<img class='linkFinding' src='img/link.png'><br>
<% } %>
<% if ( ! noFindingUnlink ) { %>
<% if ( typeof(noFindingUnlink) == "undefined" || ! noFindingUnlink ) { %>
<img class='unlinkFinding' src='img/unlink.png'><br>
<% } %>
<% if ( ! noEdit ) { %>
<% if ( typeof(noEdit) == "undefined" || ! noEdit ) { %>
<% if (status == 99 ) { %>
<a href='javascript://' value='1' class='small changeState'><img src='img/new.png'></a><br>
<% } %>
Expand Down Expand Up @@ -87,10 +87,10 @@
<% for ( x = 0; x < issues.length ; x++ ) { %>
<li>
<div title='<%= issues[x].description %>'>
<% if ( ! noLink ) { %>
<img class='editIssue' issueId='<%= issues[x].id %>' src='img/edit.png'>
<% if ( typeof(noLink) == "undefined" ||! noLink ) { %>
<img class='editIssue' issueId='<%= issues[x].id %>' src='img/edit.png'>
<% } %>
<% if ( ! noIssueUnlink ) { %>
<% if ( ! noIssueUnlink ) { %>
<img class='unlinkIssue' issueId='<%= issues[x].id %>' src='img/unlink.png'>
<% } %>
<%= issues[x].name %>
Expand Down

0 comments on commit fab7058

Please sign in to comment.