Arreglo para ABM de grupos con idiomas
This commit is contained in:
@@ -144,7 +144,7 @@ switch ($_POST['action']) {
|
||||
case 'saveNewGroup':
|
||||
G::LoadClass( 'groups' );
|
||||
$newGroup['GRP_UID'] = '';
|
||||
$newGroup['GRP_STATUS'] = G::toUpper( $_POST['status'] );
|
||||
$newGroup['GRP_STATUS'] = ($_POST['status'] == '1') ? 'ACTIVE' : 'INACTIVE';
|
||||
$newGroup['GRP_TITLE'] = trim( $_POST['name'] );
|
||||
unset( $newGroup['GRP_UID'] );
|
||||
$group = new Groupwf();
|
||||
@@ -154,7 +154,7 @@ switch ($_POST['action']) {
|
||||
case 'saveEditGroup':
|
||||
G::LoadClass( 'groups' );
|
||||
$editGroup['GRP_UID'] = $_POST['grp_uid'];
|
||||
$editGroup['GRP_STATUS'] = G::toUpper( $_POST['status'] );
|
||||
$editGroup['GRP_STATUS'] = ($_POST['status'] == '1') ? 'ACTIVE' : 'INACTIVE';
|
||||
$editGroup['GRP_TITLE'] = trim( $_POST['name'] );
|
||||
$group = new Groupwf();
|
||||
$group->update( $editGroup );
|
||||
|
||||
@@ -144,7 +144,7 @@ Ext.onReady(function(){
|
||||
});
|
||||
|
||||
comboStatusStore = new Ext.data.SimpleStore({
|
||||
fields: ['id','value'],
|
||||
fields: ['changeInt','value'],
|
||||
data: [['1',_('ID_ACTIVE').toUpperCase()],['0', _('ID_INACTIVE').toUpperCase()]]
|
||||
});
|
||||
|
||||
@@ -164,11 +164,11 @@ Ext.onReady(function(){
|
||||
store: comboStatusStore,
|
||||
listeners : {
|
||||
beforerender: function(status){
|
||||
status.setValue(_('ID_ACTIVE').toUpperCase());
|
||||
status.setValue('1');
|
||||
}
|
||||
},
|
||||
displayField: 'value',
|
||||
valueField:'value',
|
||||
valueField:'changeInt',
|
||||
allowBlank: false,
|
||||
triggerAction: 'all',
|
||||
emptyText: _('ID_SELECT_STATUS'),
|
||||
@@ -189,13 +189,15 @@ Ext.onReady(function(){
|
||||
{xtype: 'textfield', fieldLabel: _('ID_GROUP_NAME'), name: 'name', width: 200, allowBlank: false},
|
||||
{
|
||||
xtype: 'combo',
|
||||
id: 'statusEdit',
|
||||
name: 'statusEdit',
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
hiddenName: 'status',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
displayField: 'value',
|
||||
valueField:'value',
|
||||
valueField:'changeInt',
|
||||
allowBlank: false,
|
||||
editable:false,
|
||||
triggerAction: 'all',
|
||||
@@ -409,6 +411,7 @@ DuplicateGroupName = function(){
|
||||
|
||||
//Save New Group
|
||||
SaveNewGroup = function(){
|
||||
document.getElementById('status').value = Ext.getCmp('status').getValue();
|
||||
newForm.getForm().submit({
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
@@ -438,7 +441,8 @@ EditGroupWindow = function(){
|
||||
|
||||
editForm.getForm().findField('grp_uid').setValue(rowSelected.data.GRP_UID);
|
||||
editForm.getForm().findField('name').setValue(strName);
|
||||
editForm.getForm().findField('status').setValue(rowSelected.data.GRP_STATUS);
|
||||
var valueEditChangeInt = (rowSelected.data.GRP_STATUS == 'ACTIVE') ? '1' : '0';
|
||||
editForm.getForm().findField('status').setValue(valueEditChangeInt);
|
||||
w = new Ext.Window({
|
||||
autoHeight: true,
|
||||
width: 440,
|
||||
@@ -467,6 +471,7 @@ SaveEditGroupAction = function(){
|
||||
|
||||
//Save Edit Group
|
||||
SaveEditGroup = function(){
|
||||
document.getElementById('statusEdit').value = Ext.getCmp('statusEdit').getValue();
|
||||
editForm.getForm().submit({
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
|
||||
Reference in New Issue
Block a user