fix: Fixed a bug that didn't correctly handle validation errors on the attribute add popup, fixes #1875

pull/1881/head
iglocska 2017-01-28 23:28:13 +01:00
parent 76c0cb4e52
commit 2ade58ce63
2 changed files with 7 additions and 6 deletions

View File

@ -109,6 +109,7 @@
} }
?> ?>
<script type="text/javascript"> <script type="text/javascript">
var fieldsArray = new Array('AttributeCategory', 'AttributeType', 'AttributeValue', 'AttributeDistribution', 'AttributeComment', 'AttributeToIds', 'AttributeBatchImport', 'AttributeSharingGroupId');
<?php <?php
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type'); $formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type');
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL; echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;
@ -161,7 +162,6 @@ $(document).ready(function() {
$("#AttributeCategory, #AttributeType, #AttributeDistribution").change(function() { $("#AttributeCategory, #AttributeType, #AttributeDistribution").change(function() {
initPopoverContent('Attribute'); initPopoverContent('Attribute');
}); });
<?php if ($ajax): ?> <?php if ($ajax): ?>
$('#cancel_attribute_add').click(function() { $('#cancel_attribute_add').click(function() {
cancelPopoverForm(); cancelPopoverForm();

View File

@ -67,6 +67,7 @@
echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttribute', 'event' => $event)); echo $this->element('side_menu', array('menuList' => 'event', 'menuItem' => 'addAttribute', 'event' => $event));
?> ?>
<script type="text/javascript"> <script type="text/javascript">
var fieldsArray = new Array('AttributeCategory', 'AttributeType', 'AttributeValue', 'AttributeDistribution', 'AttributeComment', 'AttributeToIds', 'AttributeBatchImport', 'AttributeSharingGroupId');
<?php <?php
$formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type'); $formInfoTypes = array('distribution' => 'Distribution', 'category' => 'Category', 'type' => 'Type');
echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL; echo 'var formInfoFields = ' . json_encode($formInfoTypes) . PHP_EOL;