-
Notifications
You must be signed in to change notification settings - Fork 0
/
editor_text_currency.php
40 lines (39 loc) · 1.72 KB
/
editor_text_currency.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
function editor_text_currency_draw($field_def, $fieldvalue) {
?>
Ext.create('Ext.form.ComboBox',{
fieldLabel: '<?=$field_def['describ']?>',
name: '<?=$field_def['name']?>',
allowBlank:<?=($field_def['required']?'false':'true')?>,
<? if ($field_def['type'] == FIELD_TEXT) : ?>
<? endif; ?>
value: '<?=str_replace("\r",'\r',str_replace("\n",'\n',addslashes($fieldvalue)))?>',
editable: false,
valueField: 'code',
displayField: 'name',
store: Ext.create('Ext.data.JsonStore',{
autoDestroy: true,
autoLoad: true,
fields: [
{name:'id', type: 'int'},
{name:'code', type: 'string'},
{name:'name', type: 'string'},
],
proxy: {
type: 'ajax',
simpleSortMode: true,
api: {
read : '/cms/plugins/sale/data_currency.php',
},
reader: {
type: 'json',
root: 'rows',
rootProperty: 'rows'
}
}
}),
})
<?
return 25;
}
?>