Author Topic: Vm 2.5.0 Administration UI DANGER accidental deletion ORDERS AND USERS  (Read 663 times)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3506
  • VirtueMart Version: 3.8.9
In VM 2.5.0 backend admin there is a danger of accidental ORDER and USER data deletion due to the structure of the topbar UI.

Why?  The delete button is WAY TOO close to the update button!

Simple solution:-

But needs one of the vm team to add this to the core:-

IN administrator\components\com_virtuemart\views\orders\view.html.php


Code: [Select]
//JToolBarHelper::customX( 'CreateOrderHead', 'new','new','New',false);
JToolBarHelper::save('updatestatus', JText::_('COM_VIRTUEMART_UPDATE_STATUS'));
JToolBarHelper::deleteListX();


New code


Code: [Select]

//JToolBarHelper::customX( 'CreateOrderHead', 'new','new','New',false);
JToolBarHelper::save('updatestatus', JText::_('COM_VIRTUEMART_UPDATE_STATUS'));
            JToolBarHelper::spacer('100'); // new spacer
JToolBarHelper::deleteListX();


And for the USER interface


Delete and modify vendor should not be before edit and should have significant spacing:-

administrator/components/com_virtuemart/views/user/view.html.php

Code: [Select]

$this->assignRef('orderlist', $orderList);
$this->assignRef('contactDetails', $_contactDetails);
$this->assignRef('editor', $editor);

} else {
            JToolBarHelper::editListX(); //moved
            JToolBarHelper::spacer('50'); // new spacer
JToolBarHelper::divider();  //new divider
JToolBarHelper::custom('toggle.user_is_vendor.1', 'publish','','COM_VIRTUEMART_USER_ISVENDOR');
JToolBarHelper::custom('toggle.user_is_vendor.0', 'unpublish','','COM_VIRTUEMART_USER_ISNOTVENDOR');
JToolBarHelper::divider();
            JToolBarHelper::spacer('50'); // new spacer
            JToolBarHelper::deleteList();


//This is intentionally, creating new user via BE is buggy and can be done by joomla
//JToolBarHelper::addNewX();
$this->addStandardDefaultViewLists($model,'ju.id');


Regards
A

Joomla 3.9.27
php 7.4