This commit is contained in:
Markos Gogoulos
2026-02-03 19:23:02 +02:00
parent c4d569e7b0
commit e12f361935
89 changed files with 8689 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/embed_media_audio
Embed media audio template.
Example context (json):
{
}
}}
&nbsp;<audio{{!
}}{{#showControls}} controls="true" {{/showControls}}{{!
}}{{#loop}} loop="true"{{/loop}}{{!
}}{{#muted}} muted="true"{{/muted}}{{!
}}{{#autoplay}} autoplay="true"{{/autoplay}}{{!
}}{{#title}} title="{{.}}"{{/title}}{{!
}}>
{{#sources}}<source src="{{.}}"/>{{/sources}}
{{#tracks}}
<track src="{{track}}" kind="{{kind}}" srclang="{{srclang}}" label="{{label}}"{{!
}}{{#defaultTrack}} default="true"{{/defaultTrack}}{{!
}}>
{{/tracks}}
{{#description}}{{.}}{{/description}}
</audio>&nbsp;

View File

@@ -0,0 +1,33 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/embed_media_link
Embed media link template.
Example context (json):
{
}
}}
<a href="{{url}}"{{!
}}{{#width}} data-width="{{.}}"{{/width}}{{!
}}{{#height}} data-height="{{.}}"{{/height}}{{!
}}>{{!
}}{{#name}}{{.}}{{/name}}{{!
}}{{^name}}{{url}}{{/name}}{{!
}}</a>

View File

@@ -0,0 +1,78 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/embed_media_modal
Embed media modal template.
Example context (json):
{
}
}}
{{< core/modal }}
{{$title}}
{{#str}} modaltitle, tiny_h5p {{/str}}
{{/title}}
{{$body}}
<form class="tiny_mediacms_form" id="{{elementid}}_tiny_mediacms_form">
<ul class="root nav nav-tabs mb-1" role="tablist">
<li data-medium-type="link" class="nav-item">
<a class="nav-link {{# link }}active{{/ link }}" href="#{{elementid}}_link" role="tab" data-toggle="tab">
{{#str}} link, tiny_mediacms {{/str}}
</a>
</li>
<li data-medium-type="video" class="nav-item">
<a class="nav-link {{# video }}active{{/ video }}" href="#{{elementid}}_video" role="tab" data-toggle="tab">
{{#str}} video, tiny_mediacms {{/str}}
</a>
</li>
<li data-medium-type="audio" class="nav-item">
<a class="nav-link {{# audio }}active{{/ audio }}" href="#{{elementid}}_audio" role="tab" data-toggle="tab">
{{#str}} audio, tiny_mediacms {{/str}}
</a>
</li>
</ul>
<div class="root tab-content">
<div data-medium-type="link" class="tab-pane {{# link }}active{{/ link }}" id="{{elementid}}_link">
{{> tiny_mediacms/embed_media_modal_link }}
</div>
<div data-medium-type="video" class="tab-pane {{# video }}active{{/ video }}" id="{{elementid}}_video">
{{> tiny_mediacms/embed_media_modal_video}}
</div>
<div data-medium-type="audio" class="tab-pane {{# audio }}active{{/ audio }}" id="{{elementid}}_audio">
{{> tiny_mediacms/embed_media_modal_audio}}
</div>
</div>
</form>
{{/body}}
{{$footer}}
<button type="button" class="btn btn-primary" data-action="save">
{{#isupdating}}
{{#str}} updatemedia, tiny_mediacms {{/str}}
{{/isupdating}}
{{^isupdating}}
{{#str}} createmedia, tiny_mediacms {{/str}}
{{/isupdating}}
</button>
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
{{/footer}}
{{/ core/modal }}

View File

@@ -0,0 +1,802 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/embed_media_modal_audio
Embed media audio modal template.
Example context (json):
{
}
}}
{{#audio.sources}}
<div class="tiny_mediacms_source tiny_mediacms_media_source">
<div class="mb-1">
<label for="audio-audio-url-input">
{{#str}} audiosourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="audio-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{.}}"/>
{{#showfilepicker}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepicker}}
</div>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsource, tiny_mediacms {{/str}}
</a>
{{#addsourcehelpicon}}
{{> core/help_icon }}
{{/addsourcehelpicon}}
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.sources}}
{{^audio}}
<div class="tiny_mediacms_source tiny_mediacms_media_source">
<div class="mb-1">
<label for="audio-audio-url-input">
{{#str}} audiosourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="audio-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepicker}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepicker}}
</div>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsource, tiny_mediacms {{/str}}
</a>
{{#addsourcehelpicon}}
{{> core/help_icon }}
{{/addsourcehelpicon}}
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio}}
<fieldset class="collapsible collapsed" id="{{elementid}}_audio-display-options">
<input name="mform_isexpanded_{{elementid}}_audio-display-options" type="hidden">
<legend class="d-flex align-items-center px-1">
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
<a role="button" data-toggle="collapse" href="#adisplayoptions" aria-expanded="false"
aria-controls="adisplayoptions"
class="btn btn-icon me-3 icons-collapse-expand stretched-link fheader collapsed">
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
</span>
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
<span class="dir-rtl-hide">
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
</span>
<span class="dir-ltr-hide">
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
</span>
</span>
<span class="sr-only">{{#str}} displayoptions, tiny_mediacms {{/str}}</span>
</a>
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
{{#str}} displayoptions, tiny_mediacms {{/str}}
</h3>
</div>
</legend>
<div id="adisplayoptions" class="fcontainer collapseable collapse px-1">
<div class="tiny_mediacms_display_options">
<div class="mb-1">
<label for="adisplayoptions_media-title-entry">{{#str}} entertitle, tiny_mediacms {{/str}}</label>
<input class="form-control fullwidth tiny_mediacms_title_entry" type="text" id="adisplayoptions_media-title-entry"
size="32" value="{{audio.title}}"/>
</div>
</div>
</div>
</fieldset>
<fieldset class="collapsible collapsed" id="{{elementid}}_audio-advanced-settings">
<input name="mform_isexpanded_{{elementid}}_audio-advanced-settings" type="hidden">
<legend class="d-flex align-items-center px-1">
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
<a role="button" data-toggle="collapse" href="#aadvancedsettings" aria-expanded="false"
aria-controls="aadvancedsettings"
class="btn btn-icon me-3 icons-collapse-expand stretched-link fheader collapsed">
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
</span>
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
<span class="dir-rtl-hide">
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
</span>
<span class="dir-ltr-hide">
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
</span>
</span>
<span class="sr-only">{{#str}} advancedsettings, tiny_mediacms {{/str}}</span>
</a>
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
{{#str}} advancedsettings, tiny_mediacms {{/str}}
</h3>
</div>
</legend>
<div id="aadvancedsettings" class="fcontainer collapseable collapse px-1">
<div class="tiny_mediacms_advancedsettings">
<div class="form-check">
<input type="checkbox" checked="true" class="form-check-input tiny_mediacms_controls"
id="aadvancedsettings_media-controls-toggle" {{# audio.controls }}checked{{/ audio.controls }}/>
<label class="form-check-label" for="aadvancedsettings_media-controls-toggle">
{{#str}} controls, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_autoplay"
id="aadvancedsettings_media-autoplay-toggle" {{# audio.autoplay }}checked{{/ audio.autoplay }}/>
<label class="form-check-label" for="aadvancedsettings_media-autoplay-toggle">
{{#str}} autoplay, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_mute"
id="aadvancedsettings_media-mute-toggle" {{# audio.muted }}checked{{/ audio.muted }}/>
<label class="form-check-label" for="aadvancedsettings_media-mute-toggle">
{{#str}} mute, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_loop"
id="aadvancedsettings_media-loop-toggle" {{# audio.loop }}checked{{/ audio.loop }}/>
<label class="form-check-label" for="aadvancedsettings_media-loop-toggle">
{{#str}} loop, tiny_mediacms {{/str}}
</label>
</div>
</div>
</div>
</fieldset>
<fieldset class="collapsible collapsed" id="{{elementid}}_audio-tracks">
<input name="mform_isexpanded_{{elementid}}_audio-tracks" type="hidden">
<legend class="d-flex align-items-center px-1">
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
<a role="button" data-toggle="collapse" href="#atracks" aria-expanded="false"
aria-controls="atracks"
class="btn btn-icon me-3 icons-collapse-expand stretched-link fheader collapsed">
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
</span>
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
<span class="dir-rtl-hide">
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
</span>
<span class="dir-ltr-hide">
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
</span>
</span>
<span class="sr-only">{{#str}} tracks, tiny_mediacms {{/str}}</span>
</a>
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
{{#str}} tracks, tiny_mediacms {{/str}}
</h3>
</div>
{{#trackshelpicon}}
{{> core/help_icon }}
{{/trackshelpicon}}
</legend>
<div id="atracks" class="fcontainer collapseable collapse px-1">
<ul class="nav nav-tabs mb-3">
<li data-track-kind="subtitles" class="nav-item">
<a class="nav-link active" href="#{{elementid}}_atracks_subtitles"
role="tab" data-toggle="tab">
{{#str}} subtitles, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="captions" class="nav-item">
<a class="nav-link" href="#{{elementid}}_atracks_captions" role="tab" data-toggle="tab">
{{#str}} captions, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="descriptions" class="nav-item">
<a class="nav-link" href="#{{elementid}}_atracks_descriptions"
role="tab" data-toggle="tab">
{{#str}} descriptions, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="chapters" class="nav-item">
<a class="nav-link" href="#{{elementid}}_atracks_chapters" role="tab" data-toggle="tab">
{{#str}} chapters, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="metadata" class="nav-item">
<a class="nav-link" href="#{{elementid}}_atracks_metadata" role="tab" data-toggle="tab">
{{#str}} metadata, tiny_mediacms {{/str}}
</a>
</li>
</ul>
<div class="tab-content">
<div data-track-kind="subtitles" class="tab-pane active"
id="{{elementid}}_atracks_subtitles">
<div class="trackhelp">
{{#subtitleshelpicon}}
{{> core/help_icon }}
{{/subtitleshelpicon}}
</div>
{{#audio.tracks.subtitles}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="subtitle-audio-url-input">
{{#str}} subtitlessourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="subtitle-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="subtitle-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="subtitle-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsubtitlestrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.subtitles}}
{{^audio.tracks.subtitles}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="subtitle-audio-url-input">
{{#str}} subtitlessourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="subtitle-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="subtitle-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="subtitle-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsubtitlestrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.subtitles}}
</div>
<div data-track-kind="captions" class="tab-pane"
id="{{elementid}}_atracks_captions">
<div class="trackhelp">
{{#captionshelpicon}}
{{> core/help_icon }}
{{/captionshelpicon}}
</div>
{{#audio.tracks.captions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="caption-audio-url-input">
{{#str}} captionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="caption-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="caption-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="caption-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="caption-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="caption-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addcaptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.captions}}
{{^audio.tracks.captions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="caption-audio-url-input">
{{#str}} captionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="caption-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="caption-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="caption-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="caption-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="caption-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addcaptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.captions}}
</div>
<div data-track-kind="descriptions" class="tab-pane"
id="{{elementid}}_atracks_descriptions">
<div class="trackhelp">
{{#descriptionshelpicon}}
{{> core/help_icon }}
{{/descriptionshelpicon}}
</div>
{{#audio.tracks.descriptions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="description-audio-url-input">
{{#str}} descriptionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="description-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="description-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="description-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="description-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="description-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} adddescriptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.descriptions}}
{{^audio.tracks.descriptions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="description-audio-url-input">
{{#str}} descriptionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="description-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="description-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="description-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="description-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="description-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} adddescriptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.descriptions}}
</div>
<div data-track-kind="chapters" class="tab-pane"
id="{{elementid}}_atracks_chapters">
<div class="trackhelp">
{{#chaptershelpicon}}
{{> core/help_icon }}
{{/chaptershelpicon}}
</div>
{{#audio.tracks.chapters}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="chapter-audio-url-input">
{{#str}} chapterssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="chapter-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="chapter-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="chapter-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addchapterstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.chapters}}
{{^audio.tracks.chapters}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="chapter-audio-url-input">
{{#str}} chapterssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="chapter-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="chapter-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="chapter-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addchapterstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.chapters}}
</div>
<div data-track-kind="metadata" class="tab-pane"
id="{{elementid}}_atracks_metadata">
<div class="trackhelp">{{{helpStrings.metadata}}}</div>
<div class="trackhelp">
{{#metadatahelpicon}}
{{> core/help_icon }}
{{/metadatahelpicon}}
</div>
{{#audio.tracks.metadata}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="metadata-audio-url-input">
{{#str}} metadatasourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="metadata-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="metadata-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="metadata-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addmetadatatrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.metadata}}
{{^audio.tracks.metadata}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="metadata-audio-url-input">
{{#str}} metadatasourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="metadata-audio-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-audio-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="metadata-audio-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-audio-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="metadata-audio-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addmetadatatrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/audio.tracks.metadata}}
</div>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,43 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/embed_media_modal_link
Embed media link modal template.
Example context (json):
{
}
}}
<div class="tiny_mediacms_source {{id}}">
<div class="mb-1">
<label for="source-url-input">
{{#str}} entersource, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="source-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepicker}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepicker}}
</div>
</div>
</div>
<label for="{{elementid}}_link_nameentry">{{#str}} entername, tiny_mediacms {{/str}}</label>
<input class="form-control fullwidth tiny_mediacms_name_entry" type="text" id="{{elementid}}_link_nameentry" size="32" required="true"/>

View File

@@ -0,0 +1,832 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/embed_media_modal_video
Embed media video modal template.
Example context (json):
{
}
}}
{{#video.sources}}
<div class="tiny_mediacms_source tiny_mediacms_media_source">
<div class="mb-1">
<label for="video-video-url-input">
{{#str}} videosourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="video-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{.}}"/>
{{#showfilepicker}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepicker}}
</div>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsource, tiny_mediacms {{/str}}
</a>
{{#addsourcehelpicon}}
{{> core/help_icon }}
{{/addsourcehelpicon}}
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.sources}}
{{^video}}
<div class="tiny_mediacms_source tiny_mediacms_media_source">
<div class="mb-1">
<label for="video-video-url-input">
{{#str}} videosourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="video-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepicker}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepicker}}
</div>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsource, tiny_mediacms {{/str}}
</a>
{{#addsourcehelpicon}}
{{> core/help_icon }}
{{/addsourcehelpicon}}
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video}}
<fieldset class="collapsible collapsed" id="{{elementid}}_video-display-options">
<input name="mform_isexpanded_{{elementid}}_video-display-options" type="hidden">
<legend class="d-flex align-items-center px-1">
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
<a role="button" data-toggle="collapse" href="#vdisplayoptions" aria-expanded="false"
aria-controls="vdisplayoptions"
class="btn btn-icon me-3 icons-collapse-expand stretched-link fheader collapsed">
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
</span>
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
<span class="dir-rtl-hide">
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
</span>
<span class="dir-ltr-hide">
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
</span>
</span>
<span class="sr-only">{{#str}} displayoptions, tiny_mediacms {{/str}}</span>
</a>
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
{{#str}} displayoptions, tiny_mediacms {{/str}}
</h3>
</div>
</legend>
<div id="vdisplayoptions" class="fcontainer collapseable collapse px-1">
<div class="tiny_mediacms_display_options">
<div class="mb-1">
<label for="vdisplayoptions_media-title-entry">{{#str}} entertitle, tiny_mediacms {{/str}}</label>
<input class="form-control fullwidth tiny_mediacms_title_entry" type="text" id="vdisplayoptions_media-title-entry"
size="32" value="{{video.title}}"/>
</div>
<div class="clearfix"></div>
<div class="mb-1">
<label>{{#str}} size, tiny_mediacms {{/str}}</label>
<div class="d-flex flex-wrap align-items-center tiny_mediacms_poster_size">
<label for="vdisplayoptions_media-width-entry" class="accesshide">{{#str}} videowidth, tiny_mediacms {{/str}}</label>
<input id="vdisplayoptions_media-width-entry" type="text" class="form-control w-auto me-1 tiny_mediacms_width_entry input-mini"
size="4" value="{{video.width}}"/>
x
<label for="vdisplayoptions_media-height-entry" class="accesshide">{{#str}} videoheight, tiny_mediacms {{/str}}</label>
<input id="vdisplayoptions_media-height-entry" type="text" class="form-control w-auto ms-1 tiny_mediacms_height_entry input-mini"
size="4" value="{{video.height}}"/>
</div>
</div>
<div class="clearfix"></div>
<div class="tiny_mediacms_source tiny_mediacms_poster_source">
<div class="mb-1">
<label for="display-video-url-input">
{{#str}} entersource, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="display-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{video.poster}}"/>
{{#showfilepickerposter}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickerposter}}
</div>
</div>
</div>
</div>
</div>
</fieldset>
<fieldset class="collapsible collapsed" id="{{elementid}}_video-advanced-settings">
<input name="mform_isexpanded_{{elementid}}_video-advanced-settings" type="hidden">
{{renderPartial "form_components.section" context=this id="vadvancedsettings" name="advancedsettings"}}
<legend class="d-flex align-items-center px-1">
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
<a role="button" data-toggle="collapse" href="#vadvancedsettings" aria-expanded="false"
aria-controls="vadvancedsettings"
class="btn btn-icon me-3 icons-collapse-expand stretched-link fheader collapsed">
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
</span>
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
<span class="dir-rtl-hide">
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
</span>
<span class="dir-ltr-hide">
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
</span>
</span>
<span class="sr-only">{{#str}} advancedsettings, tiny_mediacms {{/str}}</span>
</a>
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
{{#str}} advancedsettings, tiny_mediacms {{/str}}
</h3>
</div>
</legend>
<div id="vadvancedsettings" class="fcontainer collapseable collapse px-1">
<div class="tiny_mediacms_advancedsettings">
<div class="form-check">
<input type="checkbox" checked="true" class="form-check-input tiny_mediacms_controls"
id="vadvancedsettings_media-controls-toggle" {{# video.controls }}checked{{/ video.controls }}/>
<label class="form-check-label" for="vadvancedsettings_media-controls-toggle">
{{#str}} controls, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_autoplay"
id="vadvancedsettings_media-autoplay-toggle" {{# video.autoplay }}checked{{/ video.autoplay }}/>
<label class="form-check-label" for="vadvancedsettings_media-autoplay-toggle">
{{#str}} autoplay, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_mute"
id="vadvancedsettings_media-mute-toggle" {{# video.muted }}checked{{/ video.muted }}/>
<label class="form-check-label" for="vadvancedsettings_media-mute-toggle">
{{#str}} mute, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_loop"
id="vadvancedsettings_media-loop-toggle" {{# video.loop }}checked{{/ video.loop }}/>
<label class="form-check-label" for="vadvancedsettings_media-loop-toggle">
{{#str}} loop, tiny_mediacms {{/str}}
</label>
</div>
</div>
</div>
</fieldset>
<fieldset class="collapsible collapsed" id="{{elementid}}_video-tracks">
<input name="mform_isexpanded_{{elementid}}_video-tracks" type="hidden">
<legend class="d-flex align-items-center px-1">
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
<a role="button" data-toggle="collapse" href="#vtracks" aria-expanded="false"
aria-controls="vtracks"
class="btn btn-icon me-3 icons-collapse-expand stretched-link fheader collapsed">
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
</span>
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
<span class="dir-rtl-hide">
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
</span>
<span class="dir-ltr-hide">
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
</span>
</span>
<span class="sr-only">{{#str}} tracks, tiny_mediacms {{/str}}</span>
</a>
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
{{#str}} tracks, tiny_mediacms {{/str}}
</h3>
</div>
{{#trackshelpicon}}
{{> core/help_icon }}
{{/trackshelpicon}}
</legend>
<div id="vtracks" class="fcontainer collapseable collapse px-1">
<ul class="nav nav-tabs mb-3">
<li data-track-kind="subtitles" class="nav-item">
<a class="nav-link active" href="#{{elementid}}_vtracks_subtitles"
role="tab" data-toggle="tab">
{{#str}} subtitles, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="captions" class="nav-item">
<a class="nav-link" href="#{{elementid}}_vtracks_captions" role="tab" data-toggle="tab">
{{#str}} captions, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="descriptions" class="nav-item">
<a class="nav-link" href="#{{elementid}}_vtracks_descriptions"
role="tab" data-toggle="tab">
{{#str}} descriptions, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="chapters" class="nav-item">
<a class="nav-link" href="#{{elementid}}_vtracks_chapters" role="tab" data-toggle="tab">
{{#str}} chapters, tiny_mediacms {{/str}}
</a>
</li>
<li data-track-kind="metadata" class="nav-item">
<a class="nav-link" href="#{{elementid}}_vtracks_metadata" role="tab" data-toggle="tab">
{{#str}} metadata, tiny_mediacms {{/str}}
</a>
</li>
</ul>
<div class="tab-content">
<div data-track-kind="subtitles" class="tab-pane active"
id="{{elementid}}_vtracks_subtitles">
<div class="trackhelp">
{{#subtitleshelpicon}}
{{> core/help_icon }}
{{/subtitleshelpicon}}
</div>
{{#video.tracks.subtitles}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="subtitle-video-url-input">
{{#str}} subtitlessourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="subtitle-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="subtitle-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="subtitle-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsubtitlestrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.subtitles}}
{{^video.tracks.subtitles}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="subtitle-video-url-input">
{{#str}} subtitlessourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="subtitle-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="subtitle-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="subtitle-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="subtitle-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addsubtitlestrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.subtitles}}
</div>
<div data-track-kind="captions" class="tab-pane"
id="{{elementid}}_vtracks_captions">
<div class="trackhelp">
{{#captionshelpicon}}
{{> core/help_icon }}
{{/captionshelpicon}}
</div>
{{#video.tracks.captions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="caption-video-url-input">
{{#str}} captionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="caption-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="caption-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="caption-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addcaptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.captions}}
{{^video.tracks.captions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="caption-video-url-input">
{{#str}} captionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="caption-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="caption-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="caption-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addcaptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.captions}}
</div>
<div data-track-kind="descriptions" class="tab-pane"
id="{{elementid}}_vtracks_descriptions">
<div class="trackhelp">
{{#descriptionshelpicon}}
{{> core/help_icon }}
{{/descriptionshelpicon}}
</div>
{{#video.tracks.descriptions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="description-video-url-input">
{{#str}} descriptionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="description-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="description-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="description-video-ang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="description-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="description-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} adddescriptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.descriptions}}
{{^video.tracks.descriptions}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="description-video-url-input">
{{#str}} descriptionssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="description-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="description-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="description-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="description-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="description-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} adddescriptionstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.descriptions}}
</div>
<div data-track-kind="chapters" class="tab-pane"
id="{{elementid}}_vtracks_chapters">
<div class="trackhelp">
{{#chaptershelpicon}}
{{> core/help_icon }}
{{/chaptershelpicon}}
</div>
{{#video.tracks.chapters}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="chapter-video-url-input">
{{#str}} chapterssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="chapter-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="chapter-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="chapter-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addchapterstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.chapters}}
{{^video.tracks.chapters}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="chapter-video-url-input">
{{#str}} chapterssourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="chapter-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="chapter-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="chapter-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="chapter-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addchapterstrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.chapters}}
</div>
<div data-track-kind="metadata" class="tab-pane"
id="{{elementid}}_vtracks_metadata">
<div class="trackhelp">{{{helpStrings.metadata}}}</div>
<div class="trackhelp">
{{#metadatahelpicon}}
{{> core/help_icon }}
{{/metadatahelpicon}}
</div>
{{#video.tracks.metadata}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="metadata-video-url-input">
{{#str}} metadatasourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="metadata-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32" value="{{src}}"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="metadata-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry" data-value="{{srclang}}">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="metadata-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text" value="{{label}}"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addmetadatatrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.metadata}}
{{^video.tracks.metadata}}
<div class="mb-1 tiny_mediacms_track">
<div class="tiny_mediacms_source tiny_mediacms_track_source">
<div class="mb-1">
<label for="metadata-video-url-input">
{{#str}} metadatasourcelabel, tiny_mediacms {{/str}}
</label>
<div class="input-group input-append w-100">
<input id="metadata-video-url-input" class="form-control tiny_mediacms_url_entry" type="url" size="32"/>
{{#showfilepickertrack}}
<span class="input-group-append">
<button class="btn btn-secondary openmediacmsbrowser" type="button">{{#str}} browserepositories, tiny_mediacms {{/str}}</button>
</span>
{{/showfilepickertrack}}
</div>
</div>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-video-lang-input">{{#str}} srclang, tiny_mediacms {{/str}}</label>
<select id="metadata-video-lang-input" class="custom-select tiny_mediacms_track_lang_entry">
<optgroup label="{{#str}} languagesinstalled, tiny_mediacms {{/str}}">
{{#langsinstalled}}
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
{{/langsinstalled}}
</optgroup>
<optgroup label="{{#str}} languagesavailable, tiny_mediacms {{/str}} ">
{{#langsavailable}}
<option value="{{code}}">{{lang}}</option>
{{/langsavailable}}
</optgroup>
</select>
</div>
<div class="mb-3">
<label class="w-100" for="metadata-video-track-input">{{#str}} label, tiny_mediacms {{/str}}</label>
<input id="metadata-video-track-input" class="form-control tiny_mediacms_track_label_entry" type="text"/>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input tiny_mediacms_track_default"/>
<label class="form-check-label">{{#str}} default, tiny_mediacms {{/str}}</label>
</div>
<div class="addcomponent-wrapper">
<a href="#" class="addcomponent">
{{#str}} addmetadatatrack, tiny_mediacms {{/str}}
</a>
</div>
<div class="removecomponent-wrapper hidden">
<a href="#" class="removecomponent">
{{#str}} remove, tiny_mediacms {{/str}}
</a>
</div>
</div>
{{/video.tracks.metadata}}
</div>
</div>
</div>
</fieldset>

View File

@@ -0,0 +1,50 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/embed_media_video
Embed media video template.
Example context (json):
{
}
}}
&nbsp;<video{{!
}}{{#width}} width="{{.}}"{{/width}}{{!
}}{{#height}} height="{{.}}"{{/height}}{{!
}}{{#poster}} poster="{{.}}"{{/poster}}{{!
}}{{#showControls}} controls="true"{{/showControls}}{{!
}}{{#loop}} loop="true"{{/loop}}{{!
}}{{#muted}} muted="true"{{/muted}}{{!
}}{{#autoplay}} autoplay="true"{{/autoplay}}{{!
}}{{#title}} title="{{.}}"{{/title}}{{!
}}>
{{#sources}}
<source src="{{.}}">
{{/sources}}
{{#tracks}}
<track{{!
}} src="{{track}}"{{!
}} kind="{{kind}}"{{!
}} srclang="{{srclang}}"{{!
}} label="{{label}}"{{!
}}{{#defaultTrack}} default="true"{{/defaultTrack}}{{!
}}>
{{/tracks}}
{{#description}}{{.}}{{/description}}
</video>&nbsp;

View File

@@ -0,0 +1,134 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/iframe_embed_modal
Iframe embed modal template.
Example context (json):
{
"elementid": "editor1",
"isupdating": false
}
}}
{{< core/modal }}
{{$body}}
<form class="tiny_iframecms_form" id="{{elementid}}_tiny_iframecms_form">
<!-- Tab Navigation -->
<ul class="nav nav-tabs mb-3 tiny_iframecms_tabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active tiny_iframecms_tab_url_btn" id="{{elementid}}_tab_url"
data-bs-toggle="tab" data-bs-target="#{{elementid}}_pane_url"
type="button" role="tab" aria-controls="{{elementid}}_pane_url" aria-selected="true">
{{#str}} tabembedurl, tiny_mediacms {{/str}}
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link tiny_iframecms_tab_iframe_library_btn" id="{{elementid}}_tab_iframe_library"
data-bs-toggle="tab" data-bs-target="#{{elementid}}_pane_iframe_library"
type="button" role="tab" aria-controls="{{elementid}}_pane_iframe_library" aria-selected="false">
{{#str}} tabvideolibraryiframe, tiny_mediacms {{/str}}
</button>
</li>
</ul>
<!-- Tab Content -->
<div class="tab-content">
<!-- Tab 1: Embed URL (existing content) -->
<div class="tab-pane fade show active tiny_iframecms_pane_url" id="{{elementid}}_pane_url" role="tabpanel" aria-labelledby="{{elementid}}_tab_url">
<div class="container-fluid p-0">
<div class="row">
<!-- Left column: URL and Options -->
<div class="col-md-6">
<!-- URL Input -->
<div class="mb-3">
<label for="{{elementid}}_iframe_url" class="form-label font-weight-bold">
{{#str}} iframeurl, tiny_mediacms {{/str}}
</label>
<textarea
class="form-control tiny_iframecms_url"
id="{{elementid}}_iframe_url"
rows="3"
placeholder="{{#str}} iframeurlplaceholder, tiny_mediacms {{/str}}"
>{{url}}</textarea>
<div class="tiny_iframecms_url_warning text-danger small mt-1 d-none">
{{#str}} iframeurlinvalid, tiny_mediacms {{/str}}
</div>
</div>
{{> tiny_mediacms/iframe_embed_options }}
</div>
<!-- Right column: Preview -->
<div class="col-md-6">
<label class="form-label font-weight-bold">
{{#str}} preview, tiny_mediacms {{/str}}
</label>
<div class="tiny_iframecms_preview_container border rounded p-2 bg-light" style="min-height: 300px;">
<div class="tiny_iframecms_preview d-flex align-items-center justify-content-center text-muted" style="min-height: 280px;">
<span>{{#str}} iframeurlplaceholder, tiny_mediacms {{/str}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Tab 2: Media Library -->
<div class="tab-pane fade tiny_iframecms_pane_iframe_library" id="{{elementid}}_pane_iframe_library" role="tabpanel" aria-labelledby="{{elementid}}_tab_iframe_library">
<div class="tiny_iframecms_iframe_library_container" style="min-height: 500px;">
<div class="tiny_iframecms_iframe_library_placeholder text-center py-5">
<p class="text-muted">{{#str}} libraryloading, tiny_mediacms {{/str}}</p>
</div>
<div class="tiny_iframecms_iframe_library_loading text-center py-5 d-none">
<div class="spinner-border text-primary" role="status">
<span class="sr-only visually-hidden">{{#str}} libraryloading, tiny_mediacms {{/str}}</span>
</div>
<p class="mt-2 text-muted">{{#str}} libraryloading, tiny_mediacms {{/str}}</p>
</div>
<iframe
class="tiny_iframecms_iframe_library_frame d-none"
src=""
style="width: 100%; height: 500px; border: 1px solid #dee2e6; border-radius: 0.25rem;"
frameborder="0"
allowfullscreen>
</iframe>
</div>
</div>
</div>
</form>
{{/body}}
{{$footer}}
<button type="button" class="btn btn-primary" data-action="save">
{{#isupdating}}
{{#str}} updateiframe, tiny_mediacms {{/str}}
{{/isupdating}}
{{^isupdating}}
{{#str}} insertiframe, tiny_mediacms {{/str}}
{{/isupdating}}
</button>
{{#isupdating}}
<button type="button" class="btn btn-danger tiny_iframecms_remove_btn" data-action="remove">
{{#str}} removeiframe, tiny_mediacms {{/str}}
</button>
{{/isupdating}}
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
{{/footer}}
{{/ core/modal }}

View File

@@ -0,0 +1,127 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/iframe_embed_options
Embed options partial for iframe modal.
Example context (json):
{
"elementid": "editor1",
"showTitle": true,
"linkTitle": true,
"showRelated": true,
"showUserAvatar": true,
"responsive": true,
"startAtEnabled": false,
"startAt": "0:00"
}
}}
<!-- Embed Options -->
<div class="mb-3">
<label class="form-label font-weight-bold">
{{#str}} embedoptions, tiny_mediacms {{/str}}
</label>
<div class="row">
<div class="col-6">
<div class="form-check mb-2">
<input type="checkbox" class="form-check-input tiny_iframecms_showtitle"
id="{{elementid}}_showtitle" {{#showTitle}}checked{{/showTitle}}>
<label class="form-check-label" for="{{elementid}}_showtitle">
{{#str}} showtitle, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check mb-2">
<input type="checkbox" class="form-check-input tiny_iframecms_linktitle"
id="{{elementid}}_linktitle" {{#linkTitle}}checked{{/linkTitle}}>
<label class="form-check-label" for="{{elementid}}_linktitle">
{{#str}} linktitle, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check mb-2">
<input type="checkbox" class="form-check-input tiny_iframecms_showrelated"
id="{{elementid}}_showrelated" {{#showRelated}}checked{{/showRelated}}>
<label class="form-check-label" for="{{elementid}}_showrelated">
{{#str}} showrelated, tiny_mediacms {{/str}}
</label>
</div>
</div>
<div class="col-6">
<div class="form-check mb-2">
<input type="checkbox" class="form-check-input tiny_iframecms_showuseravatar"
id="{{elementid}}_showuseravatar" {{#showUserAvatar}}checked{{/showUserAvatar}}>
<label class="form-check-label" for="{{elementid}}_showuseravatar">
{{#str}} showuseravatar, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check mb-2">
<input type="checkbox" class="form-check-input tiny_iframecms_responsive"
id="{{elementid}}_responsive" {{#responsive}}checked{{/responsive}}>
<label class="form-check-label" for="{{elementid}}_responsive">
{{#str}} responsive, tiny_mediacms {{/str}}
</label>
</div>
<div class="form-check mb-2 d-flex align-items-center">
<input type="checkbox" class="form-check-input tiny_iframecms_startat_enabled"
id="{{elementid}}_startat_enabled" {{#startAtEnabled}}checked{{/startAtEnabled}}>
<label class="form-check-label ms-2 me-2" for="{{elementid}}_startat_enabled">
{{#str}} startat, tiny_mediacms {{/str}}
</label>
<input type="text" class="form-control form-control-sm tiny_iframecms_startat"
id="{{elementid}}_startat" value="{{startAt}}" placeholder="0:00" style="width: 70px;">
</div>
</div>
</div>
</div>
<!-- Aspect Ratio -->
<div class="mb-3">
<label for="{{elementid}}_aspectratio" class="form-label font-weight-bold">
{{#str}} aspectratio, tiny_mediacms {{/str}}
</label>
<select class="form-control tiny_iframecms_aspectratio" id="{{elementid}}_aspectratio">
<option value="16:9" {{#is16_9}}selected{{/is16_9}}>{{#str}} aspectratio_16_9, tiny_mediacms {{/str}}</option>
<option value="4:3" {{#is4_3}}selected{{/is4_3}}>{{#str}} aspectratio_4_3, tiny_mediacms {{/str}}</option>
<option value="1:1" {{#is1_1}}selected{{/is1_1}}>{{#str}} aspectratio_1_1, tiny_mediacms {{/str}}</option>
<option value="custom" {{#isCustom}}selected{{/isCustom}}>{{#str}} aspectratio_custom, tiny_mediacms {{/str}}</option>
</select>
</div>
<!-- Dimensions -->
<div class="mb-3">
<label class="form-label font-weight-bold">
{{#str}} dimensions, tiny_mediacms {{/str}}
</label>
<div class="row">
<div class="col-6">
<div class="input-group">
<input type="number" class="form-control tiny_iframecms_width"
id="{{elementid}}_width" value="{{width}}" placeholder="560">
<span class="input-group-text">px</span>
</div>
<small class="text-muted">{{#str}} width, tiny_mediacms {{/str}}</small>
</div>
<div class="col-6">
<div class="input-group">
<input type="number" class="form-control tiny_iframecms_height"
id="{{elementid}}_height" value="{{height}}" placeholder="315">
<span class="input-group-text">px</span>
</div>
<small class="text-muted">{{#str}} height, tiny_mediacms {{/str}}</small>
</div>
</div>
</div>

View File

@@ -0,0 +1,36 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/iframe_embed_output
Iframe embed output template.
Example context (json):
{
"src": "https://example.com/embed?m=abc123",
"width": 560,
"height": 315,
"responsive": true,
"aspectRatioClass": "ratio-16-9"
}
}}
{{#responsive}}
<iframe src="{{src}}" style="width:100%;aspect-ratio:{{aspectRatioValue}};display:block;border:0;" allowFullScreen></iframe>
{{/responsive}}
{{^responsive}}
<iframe width="{{width}}" height="{{height}}" src="{{src}}" frameBorder="0" allowFullScreen></iframe>
{{/responsive}}

View File

@@ -0,0 +1,91 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/iframe_video_library
Video library browser for iframe modal.
Example context (json):
{
"elementid": "editor1"
}
}}
<div class="tiny_iframecms_library_container">
<!-- Search and Filter Bar -->
<div class="row mb-3">
<div class="col-md-8">
<div class="input-group">
<input type="text" class="form-control tiny_iframecms_library_search"
placeholder="{{#str}} librarysearchplaceholder, tiny_mediacms {{/str}}">
<button type="button" class="btn btn-outline-secondary tiny_iframecms_library_search_btn">
<i class="fa fa-search" aria-hidden="true"></i>
{{#str}} search, moodle {{/str}}
</button>
</div>
</div>
<div class="col-md-4">
<select class="form-control tiny_iframecms_library_sort">
<option value="date_desc">{{#str}} librarysortnewest, tiny_mediacms {{/str}}</option>
<option value="date_asc">{{#str}} librarysortoldest, tiny_mediacms {{/str}}</option>
<option value="title_asc">{{#str}} librarysorttitle, tiny_mediacms {{/str}}</option>
<option value="views_desc">{{#str}} librarysortviews, tiny_mediacms {{/str}}</option>
</select>
</div>
</div>
<!-- Video Grid -->
<div class="tiny_iframecms_library_grid" style="max-height: 400px; overflow-y: auto;">
<!-- Loading state -->
<div class="tiny_iframecms_library_loading text-center py-5">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">{{#str}} loading, tiny_mediacms {{/str}}</span>
</div>
<p class="mt-2 text-muted">{{#str}} libraryloading, tiny_mediacms {{/str}}</p>
</div>
<!-- Videos will be rendered here -->
<div class="tiny_iframecms_library_items row d-none">
<!-- Video items will be dynamically inserted here -->
</div>
<!-- Empty state -->
<div class="tiny_iframecms_library_empty text-center py-5 d-none">
<i class="fa fa-video-camera fa-3x text-muted mb-3" aria-hidden="true"></i>
<p class="text-muted">{{#str}} libraryempty, tiny_mediacms {{/str}}</p>
</div>
<!-- Error state -->
<div class="tiny_iframecms_library_error text-center py-5 d-none">
<i class="fa fa-exclamation-triangle fa-3x text-warning mb-3" aria-hidden="true"></i>
<p class="text-danger tiny_iframecms_library_error_message">{{#str}} libraryerror, tiny_mediacms {{/str}}</p>
<button type="button" class="btn btn-secondary tiny_iframecms_library_retry">
{{#str}} libraryretry, tiny_mediacms {{/str}}
</button>
</div>
</div>
<!-- Pagination -->
<div class="tiny_iframecms_library_pagination d-flex justify-content-between align-items-center mt-3 d-none">
<button type="button" class="btn btn-outline-secondary btn-sm tiny_iframecms_library_prev" disabled>
<i class="fa fa-chevron-left" aria-hidden="true"></i> {{#str}} libraryprev, tiny_mediacms {{/str}}
</button>
<span class="tiny_iframecms_library_page_info text-muted"></span>
<button type="button" class="btn btn-outline-secondary btn-sm tiny_iframecms_library_next">
{{#str}} librarynext, tiny_mediacms {{/str}} <i class="fa fa-chevron-right" aria-hidden="true"></i>
</button>
</div>
</div>

View File

@@ -0,0 +1,73 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/iframe_video_library_item
Single video item in the library grid.
Example context (json):
{
"id": "abc123",
"title": "My Video",
"thumbnail": "https://example.com/thumb.jpg",
"duration": "2:30",
"views": "150 views",
"date": "2 weeks ago",
"embedUrl": "https://example.com/embed?m=abc123"
}
}}
<div class="col-md-4 col-sm-6 mb-3">
<div class="tiny_iframecms_library_item card h-100"
data-video-id="{{id}}"
data-embed-url="{{embedUrl}}"
style="cursor: pointer;">
<div class="position-relative">
<img src="{{thumbnail}}" class="card-img-top" alt="{{title}}"
style="height: 120px; object-fit: cover;"
onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22320%22 height=%22120%22><rect fill=%22%23ddd%22 width=%22320%22 height=%22120%22/><text x=%2250%%22 y=%2250%%22 dominant-baseline=%22middle%22 text-anchor=%22middle%22 fill=%22%23999%22 font-size=%2214%22>No thumbnail</text></svg>'">
{{#duration}}
<span class="position-absolute bottom-0 end-0 bg-dark text-white px-1 m-1 small rounded"
style="font-size: 0.75rem;">
{{duration}}
</span>
{{/duration}}
<!-- Select overlay button -->
<div class="tiny_iframecms_library_item_overlay position-absolute top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center"
style="background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.2s;">
<button type="button" class="btn btn-primary btn-sm tiny_iframecms_library_select_btn">
{{#str}} libraryselect, tiny_mediacms {{/str}}
</button>
</div>
</div>
<div class="card-body p-2">
<h6 class="card-title mb-1 text-truncate" title="{{title}}" style="font-size: 0.875rem;">
{{title}}
</h6>
<p class="card-text text-muted mb-0" style="font-size: 0.75rem;">
{{#views}}{{views}} &bull; {{/views}}{{date}}
</p>
</div>
</div>
</div>
<style>
.tiny_iframecms_library_item:hover .tiny_iframecms_library_item_overlay {
opacity: 1 !important;
}
.tiny_iframecms_library_item:hover {
box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.15);
}
</style>

View File

@@ -0,0 +1,34 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/image
Image template.
Example context (json):
{
}
}}
<img src="{{url}}" alt="{{alt}}"{{!
}}{{#width}} width="{{.}}"{{/width}}{{!
}}{{#height}} height="{{.}}"{{/height}}{{!
}}{{#presentation}} role="presentation"{{/presentation}}{{!
}}{{#customStyle}} style="{{.}}"{{/customStyle}}{{!
}}{{#classlist}} class="{{.}}"{{/classlist}}{{!
}}{{#id}} id="{{.}}"{{/id}}{{!
}}/>

View File

@@ -0,0 +1,61 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/insert_image_modal
Insert image template.
Example context (json):
{
"uniqid": 0,
"elementid": "exampleId",
"loading": {},
"title": "Insert image"
}
}}
{{< core/modal }}
{{$body}}
<form class="tiny_imagecms_form">
<!-- URL warning -->
<div role="alert" class="d-none alert alert-warning mb-1 tiny_imagecms_urlwarning">
<label>
{{#str}} imageurlrequired, tiny_mediacms {{/str}}
</label>
</div>
<!-- Presentation warning -->
<div role="alert" class="d-none tiny_imagecms_altwarning alert alert-warning mb-1">
<label>
{{#str}} presentationoraltrequired, tiny_mediacms {{/str}}
</label>
</div>
<!-- Preloader icon -->
<div role="progressbar" class="d-none tiny_imagecms_loader lead border rounded text-center">
<div class="tiny_imagecms_loader_container d-flex flex-column justify-content-center">
<span data-region="loading-icon-container">
{{> core/loading }}
</span>
<div>{{#str}} loading, tiny_mediacms {{/str}}</div>
</div>
</div>
<div class="tiny_imagecms_body_template"></div>
</form>
{{/body}}
{{$footer}}
<div class="tiny_imagecms_footer_template container"></div>
{{/footer}}
{{/ core/modal }}

View File

@@ -0,0 +1,112 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/insert_image_modal_details
Insert image details body template.
Example context (json):
{
"elementid": "exampleId",
"alt": "Image description",
"presentation": true,
"width": 600,
"height": 400,
"customStyle": "",
"sizecustomhelpicon": {
"text": "Help text"
}
}
}}
<div class="tiny_imagecms_image_details">
<div class="container">
<div class="row">
<!-- Column 1: Image Preview and Description -->
<div class="tiny_imagecms_preview_col col-lg-7 p-0">
<input type="hidden" class="tiny_imagecms_customstyle" value="{{customStyle}}">
<!-- Row 1: Image preview -->
<div class="tiny_imagecms_preview_box border rounded">
<!-- Delete image icon -->
<div class="tiny_imagecms_deleteicon" tabindex="0" title="{{#str}} deleteimage, tiny_mediacms {{/str}}">
<i class="fa fa-trash-o" title="{{#str}} deleteimage, tiny_mediacms {{/str}}"></i>
</div>
<!-- Image placeholder -->
<img class="tiny_imagecms_preview" src="data:," alt>
</div>
<!-- Row 2: Image description -->
<div class="form-group mt-3">
<label for="{{elementid}}_tiny_imagecms_altentry">{{#str}} enteralt, tiny_mediacms {{/str}}</label>
<textarea class="tiny_imagecms_altentry form-control fullwidth" id="{{elementid}}_tiny_imagecms_altentry" name="altentry" maxlength="125">{{alt}}</textarea>
<!-- Character counter -->
<div id="the-count" class="d-flex justify-content-end small">
<span id="currentcount">0</span>
<span id="maximumcount"> / 125</span>
</div>
</div>
</div>
<!-- Column 2: Checkbox and Radio Buttons -->
<div class="tiny_imagecms_properties_col col-lg-5">
<!-- Row 1: Image presentation role -->
<div class="form-check mb-2">
<input type="checkbox" class="tiny_imagecms_presentation form-check-input" id="{{elementid}}_tiny_imagecms_presentation" {{# presentation }}checked{{/ presentation }}>
<label class="form-check-label" for="{{elementid}}_tiny_imagecms_presentation">{{#str}} presentation, tiny_mediacms {{/str}}</label>
</div>
<!-- Row 2: Original size radiobutton -->
<div class="form-check mb-2 ps-0">
<input type="radio" class="tiny_imagecms_sizeoriginal" id="{{elementid}}_tiny_imagecms_sizeoriginal" name="radioOptions">
<label class="form-check-label" for="{{elementid}}_tiny_imagecms_sizeoriginal">{{#str}} sizeoriginal, tiny_mediacms {{/str}}</label>
</div>
<!-- Row 3: Custom size radiobutton -->
<div class="form-check ps-0 mb-2">
<input type="radio" class="tiny_imagecms_sizecustom" id="{{elementid}}_tiny_imagecms_sizecustom" name="radioOptions">
<label class="form-check-label" for="{{elementid}}_tiny_imagecms_sizecustom">{{#str}} sizecustom, tiny_mediacms {{/str}}</label>
</div>
<!-- Row 4: Image size -->
<div class="tiny_imagecms_properties mb-2">
<!-- Row 1: Image width and height -->
<div id="{{elementid}}_tiny_imagecms_size" class="tiny_imagecms_size container ms-1">
<div class="d-flex justify-content-start">
<!-- Column 1: Width Input -->
<div class="flex-item me-2">
<div class="form-group mb-0">
<input type="number" min="0" class="tiny_imagecms_widthentry form-control me-1 input-mini" id="{{elementid}}_tiny_imagecms_widthentry" value="{{width}}">
<label for="{{elementid}}_tiny_imagecms_widthentry" class="ms-1">{{#str}} width, tiny_mediacms {{/str}}</label>
</div>
</div>
<!-- Column 2: "X" Text -->
<div class="flex-item me-1 mt-2">X</div>
<!-- Column 3: Height Input -->
<div class="flex-item me-1">
<div class="form-group mb-0">
<input type="number" min="0" class="tiny_imagecms_heightentry form-control ms-1 input-mini" id="{{elementid}}_tiny_imagecms_heightentry" value="{{height}}">
<label for="{{elementid}}_tiny_imagecms_heightentry" class="ms-1">{{#str}} height, tiny_mediacms {{/str}}</label>
</div>
</div>
<div class="tiny_imagecms_customhelpicon flex-item ms-1">{{#sizecustomhelpicon}}{{> core/help_icon }}{{/sizecustomhelpicon}}</div>
</div>
</div>
<!-- Row 2: Keep proportion -->
<div class="form-check mb-2">
<input type="checkbox" class="tiny_imagecms_constrain form-check-input" id="{{elementid}}_tiny_imagecms_constrain">
<label class="form-check-label" for="{{elementid}}_tiny_imagecms_constrain">{{#str}} constrain, tiny_mediacms {{/str}}</label>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/insert_image_modal_details_footer
Insert image details footer template.
Example context (json):
{
"elementid": "exampleId"
}
}}
<div class="row">
<!-- First Column -->
<div class="col-md-6 d-flex align-items-center p-0">
<!-- Row 1: URL related label -->
<span class="tiny_imagecms_filename text-truncate me-1"></span>
</div>
<!-- Column 2: Saving, canceling, browsing repositories buttons -->
<div class="col-md-6 text-end mt-2 md-0 p-0">
<!-- Row 1: Cancel button -->
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
<!-- Row 2: Save button -->
<button class="tiny_imagecms_urlentrysubmit btn btn-primary" type="submit">{{#str}} saveimage, tiny_mediacms {{/str}}</button>
</div>
</div>

View File

@@ -0,0 +1,53 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/insert_image_modal_insert
Insert image body template.
Example context (json):
{
"showdropzone": true,
"showfilepicker": true
}
}}
<div class="tiny_imagecms_insert_image">
<div class="tiny_imagecms_dropzone d-flex flex-column justify-content-center">
{{#showdropzone}}
<div class="tiny_imagecms_dropzone_container"></div>
<!-- File input -->
<input type="file" id="tiny_imagecms_fileinput" accept="image/*" class="d-none">
{{/showdropzone}}
{{^showdropzone}}
<div class="text-center">
<!-- Dropzone icon -->
<i class="fa-6x pb-2 text-secondary fa fa-cloud"></i>
<!-- Dropzone string -->
<div class="lead text-center">
<p class="mb-0">
{{#showfilepicker}}
{{#str}} repositoryuploadnotpermitted, tiny_mediacms {{/str}}</p>
{{/showfilepicker}}
{{^showfilepicker}}
{{#str}} repositorynotpermitted, tiny_mediacms {{/str}}
{{/showfilepicker}}
</div>
</div>
{{/showdropzone}}
</div>
</div>

View File

@@ -0,0 +1,56 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/insert_image_modal_insert_footer
Insert image footer template.
Example context (json):
{
"showdropzone": true,
"elementid": "exampleId",
"src": "https://moodle.org/logo.png",
"showfilepicker": true
}
}}
<div class="row">
<!-- First Column -->
<div class="col-md-6 d-flex align-items-center p-0">
<!-- Row 1: URL related label -->
{{#showdropzone}}
<label for="{{elementid}}_tiny_imagecms_urlentry" class="tiny_imagecms_url_label me-1">{{#str}} enterurlor, tiny_mediacms {{/str}}</label>
{{/showdropzone}}
{{^showdropzone}}
<label for="{{elementid}}_tiny_imagecms_urlentry" class="tiny_imagecms_url_label me-1">{{#str}} enterurl, tiny_mediacms {{/str}}</label>
{{/showdropzone}}
<!-- Row 2: URL entry input. Needed by the insert image step and image details step if the image URL source from external -->
<input name="urlentry" class="tiny_imagecms_urlentry form-control w-50 me-1" type="url" id="{{elementid}}_tiny_imagecms_urlentry" size="32" value="{{src}}">
<!-- Row 3: Add button. Needed by the insert image step -->
<button disabled class="tiny_imagecms_addurl btn btn-secondary me-1" type="button">{{#str}} addurl, tiny_mediacms {{/str}}</button>
</div>
<!-- Column 2: Saving, canceling, browsing repositories buttons -->
<div class="col-md-6 text-end mt-2 md-0 p-0">
<!-- Row 1: Cancel button -->
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
{{#showfilepicker}}
<!-- Row 3: Browse repositories button -->
<button class="openimagecmsbrowser btn btn-secondary" type="button">{{#str}} browserepositoriesimage, tiny_mediacms {{/str}}</button>
{{/showfilepicker}}
</div>
</div>

View File

@@ -0,0 +1,34 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/missingfiles
Insert image template.
Example context (json):
{
"missingFiles": [
"Example.png",
"Another.mov"
]
}
}}
<ol>
{{#missingFiles}}
<li>{{.}}</li>
{{/missingFiles}}
</ol>

View File

@@ -0,0 +1,28 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tiny_mediacms/mm2_iframe
Insert image template.
Example context (json):
{
}
}}
<iframe class="mmcms_iframe" id="mmcms-iframe" src={{src}}>
</iframe>