gophish/static/js/app/partials/modals/templateModal.html

68 lines
3.3 KiB
HTML
Raw Normal View History

<!-- New Template Modal -->
<div class="modal-header">
<button type="button" class="close" ng-click="cancel()">&times;</button>
<h4 class="modal-title" ng-hide="newTemplate" id="groupModalLabel">Edit Template: {{template.name}}</h4>
<h4 class="modal-title" ng-show="newTemplate" id="groupModalLabel">New Template</h4>
</div>
<div class="modal-body">
<div class="row">
<div ng-repeat="flash in flashes.modal" style="text-align:center" class="alert alert-{{flash.type}}">
<i class="fa {{flash.icon}}"></i> {{flash.message}}
</div>
</div>
<label class="control-label" for="name">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 btn-disabled" ng-click="importEmail()"><i class="fa fa-envelope"></i> Import Email (Coming Soon!)</button>
</div>
<label class="control-label" for="subject">Subject:</label>
<div class="form-group">
<input type="text" class="form-control" ng-model="template.subject" placeholder="Email Subject" id="subject" />
</div>
<!-- Nav tabs -->
<tabset>
<tab heading="Text">
<textarea rows="10" class="form-control" ng-model="template.text" placeholder="Plaintext"></textarea>
</tab>
<tab heading="HTML">
<textarea ckeditor="editorOptions" ng-model="template.html"></textarea>
</tab>
</tabset>
<br />
<label class="control-label">Files:</label>
<table id="attachmentsTable" class="table">
<thead>
<tr>
<th></th>
<th>Name</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div ng-repeat="file in template.attachments" ng-model="template.attachments">
<i class="fa fa-file-excel-o" ng-show="file.type == 'application/vnd.ms-excel'"></i>
<i class="fa fa-file-text-o" ng-show="file.type == 'text/plain'"></i>
<i class="fa fa-file-image-o" ng-show="file.type == 'image/gif'"></i>
<i class="fa fa-file-pdf-o" ng-show="file.type == 'application/pdf'"></i>
<i class="fa fa-file-archive-o" ng-show="file.type == 'application/x-zip-compressed' || file.type == 'application/x-gzip'"></i>
<i class="fa fa-file-powerpoint-o" ng-show="file.type == 'application/vnd.openxmlformats-officedocument.presentationml.presentation'"></i>
<i class="fa fa-file-word-o" ng-show="file.type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'"></i>
<i class="fa fa-file-o" ng-show="file.type == 'application/octet-stream' || file.type == 'application/x-msdownload'"></i>
&nbsp;{{file.name}}
<span ng-click="removeFile(file)" class="remove-row"><i class="fa fa-trash-o"></i>
</span>
</div>
<br/>
<span class="btn btn-danger btn-file"><i class="fa fa-plus"></i> Add Files
<input type="file" onchange="attach(this.files)" multiple>
</span>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
<button type="button" class="btn btn-primary" ng-click="ok(template)" data-dismiss="modal">Save Template</button>
</div>