mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 2211 fixed the error that a address was not saved when used the ruleset.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11052 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bf0a459471
commit
8f8c3bfb93
3 changed files with 20 additions and 12 deletions
|
|
@ -206,6 +206,7 @@
|
|||
if(is_array($value)) $values = $value;
|
||||
elseif(strpos($value,'|@|')!==false) $values = explode('|@|', $value);
|
||||
elseif(strpos($value,',')!==false) $values = explode(',', $value);
|
||||
else $values = array($value);
|
||||
return $values;
|
||||
break;
|
||||
//case 'date' :
|
||||
|
|
@ -366,7 +367,7 @@
|
|||
|
||||
$buff .=
|
||||
'<div id="addr_searched_'.$column_name.'" style="display:'.($value[0]?'block':'none').';">'.
|
||||
'<input type="text" readonly="readonly" name="'.$column_name.'" value="'.$value[0].'" class="address" />'.
|
||||
'<input type="text" readonly="readonly" name="'.$column_name.'[]" value="'.$value[0].'" class="address" />'.
|
||||
'<a href="#" onclick="doShowKrZipSearch(this, \''.$column_name.'\'); return false;" class="button red"><span>'.Context::getLang('cmd_cancel').'</span></a>'.
|
||||
'</div>'.
|
||||
|
||||
|
|
@ -381,7 +382,7 @@
|
|||
'<a href="#" onclick="doSearchKrZip(this, \''.$column_name.'\'); return false;" class="button green"><span>'.Context::getLang('cmd_search').'</span></a>'.
|
||||
'</div>'.
|
||||
|
||||
'<input type="text" name="'.$column_name.'" value="'.htmlspecialchars($value[1]).'" class="address" />'.
|
||||
'<input type="text" name="'.$column_name.'[]" value="'.htmlspecialchars($value[1]).'" class="address" />'.
|
||||
'';
|
||||
break;
|
||||
// General text
|
||||
|
|
|
|||
|
|
@ -73,12 +73,13 @@ function doSelectKrZip(form, column_name) {
|
|||
$zone_list.hide();
|
||||
$zone_search.hide();
|
||||
|
||||
$form.get(0).elements[column_name][0].value = $select.val();
|
||||
$form.get(0).elements[column_name][1].focus();
|
||||
$form.get(0).elements[column_name + '[]'][0].value = $select.val();
|
||||
$form.get(0).elements[column_name + '[]'][1].focus();
|
||||
}
|
||||
|
||||
function doShowKrZipSearch(obj, column_name) {
|
||||
var $=jQuery;
|
||||
$('input[name="'+column_name+'[]"]').val('');
|
||||
$('#addr_list_'+column_name).hide();
|
||||
$('#addr_search_'+column_name).show();
|
||||
$('#addr_searched_'+column_name).hide();
|
||||
|
|
|
|||
|
|
@ -1269,17 +1269,23 @@ class documentController extends document {
|
|||
$js_code = array();
|
||||
$js_code[] = '<script>//<![CDATA[';
|
||||
$js_code[] = '(function($){';
|
||||
$js_code[] = 'var validator = xe.getApp("validator")[0];';
|
||||
$js_code[] = 'if(!validator) return false;';
|
||||
$js_code[] = 'var validator = xe.getApp("validator")[0];';
|
||||
$js_code[] = 'if(!validator) return false;';
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
foreach($extra_keys as $idx => $val) {
|
||||
$js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["extra_vars%s","%s"]);', $val->idx, $val->name);
|
||||
if($val->is_required == 'Y') $js_code[] = sprintf('validator.cast("ADD_EXTRA_FIELD", ["extra_vars%s", { required:true }]);', $val->idx);
|
||||
}
|
||||
foreach($extra_keys as $idx => $val)
|
||||
{
|
||||
$idx = $val->idx;
|
||||
if($val->type == 'kr_zip')
|
||||
{
|
||||
$idx .= '[]';
|
||||
}
|
||||
$js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["extra_vars%s","%s"]);', $idx, $val->name);
|
||||
if($val->is_required == 'Y') $js_code[] = sprintf('validator.cast("ADD_EXTRA_FIELD", ["extra_vars%s", { required:true }]);', $idx);
|
||||
}
|
||||
|
||||
$js_code[] = '})(jQuery);';
|
||||
$js_code[] = '})(jQuery);';
|
||||
$js_code[] = '//]]></script>';
|
||||
$js_code = implode("\n", $js_code);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue