-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathapp.scala.html
93 lines (87 loc) · 4.56 KB
/
app.scala.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@this(webJarsUtil: org.webjars.play.WebJarsUtil)
@(implicit requestHeader: RequestHeader)
@import helper._
<!DOCTYPE html>
<html lang="en" ng-app="myApp">
<head>
<title>Salesforce Webhook Creator</title>
@webJarsUtil.locate("bootstrap.min.css").css()
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/main.css")">
<link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
@webJarsUtil.requireJs(routes.Assets.versioned("javascripts/app.js"))
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Salesforce Webhook Creator</a>
</div>
<a href="@routes.Application.logout" class="navbar-btn btn btn-default pull-right">Logout</a>
</div>
</div>
<div class="container" ng-cloak>
<div ng-controller="WebhooksController" ng-init="csrfToken='@CSRF.getToken.value'">
<h2>Your Webhooks</h2>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>SObject</th>
<th>Events</th>
<th>URL</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="webhook in webhooks">
<td>{{webhook.name}}</td>
<td>{{webhook.sobject}}</td>
<td>{{webhook.events.join(", ")}}</td>
<td>{{webhook.url}}</td>
</tr>
</tbody>
</table>
<h2>Create a new Webhook</h2>
<form name="webhookForm" role="form" class="form-horizontal" ng-submit="createWebhook()">
<fieldset name="fields" ng-disabled="working">
<div class="form-group">
<label for="name" class="col-sm-3 control-label">Name</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="name" name="name" ng-model="name" ng-pattern="/[a-zA-Z]/" required>
</div>
</div>
<div class="form-group">
<label for="sobject" class="col-sm-3 control-label">SObject</label>
<div class="col-sm-6">
<select id="sobject" name="sobject" class="form-control" ng-model="sobject" required>
<option ng-repeat="sobject in sobjects">{{sobject}}</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Events</label>
<div class="col-sm-6">
<label ng-repeat="event in ['before insert','before update','before delete','after insert','after update','after delete','after undelete']" for="{{event}}" class="checkbox-inline">
<input type="checkbox" ng-model="events[event]" id="{{event}}" name="{{event}}" value="{{event}}"> {{event}}
</label>
</div>
</div>
<div class="form-group">
<label for="url" class="col-sm-3 control-label">URL</label>
<div class="col-sm-6">
<input type="url" class="form-control" id="url" name="url" ng-model="url" required>
</div>
</div>
<div class="form-group" style="margin-right: 5px;">
<div class="col-sm-offset-1 col-sm-8 bg-danger" ng-show="errorMessage">{{errorMessage}}</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<button type="submit" class="btn btn-default">Create Webhook</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</body>
</html>