Skip to content

Commit

Permalink
Event Labels xibosignage/xibo#1502
Browse files Browse the repository at this point in the history
  • Loading branch information
dasgarner committed May 25, 2018
1 parent f706f3d commit c2bceef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Widget/Calendar.php
Expand Up @@ -99,6 +99,7 @@ public function edit()
$this->setOption('uri', urlencode($this->getSanitizer()->getString('uri')));
$this->setOption('name', $this->getSanitizer()->getString('name'));
$this->setOption('customInterval', $this->getSanitizer()->getString('customInterval'));
$this->setOption('eventLabelNow', $this->getSanitizer()->getString('eventLabelNow'));

// Other options
$this->setOption('dateFormat', $this->getSanitizer()->getString('dateFormat'));
Expand Down
5 changes: 5 additions & 0 deletions modules/calendar-form-edit.twig
Expand Up @@ -103,6 +103,10 @@
{% set helpText %}{% trans "Enter a string representing the interval to get events for." %}{% endset %}
{{ forms.input("customInterval", title, module.getOption("customInterval"), helpText)}}

{% set title %}{% trans "Label Now" %}{% endset %}
{% set helpText %}{% trans "Should we label the current event? We will use the current Date/Time to work out if the event is current. This will be replaced in the [Label] template tag." %}{% endset %}
{{ forms.input("eventLabelNow", title, module.getOption("eventLabelNow"), helpText)}}

<div class="col-sm-6">
<div class="well">
<div class="text-center text-info">{% trans "Available Substitutions" %}</div>
Expand All @@ -113,6 +117,7 @@
<li class="ckeditor_snippits" linkedto="ta_text">Location</li>
<li class="ckeditor_snippits" linkedto="ta_text">StartDate</li>
<li class="ckeditor_snippits" linkedto="ta_text">EndDate</li>
<li class="ckeditor_snippits" linkedto="ta_text">Label</li>
</ul>
</div>
</div>
Expand Down

0 comments on commit c2bceef

Please sign in to comment.