#!/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__ = 1644596120.940514
__CHEETAH_genTimestamp__ = 'Fri Feb 11 16:15:20 2022'
__CHEETAH_src__ = '/home/nonsolosat/openpli-dreambox-oe-core/build/tmp/work/dm520-oe-linux/enigma2-plugin-extensions-openwebif/gitAUTOINC+81b15e17ab-r0/git/plugin/controllers/views/ajax/epgr.tmpl'
__CHEETAH_srcLastModified__ = 'Fri Feb 11 15:59:45 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_13544896 = _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'''<style>
optgroup {font-weight: bolder;}
#epgrefreshcontent label
{
\t-webkit-margin-top-collapse: separate;
\tmargin-top: 1.5em;
\tdisplay: inline-block;
}
.t2,.t3 { display:table;width: 100%; padding-bottom:10px;background-image:none;}
.t2 > div { display:table-cell;width: 50%;}
.t3 > div { display:table-cell;width: 33%;}
.t3.ui-widget-content,.t2.ui-widget-content { border-top:none;border-left:none;border-right:none;}

</style>
<div id="content_main" style="min-height: 500px;" class="ui-widget-content">
<div id="info">
<div>
<div style="display: inline-block; width: 100%; zoom: 1;background-image:none;" class="ui-widget-content">
<h3 class="ui-widget-header">EPG Refresh</h3>
<div id="epgrefreshcontent">
\t<form>
\t<fieldset style="border:none;">
\t\t<div class="t3 ui-widget-content">
\t\t\t<div>
\t\t<label for="enabled">''')
        _v = VFFSL(SL,"tstrings",True)['er_enabled'] # u"$tstrings['er_enabled']" on line 27, col 24
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_enabled']")) # from line 27, col 24.
        write(u''':</label>
\t\t<input type="checkbox" id="er_enabled" value="">
\t\t\t</div>
\t\t\t<div>
\t\t<label for="er_enablemessage">''')
        _v = VFFSL(SL,"tstrings",True)['er_enable_messages'] # u"$tstrings['er_enable_messages']" on line 31, col 33
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_enable_messages']")) # from line 31, col 33.
        write(u''':</label>
\t\t<input type="checkbox" id="er_enablemessage" value="">
\t\t\t</div>
\t\t\t<div>
\t\t</span><label for="er_adapter">''')
        _v = VFFSL(SL,"tstrings",True)['er_adapter'] # u"$tstrings['er_adapter']" on line 35, col 34
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_adapter']")) # from line 35, col 34.
        write(u''':</label>
\t\t<select id="er_adapter">
\t\t<option value="main" selected="selected">''')
        _v = VFFSL(SL,"tstrings",True)['er_main'] # u"$tstrings['er_main']" on line 37, col 44
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_main']")) # from line 37, col 44.
        write(u'''</option>
\t\t<option value="pip">''')
        _v = VFFSL(SL,"tstrings",True)['er_pip'] # u"$tstrings['er_pip']" on line 38, col 23
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_pip']")) # from line 38, col 23.
        write(u'''</option>
\t\t<option value="pip_hidden">''')
        _v = VFFSL(SL,"tstrings",True)['er_pip_hidden'] # u"$tstrings['er_pip_hidden']" on line 39, col 30
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_pip_hidden']")) # from line 39, col 30.
        write(u'''</option>
\t\t<option value="record">''')
        _v = VFFSL(SL,"tstrings",True)['er_fake_recording'] # u"$tstrings['er_fake_recording']" on line 40, col 26
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_fake_recording']")) # from line 40, col 26.
        write(u'''</option>
\t\t</select>
\t\t\t</div>
\t\t</div>
\t\t<div class="t2 ui-widget-content">
\t\t\t<div>
\t\t<label for="er_begin">''')
        _v = VFFSL(SL,"tstrings",True)['er_begin'] # u"$tstrings['er_begin']" on line 46, col 25
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_begin']")) # from line 46, col 25.
        write(u''':</label>
\t\t<input type="text" id="er_begin" value="" class="text date ui-widget-content ui-corner-all">
\t\t\t</div>
\t\t\t<div>
\t\t<label for="er_end">''')
        _v = VFFSL(SL,"tstrings",True)['er_end'] # u"$tstrings['er_end']" on line 50, col 23
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_end']")) # from line 50, col 23.
        write(u''':</label>
\t\t<input type="text" id="er_end" value="" class="text date ui-widget-content ui-corner-all">
\t\t\t</div>
\t\t</div>
\t\t<div class="t2 ui-widget-content">
\t\t\t<div>
\t\t<label for="er_delay_standby">''')
        _v = VFFSL(SL,"tstrings",True)['er_delay_standby'] # u"$tstrings['er_delay_standby']" on line 56, col 33
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_delay_standby']")) # from line 56, col 33.
        write(u''':</label>
\t\t<input type="text" id="er_delay_standby">
\t\t\t</div>
\t\t\t<div>
\t\t<label id="lblm" for="er_interval">''')
        _v = VFFSL(SL,"tstrings",True)['er_interval_min'] # u"$tstrings['er_interval_min']" on line 60, col 38
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_interval_min']")) # from line 60, col 38.
        write(u''':</label><label id="lbls" for="er_interval">''')
        _v = VFFSL(SL,"tstrings",True)['er_interval_sec'] # u"$tstrings['er_interval_sec']" on line 60, col 110
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_interval_sec']")) # from line 60, col 110.
        write(u''':</label>
\t\t<input type="text" id="er_interval" class="text ui-widget-content ui-corner-all">
\t\t\t</div>
\t\t</div>
\t\t<div class="t3 ui-widget-content">
\t\t\t<div>
\t\t<label for="er_afterevent">''')
        _v = VFFSL(SL,"tstrings",True)['er_afterevent'] # u"$tstrings['er_afterevent']" on line 66, col 30
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_afterevent']")) # from line 66, col 30.
        write(u''':</label>
\t\t<input type="checkbox" id="er_afterevent" value="">
\t\t\t</div>
\t\t\t<div>
\t\t<label for="er_force">''')
        _v = VFFSL(SL,"tstrings",True)['er_force'] # u"$tstrings['er_force']" on line 70, col 25
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_force']")) # from line 70, col 25.
        write(u''':</label>
\t\t<input type="checkbox" id="er_force" value="">
\t\t\t</div>
\t\t\t<div>
\t\t<label for="er_wakeup">''')
        _v = VFFSL(SL,"tstrings",True)['er_wakeup'] # u"$tstrings['er_wakeup']" on line 74, col 26
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_wakeup']")) # from line 74, col 26.
        write(u''':</label>
\t\t<input type="checkbox" id="er_wakeup" value="">
\t\t\t</div>
\t\t</div>
\t\t<div class="t2 ui-widget-content">
\t\t\t<div>
\t\t<span id="er_hasAT"><label for="er_inherit_autotimer">''')
        _v = VFFSL(SL,"tstrings",True)['er_inherit_autotimer'] # u"$tstrings['er_inherit_autotimer']" on line 80, col 57
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_inherit_autotimer']")) # from line 80, col 57.
        write(u''':</label>
\t\t<input type="checkbox" id="er_inherit_autotimer" value="">
\t\t\t</div>
\t\t\t<div>
\t\t<label for="er_parse_autotimer">''')
        _v = VFFSL(SL,"tstrings",True)['er_parse_autotimer'] # u"$tstrings['er_parse_autotimer']" on line 84, col 35
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_parse_autotimer']")) # from line 84, col 35.
        write(u''':</label>
\t\t<select id="er_parse_autotimer">
\t\t<option value="always">''')
        _v = VFFSL(SL,"tstrings",True)['er_always'] # u"$tstrings['er_always']" on line 86, col 26
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_always']")) # from line 86, col 26.
        write(u'''</option>
\t\t<option value="never" selected="selected">''')
        _v = VFFSL(SL,"tstrings",True)['er_never'] # u"$tstrings['er_never']" on line 87, col 45
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_never']")) # from line 87, col 45.
        write(u'''</option>
\t\t<option value="bg_only">''')
        _v = VFFSL(SL,"tstrings",True)['er_bg_only'] # u"$tstrings['er_bg_only']" on line 88, col 27
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_bg_only']")) # from line 88, col 27.
        write(u'''</option>
\t\t<option value="ask_yes">''')
        _v = VFFSL(SL,"tstrings",True)['er_ask_yes'] # u"$tstrings['er_ask_yes']" on line 89, col 27
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_ask_yes']")) # from line 89, col 27.
        write(u'''</option>
\t\t<option value="ask_no">''')
        _v = VFFSL(SL,"tstrings",True)['er_ask_no'] # u"$tstrings['er_ask_no']" on line 90, col 26
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_ask_no']")) # from line 90, col 26.
        write(u'''</option>
\t\t</select>
\t\t\t</div>
\t\t</div>
\t\t<br>
\t\t<label for="bouquets">''')
        _v = VFFSL(SL,"tstrings",True)['bouquets'] # u"$tstrings['bouquets']" on line 95, col 25
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['bouquets']")) # from line 95, col 25.
        write(u''':</label>
\t\t<br>
\t\t<select data-placeholder="''')
        _v = VFFSL(SL,"tstrings",True)['at_select_bouquets'] # u"$tstrings['at_select_bouquets']" on line 97, col 29
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['at_select_bouquets']")) # from line 97, col 29.
        write(u'''" id="bouquets" class="bq_select_box" multiple tabindex="16">
\t\t</select>
\t\t<br>
\t\t<label for="channels">''')
        _v = VFFSL(SL,"tstrings",True)['at_channels'] # u"$tstrings['at_channels']" on line 100, col 25
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['at_channels']")) # from line 100, col 25.
        write(u''':</label>
\t\t<br>
\t\t<select data-placeholder="''')
        _v = VFFSL(SL,"tstrings",True)['at_select_channels'] # u"$tstrings['at_select_channels']" on line 102, col 29
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['at_select_channels']")) # from line 102, col 29.
        write(u'''" id="channels" class="ch_select_box" multiple tabindex="16">
\t\t</select>
\t\t<br>
\t\t<br>
\t</fieldset>
\t</form>
\t<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
\t<div id="actions">
\t<button id="epgrbutton0">''')
        _v = VFFSL(SL,"tstrings",True)['reload'] # u"$tstrings['reload']" on line 110, col 27
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['reload']")) # from line 110, col 27.
        write(u'''</button>
\t<button id="epgrbutton1">''')
        _v = VFFSL(SL,"tstrings",True)['er_save'] # u"$tstrings['er_save']" on line 111, col 27
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_save']")) # from line 111, col 27.
        write(u'''</button>
\t<button id="epgrbutton2">''')
        _v = VFFSL(SL,"tstrings",True)['er_refresh'] # u"$tstrings['er_refresh']" on line 112, col 27
        if _v is not None: write(_filter(_v, rawExpr=u"$tstrings['er_refresh']")) # from line 112, col 27.
        write(u'''</button>
\t</div></div>

\t<div id="statuscont" style="display:none;margin-top:10px;">
\t<div id="statusbox" class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> 
\t\t<p>
\t\t\t<span id="statusicon" class="ui-icon ui-icon-alert" style="margin-right: .3em;"></span>
\t\t\t<span id="statustext"></span>
\t\t</p>
\t</div>
\t</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
''')
        if VFFSL(SL,"showiptvchannelsinselection",True): # generated from line 128, col 1
            write(u'''var EPGRnoiptv=false;
''')
        else: # generated from line 130, col 1
            write(u'''var EPGRnoiptv=true;
''')
        write(u'''</script>
<script type="text/javascript" src="js/epgr.min.js?v1.6"></script>
<link rel="stylesheet" type="text/css" href="css/chosen.min.css" />
''')
        _filter = self._CHEETAH__currentFilter = _orig_filter_13544896
        
        ########################################
        ## 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()


