-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1a1841
commit 0c9c13e
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
{% set current_year = currentYear() %} | ||
{% set text_class = text_class|default('text-gray-500') %} | ||
{% set company = company|default(labels.default) %} | ||
<i class="icon copyright {{ icon_class }}"></i> | ||
{% if hide_label != true %} | ||
<span class="text-gray-500">{{ labels.label }}</span> | ||
<span class="{{ text_class }}">{{ labels.label }}</span> | ||
{% endif %} | ||
<span class="text-gray-500"> | ||
<span class="{{ text_class }}"> | ||
{% if from_year is not empty and from_year < current_year %} | ||
{{ from_year }} - | ||
{% endif %} | ||
{{ current_year }} | ||
</span> | ||
<span class="ml-2">{{ company }}</span> | ||
<span class="ml-2 {{ text_class }}">{{ company }}</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% set label = label|default(name) %} | ||
{% set id = id|default(name) %} | ||
<div class="field {{ class }}"> | ||
{% if field_label is not empty %} | ||
<label>{{ field_label }}</label> | ||
{% endif %} | ||
<div class="ui checkbox checkbox-field {{ field_class }}"> | ||
<input type="checkbox" {{ value|ifthen(1,'checked') }} data-field-id="{{ id }}"> | ||
<input type="hidden" name="{{ name }}" value="{{ (value is empty) ? 0 : 1 }}" id="{{ id }}"> | ||
<label class="{{ label_class }}">{{ label }}</label> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
|
||
$(document).ready(function() { | ||
$('.checkbox-field').checkbox({ | ||
onChecked: function() { | ||
var fieldId = $(this).attr('data-field-id'); | ||
$('#' + fieldId).val(1); | ||
}, | ||
onUnchecked: function() { | ||
var fieldId = $(this).attr('data-field-id'); | ||
$('#' + fieldId).val(0); | ||
} | ||
}); | ||
}); |