confirm

misc

Modal window to ask confirmation. Uses eUiPanel.

Example
HTML code
Type molecule
Group misc
Elements icon, title, description

PHP

Wrapper to use element through PHP

Extends
Render
Create arguments
Code example

Javascript

Wrapper to use element through Javascript

Code example

Confirm delete

cms.get('ui', 'confirm', 'delete');

Custom actions

cms.get('ui', 'confirm',{
  title: 'Panel title',
  content: 'Message to show in content',
  onSuccess: function(){
    // Do something if confirmed
    cms.panel.close(this);
  },
  onCancel: function(){
    cms.panel.close(this);
  }
});

Custom button style

cms.get('ui', 'confirm',{
  title: 'Panel title',
  content: 'Message to show in content',
  button: [{
    confirm: {
      title: 'My button text',
      color: 'red'
      onclick: function(){
        cms.panel.close(this);
      }
    }
  }]
});

Custom buttons

cms.get('ui', 'confirm',{
  title: 'Panel title',
  content: 'Message to show in content',
  width: 300,
  type: 'delete', // Sets predefined delete values
  button: [{
    icon: 'app-confirm',
    title: 'Vahvista',
    color: 'confirm',
    onclick: function(){
      alert('Cancel clicked!')
    }
  },{
    icon: 'app-check',
    title: 'Peruuta',
    color: 'cancel',
    onclick: function(){
      alert('Cancel clicked!')
    }
  }]
});

Styles

Elements Css style

icon < class=' icon'>Icon