Ticket #10753: set_channel.php.patch

File set_channel.php.patch, 5.0 KB (added by mastixmc@…, 7 years ago)

Patch for PHP file (set_channel.php)

  • modules/tv/tmpl/default/set_channels.php

    diff --git a/modules/tv/tmpl/default/set_channels.php b/modules/tv/tmpl/default/set_channels.php
    index f067fcc..20d9fdd 100644
    a b  
    99 *
    1010/**/
    1111?>
    12 <form class="form" method="post" action="<?php echo form_action ?>">
     12<script language="javascript">
     13checktoggle = false;
    1314
     15function checkedAll(checkboxfunction) {
     16    var checkboxes = new Array();
     17    checkboxes = document.getElementById('set_channel_form').getElementsByTagName('input');
     18    if (checktoggle == false) {
     19        checktoggle = true
     20    } else {
     21        checktoggle = false
     22    }
     23    for (var i = 0; i < checkboxes.length; i++) {
     24        if (checkboxes[i].type == 'checkbox' && checkboxes[i].id.indexOf(checkboxfunction) == 0) {
     25            checkboxes[i].checked = checktoggle;
     26        }
     27    }
     28}
     29</script>
     30<form id="set_channel_form" name="set_channel_form" class="form" method="post" action="<?php echo form_action ?>">
    1431<table border="0" cellpadding="4" cellspacing="2" class="list small">
    1532<tr class="menu" align="center">
    1633    <td width="4%"><?php  echo t('delete')        ?></td>
     
    3047    <td width="5%"><?php  echo t('commfree')      ?></td>
    3148    <td width="5%"><?php  echo t('visible')       ?></td>
    3249    <td width="5%"><?php  echo t('useonairguide') ?></td>
     50</tr>
     51<tr class="menu" align="center">
     52    <td width="4%"><input type="checkbox" name="checkall_deleted" onclick="checkedAll('delete');"></td>
     53    <td width="4%">&nbsp;</td>
     54    <td width="4%">&nbsp;</td>
     55    <td width="5%">&nbsp;</td>
     56    <td width="5%">&nbsp;</td>
     57    <td width="5%">&nbsp;</td>
     58    <td width="5%">&nbsp;</td>
     59    <td width="5%">&nbsp;</td>
     60    <td width="5%">&nbsp;</td>
     61    <td width="7%">&nbsp;</td>
     62    <td width="7%">&nbsp;</td>
     63    <td width="7%">&nbsp;</td>
     64    <td width="7%">&nbsp;</td>
     65    <td width="5%">&nbsp;</td>
     66    <td width="5%"><!-- * not needed at the moment* <input id="checkall_comfree" type="checkbox" name="checkall_commfree" onclick="checkedAll('commfree');">-->&nbsp;</td>
     67    <td width="5%"><!-- * not needed at the moment* <input id="checkall_visible"type="checkbox" name="checkall_visible" onclick="checkedAll('visible');" checked>-->&nbsp;</td>
     68    <td width="5%"><!-- * not needed at the moment* <input id="checkall_useonairguide"type="checkbox" name="checkall_useonairguide" onclick="checkedAll('useonairguide');" checked>-->&nbsp;</td>
     69</tr>
    3370</tr><?php
    3471    foreach ($channels as $chanid) {
    3572        $channel =& Channel::find($chanid);
    36 ?><tr class="settings" align="center">
     73?>
     74<tr class="settings" align="center">
    3775    <td><input type="checkbox" name="channel[<?php echo $channel->chanid ?>][delete]" id="delete_<?php echo $channel->chanid ?>" value="true" /></td>
    3876    <td><?php echo html_entities($channel->sourceid) ?></td>
    3977    <td><input type="text" size="5"  name="channel[<?php echo $channel->chanid ?>][xmltvid]"       id="xmltvid_<?php      echo $channel->chanid ?>" value="<?php echo html_entities($channel->xmltvid)      ?>" style="text-align: center" /></td>
     
    4886    <td><input type="text" size="5"  name="channel[<?php echo $channel->chanid ?>][colour]"        id="colour_<?php       echo $channel->chanid ?>" value="<?php echo html_entities($channel->colour)       ?>" style="text-align: center" /></td>
    4987    <td><input type="text" size="5"  name="channel[<?php echo $channel->chanid ?>][hue]"           id="hue_<?php          echo $channel->chanid ?>" value="<?php echo html_entities($channel->hue)          ?>" style="text-align: center" /></td>
    5088    <td><input type="text" size="2"  name="channel[<?php echo $channel->chanid ?>][recpriority]"   id="recpriority_<?php  echo $channel->chanid ?>" value="<?php echo html_entities($channel->recpriority)  ?>" style="text-align: center" /></td>
    51     <td><input type="checkbox"       name="channel[<?php echo $channel->chanid ?>][commfree]"      value="1"<?php if (!empty($channel->commmethod) && $channel->commmethod == -2)      echo ' CHECKED' ?> /></td>
    52     <td><input type="checkbox"       name="channel[<?php echo $channel->chanid ?>][visible]"       value="1"<?php if (!empty($channel->visible))       echo ' CHECKED' ?> /></td>
    53     <td><input type="checkbox"       name="channel[<?php echo $channel->chanid ?>][useonairguide]" value="1"<?php if (!empty($channel->useonairguide)) echo ' CHECKED' ?> /></td>
     89    <td><input type="checkbox"       name="channel[<?php echo $channel->chanid ?>][commfree]"      id="commfree_<?php echo $channel->chanid ?>" value="1"<?php if (!empty($channel->commmethod) && $channel->commmethod == -2)      echo ' CHECKED' ?> /></td>
     90    <td><input type="checkbox"       name="channel[<?php echo $channel->chanid ?>][visible]"       id="visible_<?php echo $channel->chanid ?>" value="1"<?php if (!empty($channel->visible))       echo ' CHECKED' ?> /></td>
     91    <td><input type="checkbox"       name="channel[<?php echo $channel->chanid ?>][useonairguide]" id="useonairguide_<?php echo $channel->chanid ?>" value="1"<?php if (!empty($channel->useonairguide)) echo ' CHECKED' ?> /></td>
    5492</tr><?php
    5593    }
    5694?>