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...
Allow section header to be omitted by specifying "NOTITLE" as the section title.
(cherry picked from commit 9ce54773be5e02235e3be7d2b970f61fbb27ba86)
Review license / copyright on all files (final round)
Review license / copyright on all files (1st round)
Feature #6388 custom GUI preference settings per user
Remove a-f from IPv4 address pattern
It seems to me that a through f should not be part of the pattern for the "V4" case.(cherry picked from commit 1f49dd8a3a49b724ded5840c1db6c168ed466aae)
Fix Bug #6394 - Incorrect Output of Translation
Apparently gettext() does not behave correctly when passed an empty string, this commit ensures gettext() is called only with non-empty strings
(cherry picked from commit 6ae99aba5cab12440d88dd9ddaa6535c3b9b5d82)
Fixed #6498 by providing new address type argument to Form_IpAddress(). In this case it is specified as "V6".
(cherry picked from commit 3e4adb7139b4cddbb06a2aba7e0727d1762b35ee)
Reduce maximum length of string to gettext()
This limit is set at 4096 on PHP 5.6: http://lxr.php.net/xref/PHP_5_6/ext/gettext/gettext.c#139
Bug report on forum: https://forum.pfsense.org/index.php?topic=110088.0
(cherry picked from commit 95f46512d9410b38b23d7778cec0bf8610e448cf)
Experimentally fixed #6327
(cherry picked from commit 54fc9503ff550d04d1253c41c1fd49da1b64c07e)
Translate button text
Translate the default submit button text
Note: This will cause a problem for some code that does comparisons expecting this text to be exactly the string 'Save'. If the user has selected a different language then the button text will be translated and thus will be some different text....
Make fa-save the default button icon for 'Save' on all forms. Ticket #5965
Adding {} to if statement.
Form Group - Empty Title GetText
Don't call gettext with an empty title.
There are undoubtedly other places that a check should be done before passing a variable only to a gettext call.
Fixes use case of form group class without a title from passing empty var to gettext....
classes/Form/Textarea.class.php, setNoWrap, make it work properly on FireFox and Chromium
Put this htmlspecialchars back, I found a better workaround for the inconsistent handling of checkboxes in packages.
Fix inconsistencies in Form_Input
renamed get_type to getTypefix capitalisation in getTagName
Don't run the checkbox label through htmlspecialchars, it breaks several packages.
Don't automatically run strings that are too long through gettext here.
Change method name to setIsRequired() to match other similar methods
Added new method setRequired() (shortcut for setAttribute("required", true) )
HTML Compliance - Form Button - HRef
The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.The <a> name attribute is not supported in HTML5. Use the id attribute instead.
Correct "noWrap" in text areas. (Function is not actually used by anyone, but it might as well work just in case.
Final updates in support of hidden passwords
Don't display dummy password if configured pwd is empty
Experimental: Fixed #5693Added new functionality to PHP classes, and used it ONLY in system_advanced_notifications.php -> smtp password
Move width:auto style to textarea handler in pkg_edit.php
Merge pull request #2316 from phil-davis/patch-3
Merge pull request #2295 from NOYB/HTML_Compliance_-_Form_Input_-_Placeholder
HTML Compliance - Form Select 3rd try
This is a combined version of:https://github.com/pfsense/pfsense/pull/2310https://github.com/pfsense/pfsense/pull/2315
Default textarea width to 60 cols.Use setCols() to override
Adds style="width: auto;" attribute to textareas to allow the "cols" attribute to take effect. Required bu pkg_edit.php and by wizards
Reverts change to Form_Selector which was breaking selectors with blank options
Added support for rows, cols and wrap to Forms_Textarea and to pkg_edit.php
Merge pull request #2298 from NOYB/WebGUI_Left_Column_Labels_Hyper
HTML Compliance - Form Group - Label For
The for attribute of the label element must refer to a non-hidden form control.
WebGUI Left Column Labels Hyper
Touch Screen Usability Annoyancehttps://forum.pfsense.org/index.php?topic=104135.0
Clicking the labels in the left column selects/activates the first item. This is the perfectly natural place for scrolling with thumb.
No big problem really for input fields, but check boxes and buttons are inadvertently selected/toggled resulting in unintended configuration changes....
HTML Compliance - Form Input - Placeholder
Attribute placeholder not allowed on element select at this point.Attribute placeholder is only allowed when the input type is email, number, password, search, tel, text, or url.
HTML Compliance - Form Select
Element option without attribute label must not be empty.
Applying htmlspecialchars on form action attribute causes ampersands to multiply, and also breaks multi-parameter query strings that are delimited with ampersands.
Automatic panel collapse defines moved to jquery/pfSenseHelpsers.jsdefine(COLLAPSIBLE, 0x08);define(SEC_CLOSED, 0x04);define(SEC_OPEN, 0x00);
Merge pull request #2217 from NOYB/HTML_Compliance_-_Collapsible_Form_Section_HREF
Merge pull request #2216 from NOYB/HTML_Compliance_-_Checkbox_Display_As_Radio_Unique_ID
HTML Compliance - Collapsible Form Section HREF
Bad value for attribute href on element a: Illegal character in fragment: not a URL code point.
<a data-toggle="collapse" href="#<id> .panel-body">Syntax of URL:Any URL. For example: /hello, #canvas, or http://example.org/. Characters should be represented in NFC and spaces should be escaped as %20....
HTML Compliance - Checkbox Display As Radio Unique ID
Ensure checkbox display as raido has unique id.Allow an id to be passed in displayAsRadio() as argument0.If no argument is passed, construct id as name_value:uniqid.
Previous behavior was id = name. So all the radio buttons of the set had same id.
HTML Compliance - Form Action Attribute
Fix Empty Form Action Attribute Violation
An empty form action attribute is an HTML4 and HTML5 specification violation.
http://www.w3.org/TR/html5/forms.html#attr-fs-action"The action and formaction content attributes, if specified, must have a value that is a valid non-empty URL potentially surrounded by spaces."...
Revise collapsible section behavior to use defines (COLLAPSIBLE, SEC_OPEN, SEC_CLOSED)
Spelling
Further changes to Section.class.php and to diag_logs_filter.phpExperimental section collapse
Form_Section() now accepts up to 4 arguments: Form_section(title, id, collapsable, initiall_collapsed)
collapsable = true specifies that the panel should be collapsable and should have a plus/minus icon in the title bar to allow that. Defaults to false...
Add full classpath to autoloader so that packages can run from their own directories.
Experimental changes to Form_Section() to allow the panel to be made collapsable in the same way that dashboard widgets are.Currently used on diag_logs_filter.php ONLY
Update Form_Input flass
Added use of class autoloading (GUI stuff only)
Any GUI script that loads the guiconfig.inc file will have access tothe autoloader.
add attribute 'id' for the Form_Section
Allow fa icons to be embedded in Form_Button class buttons
Initial conversion of the file. Most functions completed and tested, but more testing remains
Fixed #5121Obscure PHP issue with mixed variable types.
Revised all pages with autocomplete to accommodate host names in validation and change port inputs to 'text'
Fixed Modal class issuesFInished interfaces.php (probably)Fixed notices error in head.inc
Fixed modal.class.php so that modal forms now workinterface.php changes still WIP
Fixed #5102javascript revised to accommodate VPN masks
Fixed #5102Provided new method addVPNMask() that creates a mask selector including '0'
Merge branch 'master' into bootstrap
Move main pfSense content to src/