Fix sending profile form (#2389)

Credentials no longer suggested in the Search box in 'Sending Profiles'
pull/1894/merge
Mark Steward 2022-02-07 16:12:55 +00:00 committed by GitHub
parent a6627dfc6b
commit 1f95efcb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 27 deletions

View File

@ -307,7 +307,7 @@ $(document).ready(function () {
dismissSendTestEmailModal()
})
// Code to deal with custom email headers
$("#headersForm").on('submit', function () {
$("#addCustomHeader").on('click', function () {
headerKey = $("#headerKey").val();
headerValue = $("#headerValue").val();
@ -316,7 +316,8 @@ $(document).ready(function () {
}
addCustomHeader(headerKey, headerValue);
// Reset user input.
$("#headersForm>div>input").val('');
$("#headerKey").val('');
$("#headerValue").val('');
$("#headerKey").focus();
return false;
});

View File

@ -44,6 +44,7 @@
</div>
<div class="modal-body">
<div class="row" id="modal.flashes"></div>
<form>
<div class="form-group">
<label class="control-label" for="name">Name:</label>
<input type="text" class="form-control" placeholder="Profile name" id="name" autofocus />
@ -63,8 +64,9 @@
<label for="ignore_cert_errors">Ignore Certificate Errors <i class="fa fa-question-circle"
data-toggle="tooltip" data-placement="right" title="Ignore common certificate errors such as self-signed certs (exposes you to MiTM attacks - use carefully!)"></i></label>
</div>
<label class="control-label" for="headersForm">Email Headers:</label>
<form id="headersForm">
</div>
<fieldset class="form-group">
<label class="control-label input-group">Email Headers:</label>
<div class="col-md-4">
<input type="text" class="form-control" name="headerKey" id="headerKey" placeholder="X-Custom-Header">
</div>
@ -72,12 +74,10 @@
<input type="text" class="form-control" name="headerValue" id="headerValue" placeholder='{{"{{"}}.URL{{"}}"}}-gophish'>
</div>
<div class="col-md-2">
<button class="btn btn-danger btn-headers" type="submit"><i class="fa fa-plus"></i> Add
<button id="addCustomHeader" class="btn btn-danger btn-headers" type="button"><i class="fa fa-plus"></i> Add
Custom Header</button>
</div>
</form>
<br />
<br />
</fieldset>
<table id="headersTable" class="table table-hover table-striped table-condensed">
<thead>
<tr>
@ -91,7 +91,7 @@
</table>
<button type="button" data-toggle="modal" data-backdrop="static" data-target="#sendTestEmailModal"
class="btn btn-primary"><i class="fa fa-envelope"></i> Send Test Email</button>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-default" onclick="dismiss()">Cancel</button>