1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Added tooltip to expiration when disabled

This commit is contained in:
Uncled1023 2019-01-29 23:47:40 -08:00
parent b231c1a023
commit d310e0135f
2 changed files with 17 additions and 9 deletions

View File

@ -46,7 +46,7 @@
</div> </div>
</div> </div>
<div class="col-sm-1 upload__help-icon"> <div class="col-sm-1 upload__help-icon">
<a href="@Url.SubRouteUrl("help", "Help.Upload")"><i class="fa fa-question-circle-o"></i></a> <a href="@Url.SubRouteUrl("help", "Help.Upload")" target="_blank"><i class="fa fa-question-circle-o"></i></a>
</div> </div>
</div> </div>
@ -61,12 +61,20 @@
</div> </div>
<div class="col-sm-5"> <div class="col-sm-5">
<div class="form-group form-group-sm"> <div class="form-group form-group-sm">
<label class="col-sm-2 control-label">Expiration</label> @if (!User.Identity.IsAuthenticated)
<fieldset @(User.Identity.IsAuthenticated ? "" : "disabled")> {
@:<label class="col-sm-3 control-label" data-toggle="tooltip" data-placement="top" title="You must be logged in to modify the expiration">Expiration*</label>
}
else
{
@:<label class="col-sm-3 control-label">Expiration</label>
}
<fieldset @if (!User.Identity.IsAuthenticated) { @: disabled
}>
<div class="col-sm-4 hidden" id="length-div"> <div class="col-sm-4 hidden" id="length-div">
<input type="number" min="1" step="1" class="form-control" name="expirelength" id="expirelength" value="@Model.ExpirationLength" )> <input type="number" min="1" step="1" class="form-control" name="expirelength" id="expirelength" value="@Model.ExpirationLength">
</div> </div>
<div class="col-sm-10" id="unit-div"> <div class="col-sm-9" id="unit-div">
<select class="form-control" name="expireunit" id="expireunit"> <select class="form-control" name="expireunit" id="expireunit">
@foreach (ExpirationUnit unit in Enum.GetValues(typeof(ExpirationUnit))) @foreach (ExpirationUnit unit in Enum.GetValues(typeof(ExpirationUnit)))
{ {

View File

@ -173,13 +173,13 @@ function linkAddToVault(element) {
function setExpireWidth(unit) { function setExpireWidth(unit) {
if (unit === "Never") { if (unit === "Never") {
$('#length-div').addClass("hidden"); $('#length-div').addClass("hidden");
$('#unit-div').removeClass("col-sm-8"); $('#unit-div').removeClass("col-sm-5");
$('#unit-div').addClass("col-sm-12"); $('#unit-div').addClass("col-sm-9");
} }
else { else {
$('#length-div').removeClass("hidden"); $('#length-div').removeClass("hidden");
$('#unit-div').removeClass("col-sm-12"); $('#unit-div').removeClass("col-sm-9");
$('#unit-div').addClass("col-sm-8"); $('#unit-div').addClass("col-sm-5");
} }
} }