https://bugzilla.wikimedia.org/show_bug.cgi?id=38599
Web browser: ---
Bug #: 38599
Summary: adding HTML5 input fields
Product: MediaWiki extensions
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: SemanticForms
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
I tried to create an Extension to get use of new HTML5 fields.
https://github.com/DaSchTour/SemanticFormsHTML5
But I failed totaly because the fields I created where not displayed.
Even when trying something simple like described here
http://www.mediawiki.org/wiki/Extension:Semantic_Forms/Developers%27_documentation
It did not work.
For example like this
global $sfgFormPrinter;
$sfgFormPrinter->setInputTypeHook('html5', 'sfHtml5', array());
function sfHtml5($cur_value, $input_name, $is_mandatory, $is_disabled,
$other_args) {
global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
if ( array_key_exists( 'class', $other_args ) ) {
$className .= ' ' . $other_args['class'];
}
$input_id = "input_$sfgFieldNum";
$disabled_text = ( $is_disabled ) ? 'disabled' : '';
$html5input=$field_args['html5'];
$html = <<<END
<input id="$input_id" name="{$input_name}[value]" type="$html5input"
class="$className" tabindex="$sfgTabIndex" $checked_str $disabled_text/>
END;
return $html;
}
It only should enter the input of tje html5 attribut into the type field. I
only get an non-type-error.
It would be really great if someone could help with this. Would be nice to get
the possibility for testing HTML5 input types. This way some of the jQuery
workarounds could get obsolete in future.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l