#!/usr/bin/env python # coding: utf8 from gluon.html import * from gluon.http import * from gluon.validators import * from gluon.sqlhtml import * from ajaxform import * # request, response, session, cache, T, db(s) # must be passed and cannot be imported! class PoolDeleteForm(AjaxForm): def __init__(self, pool, translator, **attributes): AjaxForm.__init__( self, translator, **attributes) self.form.append( INPUT( _name='pool_uuid', _type='hidden', _value=pool.UUIDString()) ) self.layout.addRow( INPUT( _type='checkbox', _name='pool_undefine', requires = IS_NOT_EMPTY(error_message=self.T("Must be checked to remove pool.")) ), LABEL(self.T('Yes, remove this pool from inventory.'))) self.layout.addRow( INPUT( _type='checkbox', _name='pool_delete' ), LABEL(self.T('Remove this pool from filesystem.'))) self.layout.addRow( HR( )) self.layout.addRow( DIV( INPUT( _value=self.T('Delete'), _type='button', _id='pool_ok_button', _class='submit_button' ), INPUT( _value=self.T('Reset'), _type='button', _id='pool_reset_button', _class='reset_button' ), _class = 'button-group') )