identity: Fix Expiry caveat input ux.
Remove clear date button from the date input.
Change-Id: I5b559c1b676fa560449154124f1432a8751fc8c4
diff --git a/services/identity/internal/templates/caveats.go b/services/identity/internal/templates/caveats.go
index 72caced..d5b8e3b 100644
--- a/services/identity/internal/templates/caveats.go
+++ b/services/identity/internal/templates/caveats.go
@@ -32,7 +32,7 @@
<main class="add-blessing">
<form method="POST" id="caveats-form" name="input"
- action="{{.MacaroonURL}}" role="form">
+ action="{{.MacaroonURL}}" role="form" novalidate>
<input type="text" class="hidden" name="macaroon" value="{{.Macaroon}}">
<h1 class="page-head">Add blessing</h1>
@@ -226,6 +226,8 @@
// Set the datetime picker to have a default value of one day from now.
$('.expiry').val(moment().add(1, 'd').format('YYYY-MM-DDTHH:mm'));
+ // Remove the clear button from the date input.
+ $('.expiry').attr('required', 'required');
// Activate the cancel button.
$('#cancel').click(function(){