PM-1396 No es posible actualizar los calendarios

Se agrego validacion para verificar Id del calendario a modificar
This commit is contained in:
norahmollo
2015-02-04 14:00:50 -04:00
parent 22239d3bd1
commit ea2cb9384b
2 changed files with 6 additions and 5 deletions

View File

@@ -177,7 +177,7 @@ class adminProxy extends HttpProxyController
$httpData=array_unique((array)$httpData);
$message = '';
$oldName = isset($_POST['oldName'])? $_POST['oldName']:'';
$uid = isset($_POST['uid'])? $_POST['uid']:'';
switch ($_POST['action']){
case 'calendarName':
@@ -194,7 +194,8 @@ class adminProxy extends HttpProxyController
}
if (isset($aDefinitions['CALENDAR_NAME'])) {
if ($oldName != $_POST['name']) {
if ($aDefinitions['CALENDAR_UID'] != $uid) {
if ($aDefinitions['CALENDAR_NAME'] == $_POST['name']) {
$validated = false;
$message = G::loadTranslation('ID_CALENDAR_INVALID_NAME');

View File

@@ -757,13 +757,13 @@ Ext.onReady( function() {
Ext.getCmp('idInvalidCalendarName').hide();
var validateMessage = '';
var canlendarName = Ext.getCmp('dynaformCalendarName').getValue();
Ext.Ajax.request( {
url: '../adminProxy/calendarValidate',
params: {
action : 'calendarName',
oldName : fields.OLD_NAME,
name : canlendarName
name : canlendarName,
uid : fields.CALENDAR_UID
},
success: function(resp){
if (resp.responseText != '[]')