Permalink
Browse files

fixed form switches

  • Loading branch information...
hunterlong committed Jan 4, 2019
1 parent 508dba7 commit 373c2d1d5b28c44606de543fb1a13dc8cee99379
@@ -19,6 +19,7 @@
<span class="switch float-left">
<input type="checkbox" name="public" class="switch" id="switch-group-public" checked>
<label for="switch-group-public">Show group services to the public</label>
<input type="hidden" name="public" id="switch-group-public-value" value="true">
</span>
</div>
</div>
@@ -55,8 +55,9 @@
<label for="notify_method" class="col-sm-4 col-form-label">Notify Users</label>
<div class="col-sm-8">
<span class="switch">
<input type="checkbox" name="notify_users" class="switch" id="switch-normal"{{if .NotifyUsers.Bool}} checked{{end}}>
<input type="checkbox" name="notify_users-value" class="switch" id="switch-normal"{{if .NotifyUsers.Bool}} checked{{end}}>
<label for="switch-normal">Notify Users Before Scheduled Time</label>
<input type="hidden" name="notify_users" id="switch-normal-value" value="{{if .NotifyUsers.Bool}}true{{else}}false{{end}}">
</span>
</div>
</div>
@@ -97,8 +97,19 @@
<label for="order" class="col-sm-4 col-form-label">Notifications</label>
<div class="col-8 mt-1">
<span class="switch float-left">
<input type="checkbox" name="allow_notifications" class="switch" id="switch-service" {{if eq .Id 0}}checked{{end}}{{if .AllowNotifications.Bool}}checked{{end}}>
<label for="switch-service">Allow notifications to be sent for this service</label>
<input type="checkbox" name="allow_notifications-option" class="switch" id="switch-notifications" {{if eq .Id 0}}checked{{end}}{{if .AllowNotifications.Bool}}checked{{end}}>
<label for="switch-notifications">Allow notifications to be sent for this service</label>
<input type="hidden" name="allow_notifications" id="switch-notifications-value" value="{{if .AllowNotifications.Bool}}true{{else}}false{{end}}">
</span>
</div>
</div>
<div class="form-group row">
<label for="order" class="col-sm-4 col-form-label">Visible</label>
<div class="col-8 mt-1">
<span class="switch float-left">
<input type="checkbox" name="public-option" class="switch" id="switch-public" {{if .Public.Bool}}checked{{end}}>
<label for="switch-public">Show service details to the public</label>
<input type="hidden" name="public" id="switch-public-value" value="{{if .Public.Bool}}true{{else}}false{{end}}">
</span>
</div>
</div>
@@ -114,15 +125,6 @@
<small class="form-text text-muted">Attach this service to a group</small>
</div>
</div>
<div class="form-group row">
<label for="order" class="col-sm-4 col-form-label">Visible</label>
<div class="col-8 mt-1">
<span class="switch float-left">
<input type="checkbox" name="public" class="switch" id="switch-public" {{if .Public.Bool}}checked{{end}}>
<label for="switch-public">Show service details to the public</label>
</span>
</div>
</div>
<div class="form-group row">
<div class="{{if ne .Id 0}}col-6{{else}}col-12{{end}}">
<button type="submit" class="btn btn-success btn-block">{{if ne .Id 0}}Update Service{{else}}Create Service{{end}}</button>
@@ -15,6 +15,7 @@
<span class="switch">
<input type="checkbox" name="admin" class="switch" id="switch-normal"{{if .Admin.Bool}} checked{{end}}>
<label for="switch-normal">Administrator</label>
<input type="hidden" name="admin" id="switch-normal-value" value="{{if .Admin.Bool}}true{{else}}false{{end}}">
</span>
</div>
</div>
@@ -2,6 +2,8 @@
{{define "description"}}{{$s := .Service}}{{if $s.Online }}{{.Service.Name}} is currently online and responding within {{$s.AvgTime}} milliseconds with {{$s.TotalUptime}}% total uptime on {{$s.Domain}}.{{else}}{{.Service.Name}} is currently offline on {{$s.Domain}}. Notify the admin to let them know their service is offline.{{end}}{{end}}
{{ define "content" }}
{{$s := .Service}}
{{$failures := $s.LimitedFailures 16}}
{{$checkinFailures := $s.LimitedCheckinFailures 16}}
{{$isAdmin := Auth}}
<div class="container col-md-7 col-sm-12 mt-md-5 bg-light">

@@ -25,7 +27,6 @@
{{end}}</h4>

<div class="row stats_area mt-5 mb-5">

<div class="col-4">
<span class="lg_number">{{$s.Online24}}%</span>
Online last 24 Hours
@@ -76,7 +77,6 @@
{{end}}

{{if IsUser}}
{{$failures := $s.LimitedFailures 16}}
<nav class="nav nav-pills flex-column flex-sm-row mt-3" id="service_tabs" role="serviceLists">
{{if $isAdmin}}<a class="flex-sm-fill text-sm-center nav-link active" id="edit-tab" data-toggle="tab" href="#edit" role="tab" aria-controls="edit" aria-selected="false">Edit Service</a>{{end}}
<a class="flex-sm-fill text-sm-center nav-link{{ if not $failures }} disabled{{end}}" id="failures-tab" data-toggle="tab" href="#failures" role="tab" aria-controls="failures" aria-selected="true">Failures</a>
@@ -142,10 +142,9 @@
{{if $isAdmin}}
{{template "form_checkin" $s}}
{{end}}
{{$failures := $s.LimitedCheckinFailures 16}}
{{ if $failures }}
{{ if $checkinFailures }}
<div class="list-group mt-3 mb-4">
{{ range $failures }}
{{ range $checkinFailures }}
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{.ParseError}}</h5>
@@ -176,6 +175,22 @@
</div>
{{end}}
</div>
{{else}}
{{if $s.Public.Bool }}
{{ if $failures }}
<div class="list-group mt-3 mb-4">
{{ range $failures }}
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{.ParseError}}</h5>
<small>{{.Ago}}</small>
</div>
<p class="mb-1">{{.Issue}}</p>
</a>
{{ end }}
</div>
{{ end }}
{{end}}
{{end}}
</div>
</div>
@@ -45,9 +45,10 @@
<label for="enable_cdn" class="d-inline d-sm-none">Enable CDN</label>
<label for="enable_cdn" class="d-none d-sm-block">Enable CDN</label>
<span class="switch">
<input type="checkbox" name="enable_cdn" class="switch" id="switch-normal" {{if USE_CDN}}checked{{end}}{{if .UsingAssets}} disabled{{end}}>
<input type="checkbox" name="enable_cdn-option" class="switch" id="switch-normal" {{if USE_CDN}}checked{{end}}{{if .UsingAssets}} disabled{{end}}>
<label for="switch-normal" class="mt-2 mt-sm-0"></label>
</span>
<input type="hidden" name="enable_cdn" id="switch-normal-value" value="{{if USE_CDN}}true{{else}}false{{end}}">
</div>
</div>

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1 +1 @@
0.80.34
0.80.35

0 comments on commit 373c2d1

Please sign in to comment.