Commit 11051553 by carpoon

add export target filed

parent 724e1aa1
......@@ -14,9 +14,6 @@
#
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from urllib.parse import urlparse
import os
......@@ -877,13 +874,15 @@ class VmDiskExportForm(OperationForm):
disk_format = forms.ChoiceField(
choices=Disk.EXPORT_FORMATS,
label=_('Format'))
export_target = forms.ChoiceField(
choices=(('user_store', 'User store'), ('datastore', 'Datastore')),
label=_('Export target'))
def __init__(self, *args, **kwargs):
choices = kwargs.pop('choices')
self.disk = kwargs.pop('default')
super(VmDiskExportForm, self).__init__(*args, **kwargs)
self.fields['disk'] = forms.ModelChoiceField(
queryset=choices, initial=self.disk, required=True,
empty_label=None, label=_('Disk'))
......@@ -902,7 +901,8 @@ class VmDiskExportForm(OperationForm):
),
Field('disk'),
Field('exported_name'),
Field('disk_format')
Field('disk_format'),
Field('export_target'),
)
return helper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment