File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -950,3 +950,30 @@ function megatron_megatron_links($variables) {
950950
951951 return $ output ;
952952}
953+
954+ /**
955+ * Implements template_preprocess_textarea().
956+ *
957+ * Hide grippie.
958+ */
959+ function megatron_preprocess_textarea (&$ variables ) {
960+ $ variables ['element ' ]['#resizable ' ] = FALSE ;
961+ }
962+
963+ /**
964+ * Implements theme_form().
965+ *
966+ * Removes the XHTML redundant inner div.
967+ */
968+ function megatron_form ($ variables ) {
969+ $ element = $ variables ['element ' ];
970+ if (isset ($ element ['#action ' ])) {
971+ $ element ['#attributes ' ]['action ' ] = drupal_strip_dangerous_protocols ($ element ['#action ' ]);
972+ }
973+ element_set_attributes ($ element , array ('method ' , 'id ' ));
974+ if (empty ($ element ['#attributes ' ]['accept-charset ' ])) {
975+ $ element ['#attributes ' ]['accept-charset ' ] = "UTF-8 " ;
976+ }
977+
978+ return '<form ' . drupal_attributes ($ element ['#attributes ' ]) . '> ' . $ element ['#children ' ] . '</form> ' ;
979+ }
You can’t perform that action at this time.
0 commit comments