Project

General

Profile

« Previous | Next » 

Revision 21915c63

Added by NewEraCracker almost 9 years ago

Some tweaks to improve alignment in table with checkbox

1) If a checkbox does not have a description (even if it is empty), layout will be broken as checkbox won't be aligned correctly

2) UPnP checkbox looks better with description instead of help

This commit fixes the two issues

(cherry picked from commit 1a8e5f2f67fdc18080eeac47dc4ed0bdfacc66b9)

View differences:

src/usr/local/pkg/miniupnpd.xml
26 26
			<fieldname>enable</fieldname>
27 27
			<type>checkbox</type>
28 28
			<enablefields>enable_upnp,enable_natpmp,ext_iface,iface_array,download,upload,overridewanip,upnpqueue,logpackets,sysuptime,permdefault</enablefields>
29
			<sethelp>Enable UPnP &amp; NAT-PMP</sethelp>
29
			<description>Enable UPnP &amp; NAT-PMP</description>
30 30
		</field>
31 31
		<field>
32 32
			<fielddescr>UPnP Port Mapping</fielddescr>
src/usr/local/www/classes/Form/Checkbox.class.php
89 89
		$input = parent::_getInput();
90 90

  
91 91
		if (empty($this->_description))
92
			return $input;
92
			return '<label class="chkboxlbl">'. $input .'</label>';
93 93

  
94 94
		return '<label class="chkboxlbl">'. $input .' '. htmlspecialchars(gettext($this->_description)) .'</label>';
95 95
	}

Also available in: Unified diff