# -*- coding: utf-8 -*-

# Standard library imports
import os

# Third party imports
from psforms import *
from psforms.validators import required
from psforms.fields import *


class PostRenderForm(Form):

    meta = FormMetaData(
        title='Post Render',
        description='Post Render Callbacks',
        header=False,
        labels_on_top=False,
        columns=2
    )


class PlayblastForm(Form):

    meta = FormMetaData(
        title='Review',
        description='Playblast for review',
        header=False,
        subforms_as_groups=True
    )
    preset = StringOptionField('Preset', options=['Current Settings'])
    capture_mode = ButtonOptionField(
        'Capture Mode',
        options=['sequence', 'snapshot'],
        label_on_top=False
    )
    filename = SaveFileField('Filename')
    camera = StringOptionField('Camera')
    resolution = Int2Field(
        'Resolution',
        range1=(0, 8192),
        range2=(0, 8192),
        default=(960, 540)
    )
    postrender = PostRenderForm()


class NewPresetForm(Form):

    meta = FormMetaData(
        title='New Preset',
        description='Create a new preset from the selected panel',
        header=True,
    )

    panel = StringOptionField('Panel')
    name = StringField('Preset Name', validators=(required,))


class DelPresetForm(Form):

    meta = FormMetaData(
        title='Delete Preset',
        description='Are you sure you want to delete this preset?',
        header=True,
    )

@@ -367,16 +367,17 @@
 olumns=2
+,
 %0A    )%0A%0A
@@ -442,88 +442,109 @@
     
-title='Review',%0A        description='Playblast for review',%0A        header=False
+header=True,%0A        icon=os.path.join(os.path.dirname(__file__), 'icon.png'),%0A        title='Review'
 ,%0A  
@@ -572,16 +572,17 @@
 ups=True
+,
 %0A    )%0A 
@@ -827,16 +827,40 @@
 ilename'
+, validators=(required,)
 )%0A    ca

add header to playblast form