Ext.define('PVE.ha.GroupInputPanel', {
extend: 'PVE.panel.InputPanel',
+ onlineHelp: 'ha_manager_groups',
groupId: undefined,
-
+
onGetValues: function(values) {
var me = this;
- if (me.create) {
+ if (me.isCreate) {
values.type = 'group';
}
sortable: true,
stopSelection: true,
widget: {
- xtype: 'numberfield',
+ xtype: 'proxmoxintegerfield',
minValue: 0,
maxValue: 1000,
+ isFormField: false,
listeners: {
change: function(numberfield, value, old_value) {
var record = numberfield.getWidgetRecord();
me.column1 = [
{
- xtype: me.create ? 'textfield' : 'displayfield',
+ xtype: me.isCreate ? 'textfield' : 'displayfield',
name: 'group',
value: me.groupId || '',
fieldLabel: 'ID',
me.column2 = [
{
- xtype: 'pvecheckbox',
+ xtype: 'proxmoxcheckbox',
name: 'restricted',
uncheckedValue: 0,
fieldLabel: 'restricted'
},
{
- xtype: 'pvecheckbox',
+ xtype: 'proxmoxcheckbox',
name: 'nofailback',
uncheckedValue: 0,
fieldLabel: 'nofailback'
initComponent : function() {
var me = this;
- me.create = !me.groupId;
+ me.isCreate = !me.groupId;
- if (me.create) {
+ if (me.isCreate) {
me.url = '/api2/extjs/cluster/ha/groups';
me.method = 'POST';
} else {
}
var ipanel = Ext.create('PVE.ha.GroupInputPanel', {
- create: me.create,
+ isCreate: me.isCreate,
groupId: me.groupId
});
me.callParent();
- if (!me.create) {
+ if (!me.isCreate) {
me.load({
success: function(response, options) {
var values = response.result.data;