Skip to content

Commit

Permalink
[imp] moved form fields markup to layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Himangi authored and Himangi committed Jun 16, 2014
1 parent a895bfc commit 964cafd
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
echo '<input type="checkbox" name="' . $name . '" id="' . $id . '" value="'
. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $class . $checked . $disabled . $onclick . $onchange
. $required . $autofocus . ' />';

1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/checkboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
JHtml::_('script', 'system/html5fallback.js', false, true);

echo implode($html);

1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/color.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
echo '<input type="text" name="' . $name . '" id="' . $id . '"' . ' value="'
. htmlspecialchars($color, ENT_COMPAT, 'UTF-8') . '"' . $hint . $class . $position . $control
. $readonly . $disabled . $required . $onchange . $autocomplete . $autofocus . '/>';

4 changes: 1 addition & 3 deletions layouts/libraries/joomla/form/fields/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@
JHtml::_('script', 'system/html5fallback.js', false, true);

echo '<input type="email" name="' . $name . '"' . $class . ' id="' . $id . '" value="'
. htmlspecialchars(JStringPunycode::emailToUTF8($value), ENT_COMPAT, 'UTF-8') . '"' . $spellcheck . $size . $disabled . $readonly
. $onchange . $autocomplete . $multiple . $maxlength . $hint . $required . $autofocus . ' />';

. htmlspecialchars(JStringPunycode::emailToUTF8($value), ENT_COMPAT, 'UTF-8') . '"' . $spellcheck . $size . $disabled . $readonly . $onchange . $autocomplete . $multiple . $maxlength . $hint . $required . $autofocus . ' />';
?>
1 change: 0 additions & 1 deletion layouts/libraries/joomla/form/fields/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
echo '<input type="file" name="' . $name . '" id="' . $id . '" value=""' . $accept
. $disabled . $class . $size . $onchange . $required . $autofocus . $multiple . ' />';


2 changes: 0 additions & 2 deletions layouts/libraries/joomla/form/fields/number.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@
echo '<input type="number" name="' . $name . '" id="' . $id . '"' . ' value="'
. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $class . $size . $disabled . $readonly
. $hint . $onchange . $max . $step . $min . $required . $autocomplete . $autofocus . ' />';


5 changes: 3 additions & 2 deletions layouts/libraries/joomla/form/fields/password.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
JHtml::_('script', 'system/html5fallback.js', false, true);

echo '<input type="password" name="' . $name . '" id="' . $id . '"' .
' value="' . htmlspecialchars($tvalue, ENT_COMPAT, 'UTF-8') . '"' . $hint . $autocomplete .
$class . $readonly . $disabled . $size . $maxLength . $required . $autofocus . ' />';
' value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $hint . $autocomplete .
$class . $readonly . $disabled . $size . $maxlength . $required . $autofocus . ' />';

1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/range.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
echo '<input type="range" name="' . $name . '" id="' . $id . '"' . ' value="'
. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $class . $disabled . $readonly
. $onchange . $max . $step . $min . $autofocus . ' />';

1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/tel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
echo '<input type="tel" name="' . $name . '"' . $class . ' id="' . $id . '" value="'
. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $size . $disabled . $readonly
. $hint . $autocomplete . $autofocus . $spellcheck . $onchange . $maxlength . $required . ' />';

1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
JHtml::_('script', 'system/html5fallback.js', false, true);

echo implode($html);

1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
echo '<textarea name="' . $name . '" id="' . $id . '"' . $columns . $rows . $class
. $hint . $disabled . $readonly . $onchange . $onclick . $required . $autocomplete . $autofocus . $spellcheck . ' >'
. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '</textarea>';

1 change: 1 addition & 0 deletions layouts/libraries/joomla/form/fields/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
echo '<input type="url" name="' . $name . '"' . $class . ' id="' . $id . '" value="'
. htmlspecialchars(JStringPunycode::urlToUTF8($value), ENT_COMPAT, 'UTF-8') . '"' . $size . $disabled . $readonly
. $hint . $autocomplete . $autofocus . $spellcheck . $onchange . $maxlength . $required . ' />';

1 change: 1 addition & 0 deletions libraries/joomla/form/fields/checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,6 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.checkbox', $displayData);

}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/checkboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,6 @@ protected function getOptions()
reset($options);

return $options;

}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/color.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.color', $displayData);

}
}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.email', $displayData);

}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,6 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.file', $displayData);

}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/number.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,6 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.number', $displayData);

}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/password.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,6 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.password', $displayData);

}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/range.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.range', $displayData);

}
}
3 changes: 2 additions & 1 deletion libraries/joomla/form/fields/tel.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@ protected function getInput()
'readonly' => $readonly,
'hint' => $hint,
'autocomplete' => $autocomplete,
'autofocus' => $autofocus
'autofocus' => $autofocus,
'spellcheck' => $spellcheck,
'onchange' => $onchange,
'maxlength' => $maxLength,
'required' => $required
);

return JLayoutHelper::render('libraries.joomla.form.fields.tel', $displayData);

}
}
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.text', $displayData);

}

/**
Expand Down
1 change: 1 addition & 0 deletions libraries/joomla/form/fields/textarea.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,6 @@ protected function getInput()
);

return JLayoutHelper::render('libraries.joomla.form.fields.textarea', $displayData);

}
}
3 changes: 2 additions & 1 deletion libraries/joomla/form/fields/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ protected function getInput()
'readonly' => $readonly,
'hint' => $hint,
'autocomplete' => $autocomplete,
'autofocus' => $autofocus
'autofocus' => $autofocus,
'spellcheck' => $spellcheck,
'onchange' => $onchange,
'maxlength' => $maxLength,
'required' => $required
);

return JLayoutHelper::render('libraries.joomla.form.fields.url', $displayData);

}
}

1 comment on commit 964cafd

@himangi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes against issues joomla-projects#26 to joomla-projects#38. The functionality for joomla-projects#29, email function, is checked with the committed files. Rest functions will need to be tested.

Please sign in to comment.