Skip to content

Commit

Permalink
Uncaught TypeError: document.id is not a function at Object.Joomla.su…
Browse files Browse the repository at this point in the history
…bmitbutton
  • Loading branch information
exstreme committed Sep 19, 2021
1 parent 8ce8b50 commit faa7f0b
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions administrator/models/fields/smileyimage.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ protected function getInput()
if (!self::$initialised) {
$script = array();
$script[] = ' function JCommentsSmileyRefreshPreview(id) {';
$script[] = ' var value = document.id(id).value;';
$script[] = ' var img = document.id(id + "_preview");';
$script[] = ' var value = document.getElementById(id).value;';
$script[] = ' var img = document.getElementById(id + "_preview");';
$script[] = ' if (img) {';
$script[] = ' if (value) {';
$script[] = ' img.src = "' . JURI::root() . $livePath . '" + value;';
$script[] = ' document.id(id + "_preview_empty").setStyle("display", "none");';
$script[] = ' document.id(id + "_preview_img").setStyle("display", "");';
$script[] = ' document.getElementById(id + "_preview_empty").setStyle("display", "none");';
$script[] = ' document.getElementById(id + "_preview_img").setStyle("display", "");';
$script[] = ' } else { ';
$script[] = ' img.src = ""';
$script[] = ' document.id(id + "_preview_empty").setStyle("display", "");';
$script[] = ' document.id(id + "_preview_img").setStyle("display", "none");';
$script[] = ' document.getElementById(id + "_preview_empty").setStyle("display", "");';
$script[] = ' document.getElementById(id + "_preview_img").setStyle("display", "none");';
$script[] = ' } ';
$script[] = ' } ';
$script[] = ' }';
Expand Down
2 changes: 1 addition & 1 deletion administrator/views/blacklist/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'blacklist.cancel' || document.formvalidator.isValid(document.id('blacklist-form'))) {
if (task == 'blacklist.cancel' || document.formvalidator.isValid(document.getElementById('blacklist-form'))) {
Joomla.submitform(task, document.getElementById('blacklist-form'));
}
}
Expand Down
4 changes: 2 additions & 2 deletions administrator/views/blacklists/tmpl/default_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="btn-group hidden-phone">
<button class="btn tip hasTooltip" type="submit" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.id('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
Expand Down Expand Up @@ -54,7 +54,7 @@
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('A_FILTER'); ?>:</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $filterSearch; ?>" title="<?php echo JText::_('A_FILTER'); ?>"/>
<button class="inputbox" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="inputbox" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button class="inputbox" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php if (!empty($this->filter) != '') : ?>
<div class="filter-select fltrt">
Expand Down
2 changes: 1 addition & 1 deletion administrator/views/comment/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
?>
<script type="text/javascript">
Joomla.submitbutton = function (task) {
if (task == 'blacklist.cancel' || document.formvalidator.isValid(document.id('comment-form'))) {
if (task == 'blacklist.cancel' || document.formvalidator.isValid(document.getElementById('comment-form'))) {
Joomla.submitform(task, document.getElementById('comment-form'));
}
};
Expand Down
4 changes: 2 additions & 2 deletions administrator/views/comments/tmpl/default_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="btn-group hidden-phone">
<button class="btn tip hasTooltip" type="submit" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.id('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
Expand Down Expand Up @@ -54,7 +54,7 @@
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('A_FILTER'); ?>:</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $filterSearch; ?>" title="<?php echo JText::_('A_FILTER'); ?>"/>
<button class="inputbox" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="inputbox" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button class="inputbox" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php if (!empty($this->filter) != '') : ?>
<div class="filter-select fltrt">
Expand Down
2 changes: 1 addition & 1 deletion administrator/views/custombbcode/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
?>
<script type="text/javascript">
Joomla.submitbutton = function (task) {
if (task == 'custombbcode.cancel' || document.formvalidator.isValid(document.id('custombbcode-form'))) {
if (task == 'custombbcode.cancel' || document.formvalidator.isValid(document.getElementById('custombbcode-form'))) {
Joomla.submitform(task, document.getElementById('custombbcode-form'));
}
}
Expand Down
4 changes: 2 additions & 2 deletions administrator/views/custombbcodes/tmpl/default_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="btn-group hidden-phone">
<button class="btn tip hasTooltip" type="submit" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.id('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
Expand Down Expand Up @@ -54,7 +54,7 @@
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('A_FILTER'); ?>:</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $filterSearch; ?>" title="<?php echo JText::_('A_FILTER'); ?>"/>
<button class="inputbox" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="inputbox" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button class="inputbox" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php if (!empty($this->filter) != '') : ?>
<div class="filter-select fltrt">
Expand Down
4 changes: 2 additions & 2 deletions administrator/views/mailq/tmpl/default_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="btn-group hidden-phone">
<button class="btn tip hasTooltip" type="submit" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.id('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
Expand Down Expand Up @@ -54,7 +54,7 @@
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('A_FILTER'); ?>:</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $filterSearch; ?>" title="<?php echo JText::_('A_FILTER'); ?>"/>
<button class="inputbox" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="inputbox" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button class="inputbox" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php if (!empty($this->filter) != '') : ?>
<div class="filter-select fltrt">
Expand Down
2 changes: 1 addition & 1 deletion administrator/views/settings/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function toggleListLayout(val) {
Joomla.submitbutton = function (task) {
if (task == 'settings.cancel') {
Joomla.submitform(task, document.getElementById('settings-form'));
} else if (document.formvalidator.isValid(document.id('settings-form'))) {
} else if (document.formvalidator.isValid(document.getElementById('settings-form'))) {
var base64 = '';
try {
var query = [];
Expand Down
2 changes: 1 addition & 1 deletion administrator/views/smiley/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'smiley.cancel' || document.formvalidator.isValid(document.id('smiley-form'))) {
if (task == 'smiley.cancel' || document.formvalidator.isValid(document.getElementById('smiley-form'))) {
Joomla.submitform(task, document.getElementById('smiley-form'));
}
}
Expand Down
4 changes: 2 additions & 2 deletions administrator/views/smilies/tmpl/default_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="btn-group hidden-phone">
<button class="btn tip hasTooltip" type="submit" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.id('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
Expand Down Expand Up @@ -54,7 +54,7 @@
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('A_FILTER'); ?>:</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $filterSearch; ?>" title="<?php echo JText::_('A_FILTER'); ?>"/>
<button class="inputbox" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="inputbox" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button class="inputbox" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php if (!empty($this->filter) != '') : ?>
<div class="filter-select fltrt">
Expand Down
2 changes: 1 addition & 1 deletion administrator/views/subscription/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'subscription.cancel' || document.formvalidator.isValid(document.id('subscription-form'))) {
if (task == 'subscription.cancel' || document.formvalidator.isValid(document.getElementById('subscription-form'))) {
Joomla.submitform(task, document.getElementById('subscription-form'));
}
}
Expand Down
4 changes: 2 additions & 2 deletions administrator/views/subscriptions/tmpl/default_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div class="btn-group hidden-phone">
<button class="btn tip hasTooltip" type="submit" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.id('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
<button class="btn tip hasTooltip" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
Expand Down Expand Up @@ -54,7 +54,7 @@
<label class="filter-search-lbl" for="filter_search"><?php echo JText::_('A_FILTER'); ?>:</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $filterSearch; ?>" title="<?php echo JText::_('A_FILTER'); ?>"/>
<button class="inputbox" type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
<button class="inputbox" type="button" onclick="document.id('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button class="inputbox" type="button" onclick="document.getElementById('filter_search').value='';this.form.submit();"><?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php if (!empty($this->filter) != '') : ?>
<div class="filter-select fltrt">
Expand Down

0 comments on commit faa7f0b

Please sign in to comment.