mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-09-28 04:59:04 +00:00
Minor clean up to submit weblink form
This commit is contained in:
parent
70bb539931
commit
98e0ee2bed
@ -32,7 +32,7 @@
|
|||||||
name="alias"
|
name="alias"
|
||||||
type="text"
|
type="text"
|
||||||
label="JFIELD_ALIAS_LABEL"
|
label="JFIELD_ALIAS_LABEL"
|
||||||
description="COM_WEBLINKS_FIELD_ALIAS_DESC"
|
description="JFIELD_ALIAS_DESC"
|
||||||
hint="JFIELD_ALIAS_PLACEHOLDER"
|
hint="JFIELD_ALIAS_PLACEHOLDER"
|
||||||
size="45"
|
size="45"
|
||||||
/>
|
/>
|
||||||
@ -93,8 +93,6 @@
|
|||||||
name="tags"
|
name="tags"
|
||||||
type="tag"
|
type="tag"
|
||||||
label="JTAG"
|
label="JTAG"
|
||||||
description="JTAG_DESC"
|
|
||||||
class="inputbox"
|
|
||||||
multiple="true"
|
multiple="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ use Joomla\CMS\Router\Route;
|
|||||||
|
|
||||||
HTMLHelper::_('behavior.keepalive');
|
HTMLHelper::_('behavior.keepalive');
|
||||||
HTMLHelper::_('behavior.formvalidator');
|
HTMLHelper::_('behavior.formvalidator');
|
||||||
// HTMLHelper::_('behavior.modal', 'a.modal_jform_contenthistory');
|
|
||||||
|
|
||||||
$captchaEnabled = false;
|
$captchaEnabled = false;
|
||||||
$captchaSet = $this->params->get('captcha', Factory::getApplication()->get('captcha', '0'));
|
$captchaSet = $this->params->get('captcha', Factory::getApplication()->get('captcha', '0'));
|
||||||
@ -33,21 +32,13 @@ foreach (JPluginHelper::getPlugin('captcha') as $plugin)
|
|||||||
// Create shortcut to parameters.
|
// Create shortcut to parameters.
|
||||||
$params = $this->state->get('params');
|
$params = $this->state->get('params');
|
||||||
?>
|
?>
|
||||||
|
<div class="edit item-page<?php echo $this->pageclass_sfx; ?>">
|
||||||
<script type="text/javascript">
|
|
||||||
Joomla.submitbutton = function(task)
|
|
||||||
{
|
|
||||||
if (task == 'weblink.cancel' || document.formvalidator.isValid(document.getElementById('adminForm')))
|
|
||||||
{
|
|
||||||
Joomla.submitform(task);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<div class="edit<?php echo $this->pageclass_sfx; ?>">
|
|
||||||
<?php if ($this->params->get('show_page_heading')) : ?>
|
<?php if ($this->params->get('show_page_heading')) : ?>
|
||||||
<h1>
|
<div class="page-header">
|
||||||
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
<h1>
|
||||||
</h1>
|
<?php echo $this->escape($this->params->get('page_heading')); ?>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<form action="<?php echo Route::_('index.php?option=com_weblinks&view=form&w_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
|
<form action="<?php echo Route::_('index.php?option=com_weblinks&view=form&w_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
|
||||||
|
|
||||||
@ -75,23 +66,19 @@ $params = $this->state->get('params');
|
|||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="btn-toolbar">
|
<div class="mb-2">
|
||||||
<div class="btn-group">
|
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('weblink.save')">
|
||||||
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('weblink.save')">
|
<span class="icon-check" aria-hidden="true"></span>
|
||||||
<span class="icon-ok"></span> <?php echo Text::_('JSAVE') ?>
|
<?php echo Text::_('JSAVE'); ?>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
<button type="button" class="btn btn-danger" onclick="Joomla.submitbutton('weblink.cancel')">
|
||||||
<div class="btn-group">
|
<span class="icon-times" aria-hidden="true"></span>
|
||||||
<button type="button" class="btn" onclick="Joomla.submitbutton('weblink.cancel')">
|
<?php echo Text::_('JCANCEL'); ?>
|
||||||
<span class="icon-cancel"></span> <?php echo Text::_('JCANCEL') ?>
|
</button>
|
||||||
</button>
|
<?php if ($this->params->get('save_history', 0) && $this->item->id) : ?>
|
||||||
</div>
|
<?php echo $this->form->getInput('contenthistory'); ?>
|
||||||
<?php if ($params->get('save_history', 0)) : ?>
|
|
||||||
<div class="btn-group">
|
|
||||||
<?php echo $this->form->getInput('contenthistory'); ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
|
<input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
|
||||||
<input type="hidden" name="task" value="" />
|
<input type="hidden" name="task" value="" />
|
||||||
|
Loading…
Reference in New Issue
Block a user