mirror of https://github.com/gophish/gophish
173 lines
7.7 KiB
HTML
173 lines
7.7 KiB
HTML
{{define "body"}}
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-3 col-md-2 sidebar">
|
|
<ul class="nav nav-sidebar">
|
|
<li><a href="/">{{T "Dashboard"}}</a>
|
|
</li>
|
|
<li><a href="/campaigns">{{T "Campaigns"}}</a>
|
|
</li>
|
|
<li><a href="/users">{{T "Users & Groups"}}</a>
|
|
</li>
|
|
<li class="active"><a href="/templates">{{T "Email Templates"}}</a>
|
|
</li>
|
|
<li><a href="/landing_pages">{{T "Landing Pages"}}</a>
|
|
</li>
|
|
<li><a href="/sending_profiles">{{T "Sending Profiles"}}</a>
|
|
</li>
|
|
<li><a href="/settings">{{T "Settings"}}</a>
|
|
</li>
|
|
<li><hr></li>
|
|
<li><a href="https://gophish.gitbooks.io/user-guide/content/">{{T "User Guide"}}</a>
|
|
</li>
|
|
<li><a href="/api/">{{T "API Documentation"}}</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
|
<div class="row">
|
|
<h1 class="page-header">
|
|
{{T "Email Templates"}}
|
|
</h1>
|
|
</div>
|
|
<div id="flashes" class="row"></div>
|
|
<div class="row">
|
|
<button type="button" class="btn btn-primary" onclick="edit(-1)" data-toggle="modal" data-target="#modal"><i class="fa fa-plus"></i> {{T "New Template"}}</button>
|
|
</div>
|
|
|
|
<div id="loading">
|
|
<i class="fa fa-spinner fa-spin fa-4x"></i>
|
|
</div>
|
|
<div id="emptyMessage" class="row" style="display:none;">
|
|
<div class="alert alert-info">
|
|
{{T "No templates yet. Let's create one!"}}
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<table id="templateTable" class="table" style="display:none;">
|
|
<thead>
|
|
<tr>
|
|
<th>{{T "Name"}}</th>
|
|
<th>{{T "Modified Date"}}</th>
|
|
<th class="col-md-2 no-sort"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- Modal -->
|
|
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<!-- New Template Modal -->
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="dismiss()"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title" id="templateModalLabel">{{T "New Template"}}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row" id="modal.flashes"></div>
|
|
<label class="control-label" for="name">{{T "Name"}}:</label>
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" ng-model="template.name" placeholder="Template name" id="name" autofocus/>
|
|
</div>
|
|
<div class="form-group">
|
|
<button class="btn btn-danger" data-toggle="modal" data-target="#importEmailModal"><i class="fa fa-envelope"></i> {{T "Import Email"}}</button>
|
|
</div>
|
|
<label class="control-label" for="subject">{{T "Subject"}}:</label>
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" placeholder="{{T "Email Subject"}}" id="subject" />
|
|
</div>
|
|
<!-- Nav tabs -->
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
<li class="active" role="text"><a href="#text" aria-controls="text" role="tab" data-toggle="tab">{{T "Text"}}</a></li>
|
|
<li role="html"><a href="#html" aria-controls="html" role="tab" data-toggle="tab">{{T "HTML"}}</a></li>
|
|
</ul>
|
|
<!-- Tab panes -->
|
|
<div class="tab-content">
|
|
<div role="tabpanel" class="tab-pane active" id="text">
|
|
<textarea rows="10" id="text_editor" class="gophish-editor form-control" placeholder="{{T "Plaintext"}}"></textarea>
|
|
</div>
|
|
<div role="tabpanel" class="tab-pane" id="html">
|
|
<textarea id="html_editor"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="checkbox checkbox-primary">
|
|
<input id="use_tracker_checkbox" type="checkbox" checked>
|
|
<label for="use_tracker_checkbox">{{T "Add Tracking Image"}}</label>
|
|
</div>
|
|
<span class="btn btn-danger btn-file"><i class="fa fa-plus"></i> {{T "Add Files"}}
|
|
<input id="attachmentUpload" type="file" onchange="attach(this.files)" multiple>
|
|
</span>
|
|
<br />
|
|
<br />
|
|
<table id="attachmentsTable" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th class="col-md-1 no-sort"></th>
|
|
<th class="col-md-10">{{T "Name"}}</th>
|
|
<th class="col-md-1 no-sort"></th>
|
|
<th class="datatable_hidden no-sort">{{T "Content"}}</th>
|
|
<th class="datatable_hidden no-sort">{{T "Type"}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" data-dismiss="modal" class="btn btn-default" onclick="dismiss()">{{T "Cancel"}}</button>
|
|
<button type="button" class="btn btn-primary" id="modalSubmit">{{T "Save Template"}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Modal -->
|
|
<div class="modal fade" id="importEmailModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<!-- New Email Modal -->
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title" id="importEmailModalLabel">{{T "Import Email"}}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="row" id="modal.flashes"></div>
|
|
<label class="control-label" for="email">{{T "Email Content"}}:</label>
|
|
<div class="form-group">
|
|
<textarea rows="10" id="email_content" class="gophish-editor form-control" placeholder="{{T "Raw Email Source"}}"></textarea>
|
|
</div>
|
|
<div class="checkbox checkbox-primary">
|
|
<input id="convert_links_checkbox" type="checkbox" checked>
|
|
<label for="convert_links_checkbox">{{T "Change Links to Point to Landing Page"}}</label>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" data-dismiss="modal" class="btn btn-default">{{T "Cancel"}}</button>
|
|
<button type="button" class="btn btn-primary" id="modalSubmit" onclick="importEmail()">{{T "Import"}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{define "scripts"}}
|
|
<script>
|
|
localizedDatas = {
|
|
"Template edited successfully!": "{{T "Template edited successfully!"}}",
|
|
"Template added successfully!": "{{T "Template added successfully!"}}",
|
|
"Delete": "{{T "Delete"}}",
|
|
"No Content Specified!": "{{T "No Content Specified!"}}",
|
|
"Edit Template": "{{T "Edit Template"}}",
|
|
"Copy Template": "{{T "Copy Template"}}",
|
|
"Delete Template": "{{T "Delete Template"}}",
|
|
"Error fetching templates": "{{T "Error fetching templates"}}",
|
|
}
|
|
</script>
|
|
<script src="/js/src/vendor/ckeditor/ckeditor.js"></script>
|
|
<script src="/js/src/vendor/ckeditor/adapters/jquery.js"></script>
|
|
<script src="/js/dist/app/templates.min.js"></script>
|
|
{{end}}
|