Permalink
Browse files

Merge branch 'master' of https://dextercowley@github.com/joomla/jooml…

…a-cms.git
  • Loading branch information...
2 parents d7ff0af + d1be1e5 commit 313924fed2a8548a261c3b5be0c20127c3735f29 @dextercowley dextercowley committed Nov 13, 2012
Showing with 66 additions and 62 deletions.
  1. +0 −2 administrator/components/com_categories/views/category/tmpl/edit.php
  2. +0 −3 administrator/components/com_contact/views/contact/tmpl/edit.php
  3. +0 −2 administrator/components/com_content/views/article/tmpl/edit.php
  4. +0 −2 administrator/components/com_modules/views/module/tmpl/edit.php
  5. +1 −3 administrator/components/com_newsfeeds/views/newsfeed/tmpl/edit.php
  6. +0 −2 administrator/components/com_templates/views/source/tmpl/edit.php
  7. +1 −4 administrator/components/com_weblinks/views/weblink/tmpl/edit.php
  8. +1 −1 administrator/language/en-GB/en-GB.com_installer.ini
  9. +1 −0 administrator/language/en-GB/en-GB.lib_joomla.ini
  10. +0 −2 administrator/templates/hathor/html/com_categories/category/edit.php
  11. +0 −3 administrator/templates/hathor/html/com_contact/contact/edit.php
  12. +0 −2 administrator/templates/hathor/html/com_content/article/edit.php
  13. +0 −2 administrator/templates/hathor/html/com_modules/module/edit.php
  14. +0 −2 administrator/templates/hathor/html/com_newsfeeds/newsfeed/edit.php
  15. +0 −3 administrator/templates/hathor/html/com_weblinks/weblink/edit.php
  16. +2 −4 components/com_content/views/form/tmpl/edit.php
  17. +0 −3 components/com_weblinks/views/form/tmpl/edit.php
  18. +6 −0 installation/CHANGELOG
  19. +1 −0 language/en-GB/en-GB.lib_joomla.ini
  20. +3 −0 libraries/joomla/html/behavior.php
  21. +5 −1 libraries/joomla/updater/adapters/collection.php
  22. +4 −1 libraries/joomla/updater/adapters/extension.php
  23. +18 −4 libraries/joomla/updater/update.php
  24. +14 −0 media/system/js/validate-uncompressed.js
  25. +1 −7 media/system/js/validate.js
  26. +0 −3 templates/beez3/html/com_weblinks/form/edit.php
  27. +8 −6 templates/protostar/error.php
@@ -29,8 +29,6 @@
if (task == 'category.cancel' || document.formvalidator.isValid(document.id('item-form'))) {
<?php echo $this->form->getField('description')->save(); ?>
Joomla.submitform(task, document.getElementById('item-form'));
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
@@ -22,9 +22,6 @@
<?php echo $this->form->getField('misc')->save(); ?>
Joomla.submitform(task, document.getElementById('contact-form'));
}
- else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
- }
}
</script>
@@ -55,8 +55,6 @@
if (task == 'article.cancel' || document.formvalidator.isValid(document.id('item-form'))) {
<?php echo $this->form->getField('articletext')->save(); ?>
Joomla.submitform(task, document.getElementById('item-form'));
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
@@ -31,8 +31,6 @@
if (self != top) {
window.top.setTimeout('window.parent.SqueezeBox.close()', 1000);
}
- } else {
- alert('".$this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'))."');
}
}";
@@ -21,8 +21,6 @@
{
if (task == 'newsfeed.cancel' || document.formvalidator.isValid(document.id('newsfeed-form'))) {
Joomla.submitform(task, document.getElementById('newsfeed-form'));
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
@@ -230,7 +228,7 @@
</div>
</div>
</fieldset>
- </div>
+ </div>
<!-- End Sidebar -->
</div>
</form>
@@ -20,8 +20,6 @@
if (task == 'source.cancel' || document.formvalidator.isValid(document.id('source-form'))) {
<?php echo $this->form->getField('source')->save(); ?>
Joomla.submitform(task, document.getElementById('source-form'));
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
@@ -22,9 +22,6 @@
<?php echo $this->form->getField('description')->save(); ?>
Joomla.submitform(task, document.getElementById('weblink-form'));
}
- else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
- }
}
</script>
@@ -151,7 +148,7 @@
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
- <!-- End Weblinks -->
+ <!-- End Weblinks -->
<!-- Begin Sidebar -->
<div class="span2">
<h4><?php echo JText::_('JDETAILS');?></h4>
@@ -84,7 +84,7 @@ COM_INSTALLER_MSG_INSTALL_WARNINSTALLUPLOADERROR="There was an error uploading t
COM_INSTALLER_MSG_INSTALL_WARNINSTALLZLIB="The installer cannot continue until Zlib is installed."
COM_INSTALLER_MSG_LANGUAGES_CANT_FIND_REMOTE_MANIFEST="The installer can't get the url to the XML manifest file of the %s language."
COM_INSTALLER_MSG_LANGUAGES_CANT_FIND_REMOTE_PACKAGE="The installer can't get the url to the remote %s language."
-COM_INSTALLER_MSG_LANGUAGES_TRY_LATER="Try again later or <a href="_QQ_"http://community.joomla.org/translations/joomla-16-translations.html"_QQ_">contact the language team coordinator</a>"
+COM_INSTALLER_MSG_LANGUAGES_TRY_LATER="Try again later or <a href="_QQ_"http://community.joomla.org/translations/joomla-3-translations.html"_QQ_">contact the language team coordinator</a>"
COM_INSTALLER_MSG_MANAGE_NOEXTENSION="There are no extensions installed matching your query"
COM_INSTALLER_MSG_UPDATE_ERROR="Error updating %s."
COM_INSTALLER_MSG_UPDATE_NODESC="No description available for this item."
@@ -282,6 +282,7 @@ JLIB_FORM_ERROR_FIELDS_GROUPEDLIST_ELEMENT_NAME="Unknown element type: %s"
JLIB_FORM_ERROR_NO_DATA="No data"
JLIB_FORM_ERROR_VALIDATE_FIELD="Invalid xml field"
JLIB_FORM_ERROR_XML_FILE_DID_NOT_LOAD="XML file did not load"
+JLIB_FORM_FIELD_INVALID="Invalid field:&#160";
JLIB_FORM_INVALID_FORM_OBJECT="Invalid Form Object: :%s"
JLIB_FORM_INVALID_FORM_RULE="Invalid Form Rule: :%s"
JLIB_FORM_MEDIA_PREVIEW_ALT="Selected image"
@@ -26,8 +26,6 @@
if (task == 'category.cancel' || document.formvalidator.isValid(document.id('item-form'))) {
<?php echo $this->form->getField('description')->save(); ?>
Joomla.submitform(task, document.getElementById('item-form'));
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
@@ -21,9 +21,6 @@
<?php echo $this->form->getField('misc')->save(); ?>
Joomla.submitform(task, document.getElementById('contact-form'));
}
- else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
- }
}
</script>
@@ -51,8 +51,6 @@
if (task == 'article.cancel' || document.formvalidator.isValid(document.id('item-form'))) {
<?php echo $this->form->getField('articletext')->save(); ?>
Joomla.submitform(task, document.getElementById('item-form'));
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
@@ -25,8 +25,6 @@
if (self != top) {
window.top.setTimeout('window.parent.SqueezeBox.close()', 1000);
}
- } else {
- alert('".$this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'))."');
}
}";
@@ -21,8 +21,6 @@
{
if (task == 'newsfeed.cancel' || document.formvalidator.isValid(document.id('newsfeed-form'))) {
Joomla.submitform(task, document.getElementById('newsfeed-form'));
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
}
}
</script>
@@ -20,9 +20,6 @@
<?php echo $this->form->getField('description')->save(); ?>
Joomla.submitform(task, document.getElementById('weblink-form'));
}
- else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
- }
}
</script>
<div class="weblink-edit">
@@ -33,8 +33,6 @@
if (task == 'article.cancel' || document.formvalidator.isValid(document.id('adminForm'))) {
<?php echo $this->form->getField('articletext')->save(); ?>
Joomla.submitform(task);
- } else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED')); ?>');
}
}
</script>
@@ -81,7 +79,7 @@
<?php echo $this->form->getInput('title'); ?>
</div>
</div>
-
+
<?php if (is_null($this->item->id)): ?>
<div class="control-group">
<div class="control-label">
@@ -320,7 +318,7 @@
<?php echo $this->form->getInput('metakey'); ?>
</div>
</div>
-
+
<input type="hidden" name="task" value="" />
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
<?php if($this->params->get('enable_category', 0) == 1) :?>
@@ -23,9 +23,6 @@
<?php echo $this->form->getField('description')->save(); ?>
Joomla.submitform(task);
}
- else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
- }
}
</script>
<div class="edit<?php echo $this->pageclass_sfx; ?>">
View
@@ -26,6 +26,12 @@ $ -> Language fix or change
- -> Removed
! -> Note
+13-Nov-2012 Jean-Marie Simonet
+ #$ [#29669] Consistent form validation notifications. Thanks Roland
+ # [#29675] *Protostar error page tries to load search module even when module is not published
+ $ [#29668] language installer coordinator team URL must changed j3 TT. Thanks Chalak
+ # [#29646] Some errors on Updater. Thanks Mark.
+
11-Nov-2012 Jean-Marie Simonet
# [#29569] *Implementing accordeons for Modules Options
# [#29635] * No message notification when new article is created
@@ -282,6 +282,7 @@ JLIB_FORM_ERROR_FIELDS_GROUPEDLIST_ELEMENT_NAME="Unknown element type: %s"
JLIB_FORM_ERROR_NO_DATA="No data"
JLIB_FORM_ERROR_VALIDATE_FIELD="Invalid xml field"
JLIB_FORM_ERROR_XML_FILE_DID_NOT_LOAD="XML file did not load"
+JLIB_FORM_FIELD_INVALID="Invalid field:&#160";
JLIB_FORM_INVALID_FORM_OBJECT="Invalid Form Object: :%s"
JLIB_FORM_INVALID_FORM_RULE="Invalid Form Rule: :%s"
JLIB_FORM_MEDIA_PREVIEW_ALT="Selected image"
@@ -117,6 +117,9 @@ public static function formvalidation()
return;
}
+ // Add validate.js language strings
+ JText::script('JLIB_FORM_FIELD_INVALID');
+
// Include MooTools framework
self::framework();
@@ -97,7 +97,11 @@ public function _startElement($parser, $name, $attrs = array())
$tag = $this->_getStackLocation();
// Reset the data
- eval('$this->' . $tag . '->_data = "";');
+ if (isset($this->$tag))
+ {
+ $this->$tag->_data = "";
+ }
+
switch ($name)
{
case 'CATEGORY':
@@ -36,7 +36,10 @@ protected function _startElement($parser, $name, $attrs = array())
$tag = $this->_getStackLocation();
// Reset the data
- eval('$this->' . $tag . '->_data = "";');
+ if (isset($this->$tag))
+ {
+ $this->$tag->_data = "";
+ }
switch ($name)
{
@@ -180,7 +180,10 @@ public function _startElement($parser, $name, $attrs = array())
$tag = $this->_getStackLocation();
// Reset the data
- eval('$this->' . $tag . '->_data = "";');
+ if (isset($this->$tag))
+ {
+ $this->$tag->_data = "";
+ }
switch ($name)
{
@@ -196,10 +199,17 @@ public function _startElement($parser, $name, $attrs = array())
// For everything else there's...the default!
default:
$name = strtolower($name);
- $this->currentUpdate->$name->_data = '';
+ if (isset($this->currentUpdate->$name))
+ {
+ $this->currentUpdate->$name->_data = '';
+ }
foreach ($attrs as $key => $data)
{
$key = strtolower($key);
+ if (!isset($this->currentUpdate->$name))
+ {
+ $this->currentUpdate->$name = new stdClass();
+ }
$this->currentUpdate->$name->$key = $data;
}
break;
@@ -227,7 +237,8 @@ public function _endElement($parser, $name)
$ver = new JVersion;
$product = strtolower(JFilterInput::getInstance()->clean($ver->PRODUCT, 'cmd'));
// Check for optional min_dev_level and max_dev_level attributes to further specify targetplatform (e.g., 3.0.1)
- if ($product == $this->currentUpdate->targetplatform->name
+ if (isset($this->currentUpdate->targetplatform->name)
+ && $product == $this->currentUpdate->targetplatform->name
&& preg_match('/' . $this->currentUpdate->targetplatform->version . '/', $ver->RELEASE)
&& ((!isset($this->currentUpdate->targetplatform->min_dev_level)) || $ver->DEV_LEVEL >= $this->currentUpdate->targetplatform->min_dev_level)
&& ((!isset($this->currentUpdate->targetplatform->max_dev_level)) || $ver->DEV_LEVEL <= $this->currentUpdate->targetplatform->max_dev_level))
@@ -285,7 +296,10 @@ public function _characterData($parser, $data)
// Throw the data for this item together
$tag = strtolower($tag);
- $this->currentUpdate->$tag->_data .= $data;
+ if (isset($this->currentUpdate->$tag))
+ {
+ $this->currentUpdate->$tag->_data .= $data;
+ }
}
/**
@@ -158,6 +158,20 @@ var JFormValidator = new Class({
}
});
+ if (!valid) {
+ var message = Joomla.JText._('JLIB_FORM_FIELD_INVALID');
+ var errors = jQuery("label.invalid");
+ var error = new Object();
+ error.error = new Array();
+ for (var i=0;i < errors.length; i++) {
+ var label = jQuery(errors[i]).text();
+ if (label != 'undefined') {
+ error.error[i] = message+label.replace("*", "");
+ }
+ }
+ Joomla.renderMessages(error);
+ }
+
return valid;
},

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -23,9 +23,6 @@
<?php echo $this->form->getField('description')->save(); ?>
Joomla.submitform(task);
}
- else {
- alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
- }
}
</script>
<div class="edit<?php echo $this->pageclass_sfx; ?>">
@@ -169,12 +169,14 @@
</ul>
</div>
<div class="span6">
- <p><strong><?php echo JText::_('JERROR_LAYOUT_SEARCH'); ?></strong></p>
- <p><?php echo JText::_('JERROR_LAYOUT_SEARCH_PAGE'); ?></p>
- <?php
- $module = JModuleHelper::getModule('search');
- echo JModuleHelper::renderModule($module);
- ?>
+ <?php if (JModuleHelper::getModule('search')) : ?>
+ <p><strong><?php echo JText::_('JERROR_LAYOUT_SEARCH'); ?></strong></p>
+ <p><?php echo JText::_('JERROR_LAYOUT_SEARCH_PAGE'); ?></p>
+ <?php
+ $module = JModuleHelper::getModule('search');
+ echo JModuleHelper::renderModule($module);
+ ?>
+ <?php endif; ?>
<p><?php echo JText::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?></p>
<p><a href="<?php echo $this->baseurl; ?>/index.php" class="btn"><i class="icon-home"></i> <?php echo JText::_('JERROR_LAYOUT_HOME_PAGE'); ?></a></p>
</div>

0 comments on commit 313924f

Please sign in to comment.