Commits

Guido Draheim committed c8b9140

takeover

Comments (0)

Files changed (2)

src/dvbcronrecording/channelsconf.py

             data['messages'] = [ "" ]
             data["adapter"] = req.args.get("adapter", None)
             data['adapterlist'] = self._adapter_list(req)
+            data['polaritylist'] = polaritylist
             data["_pagenum"] = req.args.get("_pagenum", "0")
             data["_pagesize"] = req.args.get("_pagesize", "10")
             data['datalist'] = Paginator(channels, int(data["_pagenum"]), int(data["_pagesize"]))

src/dvbcronrecording/templates/channelsconf_take.html

   <div class="actionlist">
           <form method="get" action="${href.recording('channelsconf/list')}" class="actionform">
             <select name="adapter">
-                <option py:for="adapter in sorted(adapterlist)" 
-                        value="${adapter}">
-                        ${adapter}
+                <option py:for="adapter1 in sorted(adapterlist)" 
+                        selected="${adapter1 == adapter or None}" 
+                        value="${adapter1}">
+                        ${adapter1}
                 </option>
             </select>
             <input type="submit" value="${_('channel.conf list')}" class="actionbutton"></input>
           </form>
           <form method="get" action="${href.recording('channelsconf/edit')}" class="actionform">
             <select name="adapter">
-                <option py:for="adapter in sorted(adapterlist)" 
-                        value="${adapter}">
-                        ${adapter}
+                <option py:for="adapter1 in sorted(adapterlist)" 
+                        selected="${adapter1 == adapter or None}" 
+                        value="${adapter1}">
+                        ${adapter1}
                 </option>
             </select>
             <input type="submit" value="${_('channels.conf edit')}" class="actionbutton"></input>
     <tr class="status${item.status}">
       <td class="id">${item.id}<input type="hidden" name="id" value="${item.id}"></input></td>
       <td class="adapter"><select readonly="readonly" name="adapter">
-                <option py:for="adapter in sorted(adapterlist)" 
-                        value="${adapter}">
-                        ${adapter}
+                <option py:for="adapter1 in sorted(adapterlist)" 
+                        selected="${adapter1 == item.adapter or None}" 
+                        value="${adapter1}">
+                        ${adapter1}
                 </option>
             </select>
       </td>      
          <td colspan="2">
          <label for="channelname">${_('channelname')}: </label>
          </td>
-         <td colspan="6" class="name" py:with="channelname = string.lower(item.title)">
+         <td colspan="5" class="name" py:with="channelname = string.lower(item.title)">
              <input type="text" name="channelname" value="${channelname}"></input>
          </td>
-      <td class="action">
+      <td class="action" colspan="3">
         <input type="submit" value="${_('takeover')}" class="actionbutton" />
       </td>
     </tr>