#!/usr/bin/env python




##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
    import builtins as builtin
except ImportError:
    import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple
from Cheetah.Template import Template
from Cheetah.DummyTransaction import *
from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList
from Cheetah.CacheRegion import CacheRegion
import Cheetah.Filters as Filters
import Cheetah.ErrorCatchers as ErrorCatchers
from Plugins.Extensions.OpenWebif.controllers.i18n import tstrings

##################################################
## MODULE CONSTANTS
VFFSL=valueFromFrameOrSearchList
VFSL=valueFromSearchList
VFN=valueForName
currentTime=time.time
__CHEETAH_version__ = '2.4.4'
__CHEETAH_versionTuple__ = (2, 4, 4, 'development', 0)
__CHEETAH_genTime__ = 1644610943.996865
__CHEETAH_genTimestamp__ = 'Fri Feb 11 20:22:23 2022'
__CHEETAH_src__ = '/home/nonsolosat/openpli-dreambox-oe-core/build/tmp/work/dm7080-oe-linux/enigma2-plugin-extensions-openwebif/gitAUTOINC+81b15e17ab-r0/git/plugin/controllers/views/responsive/ajax/epgr.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Feb 11 20:05:52 2022'
__CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'

if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
    raise AssertionError(
      'This template was compiled with Cheetah version'
      ' %s. Templates compiled before version %s must be recompiled.'%(
         __CHEETAH_version__, RequiredCheetahVersion))

##################################################
## CLASSES

class epgr(Template):

    ##################################################
    ## CHEETAH GENERATED METHODS


    def __init__(self, *args, **KWs):

        super(epgr, self).__init__(*args, **KWs)
        if not self._CHEETAH__instanceInitialized:
            cheetahKWArgs = {}
            allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split()
            for k,v in KWs.items():
                if k in allowedKWs: cheetahKWArgs[k] = v
            self._initCheetahInstance(**cheetahKWArgs)
        

    def respond(self, trans=None):



        ## CHEETAH: main method generated for this template
        if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)):
            trans = self.transaction # is None unless self.awake() was called
        if not trans:
            trans = DummyTransaction()
            _dummyTrans = True
        else: _dummyTrans = False
        write = trans.response().write
        SL = self._CHEETAH__searchList
        _filter = self._CHEETAH__currentFilter
        
        ########################################
        ## START - generated method body
        
        _orig_filter_31819221 = _filter
        filterName = u'WebSafe'
        if self._CHEETAH__filters.has_key("WebSafe"):
            _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName]
        else:
            _filter = self._CHEETAH__currentFilter = \
			self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter
        write(u'''
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
\t<div class="card">
\t\t<div class="header">
\t\t\t<div class="row clearfix">
\t\t\t\t<div class="col-xs-12 col-sm-6">
\t\t\t\t\t<h2 id="configtitle"><i class="material-icons material-icons-centered">refresh</i>EPG Refresh</h2>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
<div class="body" >
\t<div id="content_main">
\t\t<div class="row clearfix vti-masked-input" id="info">
\t\t\t<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="epgrefreshcontent">
\t\t\t\t<form>
<div class="form-group">
\t\t\t\t<div class="row clearfix">
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_enabled'] # u"$tstrings['er_enabled']" on line 23, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_enabled']")) # from line 23, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<input type="checkbox" name="er_enabled" value="" id="er_enabled" class="form-control chk--skinned">
\t\t\t\t\t\t\t\t<label for="er_enabled">&nbsp;</label>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_enable_messages'] # u"$tstrings['er_enable_messages']" on line 32, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_enable_messages']")) # from line 32, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<input type="checkbox" name="er_enablemessage" value="" id="er_enablemessage" class="form-control chk--skinned">
\t\t\t\t\t\t\t\t<label for="er_enablemessage">&nbsp;</label>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_adapter'] # u"$tstrings['er_adapter']" on line 41, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_adapter']")) # from line 41, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<select id="er_adapter" class="form-control" value="">
\t\t\t\t\t\t\t\t\t<option value="main" selected="selected">''')
        _v = VFFSL(SL,"tstrings",True)['er_main'] # u"$tstrings['er_main']" on line 43, col 51
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_main']")) # from line 43, col 51.
        write(u'''</option>
\t\t\t\t\t\t\t\t\t<option value="pip">''')
        _v = VFFSL(SL,"tstrings",True)['er_pip'] # u"$tstrings['er_pip']" on line 44, col 30
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_pip']")) # from line 44, col 30.
        write(u'''</option>
\t\t\t\t\t\t\t\t\t<option value="pip_hidden">''')
        _v = VFFSL(SL,"tstrings",True)['er_pip_hidden'] # u"$tstrings['er_pip_hidden']" on line 45, col 37
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_pip_hidden']")) # from line 45, col 37.
        write(u'''</option>
\t\t\t\t\t\t\t\t\t<option value="record">''')
        _v = VFFSL(SL,"tstrings",True)['er_fake_recording'] # u"$tstrings['er_fake_recording']" on line 46, col 33
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_fake_recording']")) # from line 46, col 33.
        write(u'''</option>
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class="row clearfix">
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_begin'] # u"$tstrings['er_begin']" on line 56, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_begin']")) # from line 56, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<div class="input-group">
\t\t\t\t\t\t\t\t\t<span class="input-group-addon">
\t\t\t\t\t\t\t\t\t\t<i class="material-icons">access_time</i>
\t\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t\t<div class="form-line">
\t\t\t\t\t\t\t\t\t\t<input type="text" name="er_begin" id="er_begin" value="" class="form-control time24" placeholder="06:30">
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_end'] # u"$tstrings['er_end']" on line 71, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_end']")) # from line 71, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<div class="input-group">
\t\t\t\t\t\t\t\t\t<span class="input-group-addon">
\t\t\t\t\t\t\t\t\t\t<i class="material-icons">access_time</i>
\t\t\t\t\t\t\t\t\t</span>
\t\t\t\t\t\t\t\t\t<div class="form-line">
\t\t\t\t\t\t\t\t\t\t<input type="text" name="er_end" id="er_end" value="" class="form-control time24" placeholder="06:30">
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_delay_standby'] # u"$tstrings['er_delay_standby']" on line 86, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_delay_standby']")) # from line 86, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<div class="form-line">
\t\t\t\t\t\t\t\t\t<input type="text" name="er_delay_standby" id="er_delay_standby" class="form-control" placeholder="10">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class="row clearfix">
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_interval_sec'] # u"$tstrings['er_interval_sec']" on line 98, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_interval_sec']")) # from line 98, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<div class="form-line">
\t\t\t\t\t\t\t\t\t<input type="text" name="er_interval" id="er_interval" class="form-control" placeholder="10">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_afterevent'] # u"$tstrings['er_afterevent']" on line 108, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_afterevent']")) # from line 108, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<input type="checkbox" name="er_afterevent" value="" id="er_afterevent" class="form-control chk--skinned">
\t\t\t\t\t\t\t\t<label for="er_afterevent">&nbsp;</label>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_force'] # u"$tstrings['er_force']" on line 117, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_force']")) # from line 117, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<input type="checkbox" name="er_force" value="" id="er_force" class="form-control chk--skinned">
\t\t\t\t\t\t\t\t<label for="er_force">&nbsp;</label>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<div class="row clearfix">
\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_wakeup'] # u"$tstrings['er_wakeup']" on line 128, col 16
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_wakeup']")) # from line 128, col 16.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t<input type="checkbox" name="er_wakeup" value="" id="er_wakeup" class="form-control chk--skinned">
\t\t\t\t\t\t\t\t<label for="er_wakeup">&nbsp;</label>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12  col-sm-4">
\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['bouquets'] # u"$tstrings['bouquets']" on line 135, col 14
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bouquets']")) # from line 135, col 14.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t<select id="bouquets" class="form-control show-tick" multiple></select>
\t\t\t\t\t</div>
\t\t\t\t\t<div class="col-xs-12  col-sm-4">
\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['at_channels'] # u"$tstrings['at_channels']" on line 139, col 14
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['at_channels']")) # from line 139, col 14.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t<select id="channels" class="form-control show-tick" multiple data-live-search="true"></select>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<span id="er_hasAT">
\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_inherit_autotimer'] # u"$tstrings['er_inherit_autotimer']" on line 148, col 17
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_inherit_autotimer']")) # from line 148, col 17.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t\t<input type="checkbox" name="er_inherit_autotimer" value="" id="er_inherit_autotimer" class="form-control chk--skinned">
\t\t\t\t\t\t\t\t\t<label for="er_inherit_autotimer">&nbsp;</label>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class="col-xs-12 col-sm-4">
\t\t\t\t\t\t\t<div class="row clearfix">
\t\t\t\t\t\t\t\t<div class="col-xs-12">
\t\t\t\t\t\t\t\t\t<label>''')
        _v = VFFSL(SL,"tstrings",True)['er_parse_autotimer'] # u"$tstrings['er_parse_autotimer']" on line 157, col 17
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_parse_autotimer']")) # from line 157, col 17.
        write(u''':&nbsp;</label>
\t\t\t\t\t\t\t\t\t<input type="checkbox" name="er_parse_autotimer" value="" id="er_parse_autotimer" class="form-control chk--skinned">
\t\t\t\t\t\t\t\t\t<label for="er_parse_autotimer">&nbsp;</label>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</span>
\t\t\t</div>
\t\t</form>
\t</div>
</div>
\t<div class="row clearfix">
\t\t<div class="col-xs-12 align-center">
\t\t\t<div id="actions">
\t\t\t\t<button id="epgrbutton0" class="atbtn btn btn--skinned waves-effect">
\t\t\t\t\t<i class="material-icons">autorenew</i>
\t\t\t\t\t<span>''')
        _v = VFFSL(SL,"tstrings",True)['reload'] # u"$tstrings['reload']" on line 174, col 12
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['reload']")) # from line 174, col 12.
        write(u'''</span>
\t\t\t\t</button>
\t\t\t\t<button id="epgrbutton1" class="atbtn btn btn--skinned waves-effect">
\t\t\t\t\t<i class="material-icons">save</i>
\t\t\t\t\t<span>''')
        _v = VFFSL(SL,"tstrings",True)['er_save'] # u"$tstrings['er_save']" on line 178, col 12
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_save']")) # from line 178, col 12.
        write(u'''</span>
\t\t\t\t</button>
\t\t\t\t<button id="epgrbutton2" class="atbtn btn btn--skinned waves-effect">
\t\t\t\t\t<i class="material-icons">refresh</i>
\t\t\t\t\t<span>''')
        _v = VFFSL(SL,"tstrings",True)['er_refresh'] # u"$tstrings['er_refresh']" on line 182, col 12
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_refresh']")) # from line 182, col 12.
        write(u'''</span>
\t\t\t\t</button>
\t\t\t</div>
\t\t</div>
\t</div>
\t<div id="statuscont" style="display:none;margin-top: 10px;">
\t\t<div id="statusbox" class="ui-state-error ui-corner-all" style="padding: 0 0.7em;"> 
\t\t\t<p>
\t\t\t\t<span id="statusicon" class="ui-icon ui-icon-alert" style="margin-right: 0.3em;"></span> 
\t\t\t\t<span id="statustext"></span>
\t\t\t</p>
\t\t</div>
\t</div>
\t\t</div>
\t\t</div>
\t\t</div>
\t\t</div>
\t\t</div>
\t</div>
</div>

<script type="text/javascript">
''')
        if VFFSL(SL,"showiptvchannelsinselection",True): # generated from line 204, col 1
            write(u'''var EPGRnoiptv=false;
''')
        else: # generated from line 206, col 1
            write(u'''var EPGRnoiptv=true;
''')
        write(u'''</script>

<script src="/modern/js/vti-responsive-epgr.min.js?v1.6"></script>
<script src="/modern/plugins/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>
<script>
\tjQuery.AdminBSB.input.activate();
\tjQuery.AdminBSB.select.activate();
\tvar VTiMaskedInput = jQuery(\'.vti-masked-input\');
\tVTiMaskedInput.find(\'.time24\').inputmask(\'hh:mm\', { placeholder: \'__:__ _m\', alias: \'time24\', hourFormat: \'24\' });
\tjQuery(\':text\').blur();
</script>

''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_31819221
        
        ########################################
        ## END - generated method body
        
        return _dummyTrans and trans.response().getvalue() or ""
        
    ##################################################
    ## CHEETAH GENERATED ATTRIBUTES


    _CHEETAH__instanceInitialized = False

    _CHEETAH_version = __CHEETAH_version__

    _CHEETAH_versionTuple = __CHEETAH_versionTuple__

    _CHEETAH_genTime = __CHEETAH_genTime__

    _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__

    _CHEETAH_src = __CHEETAH_src__

    _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__

    _mainCheetahMethod_for_epgr= 'respond'

## END CLASS DEFINITION

if not hasattr(epgr, '_initCheetahAttributes'):
    templateAPIClass = getattr(epgr, '_CHEETAH_templateClass', Template)
    templateAPIClass._addCheetahPlumbingCodeToClass(epgr)


# CHEETAH was developed by Tavis Rudd and Mike Orr
# with code, advice and input from many other volunteers.
# For more information visit http://www.CheetahTemplate.org/

##################################################
## if run from command line:
if __name__ == '__main__':
    from Cheetah.TemplateCmdLineIface import CmdLineIface
    CmdLineIface(templateObj=epgr()).run()


