Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/en/system.xml
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/en/system.xml	(revision 38909)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/en/system.xml	(working copy)
@@ -881,7 +881,11 @@
                         <help_text/>
                         <subfields>
                             <field name="pem" type="importlocalfile">
-                                <verbose_name>PEM File</verbose_name>
+                                <verbose_name>PEM/pfx File</verbose_name>
+                                <help_text/>
+                            </field>
+                            <field name="pfx_pass" type="string">
+                                <verbose_name>Password For pfx File</verbose_name>
                                 <help_text/>
                             </field>
                             <field name="passphrase" type="string">
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/ja/system.xml
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/ja/system.xml	(revision 38909)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/ja/system.xml	(working copy)
@@ -884,6 +884,10 @@
                                 <verbose_name>ローカルファイル</verbose_name>
                                 <help_text/>
                             </field>
+                            <field name="pfx_pass" type="string">
+                                <verbose_name>pfxファイルのパスワード</verbose_name>
+                                <help_text/>
+                            </field>
                             <field name="passphrase" type="string">
                                 <verbose_name>キーパスフレーズ</verbose_name>
                                 <help_text/>
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/zh-cn/system.xml
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/zh-cn/system.xml	(revision 38909)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/zh-cn/system.xml	(working copy)
@@ -881,7 +881,11 @@
                         <help_text/>
                         <subfields>
                             <field name="pem" type="importlocalfile">
-                                <verbose_name>PEM格式文件</verbose_name>
+                                <verbose_name>PEM/pfx格式文件</verbose_name>
+                                <help_text/>
+                            </field>
+                            <field name="pfx_pass" type="string">
+                                <verbose_name>pfx文件的密码</verbose_name>
                                 <help_text/>
                             </field>
                             <field name="passphrase" type="string">
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/zh-tw/system.xml
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/zh-tw/system.xml	(revision 38909)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/doc/zh-tw/system.xml	(working copy)
@@ -884,6 +884,10 @@
                                 <verbose_name>本地檔案</verbose_name>
                                 <help_text/>
                             </field>
+                            <field name="pfx_pass" type="string">
+                                <verbose_name>pfx檔案的密碼</verbose_name>
+                                <help_text/>
+                            </field>
                             <field name="passphrase" type="string">
                                 <verbose_name>私密金鑰保護口令</verbose_name>
                                 <help_text/>
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/system/__init__.py
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/system/__init__.py	(revision 38909)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/models/system/__init__.py	(working copy)
@@ -795,7 +795,8 @@
         option_fields = (
             UnionField(name='using',verbose_name=_('Using'), optional=True, fields={
                       'local': GroupField(verbose_name=_('Local File'),fields={
-                            'pem': ImportLocalFileField(verbose_name=_('PEM File'), button_text=__('Choose Local File'), maxFileSize=5000000),
+                            'pem': ImportLocalFileField(verbose_name=_('PEM/pfx File'), button_text=__('Choose Local File'), maxFileSize=5000000),
+                            'pfx_pass': PasswordField(verbose_name=_('Password For pfx File'), confirm=False, optional=True),
                             'passphrase': PasswordField(verbose_name=_('Key Passphrase'), confirm=False),
                       }),
                       'online': GroupField(verbose_name=_('TFTP/FTP/HTTP'),fields={
@@ -1342,8 +1343,17 @@
 
         def _perform_Import_Cert(self, options):
             if 'local' in options['using']:
+                cli_str = 'webui ssl import certificate "file://%s"\nYES\n%s\n' % (options['using']['local']['pem'],options['using']['local']['passphrase'])
+                if "." in options['using']['local']['pem']:
+                    check_extention = options['using']['local']['pem'].split(".")
+                    if len(check_extention) > 1 and check_extention[1].lower() == 'pfx':
+                        if "pfx_pass" not in options['using']['local'] or not options['using']['local']['pfx_pass']:
+                            raise ActionPerformException('Please input password for pfx file')
+                        cli_str = 'webui ssl import certificate "file://%s"\nYES\n%s\n%s\n' % (options['using']['local']['pem'],
+                                                                                           options['using']['local']['pfx_pass'],
+                                                                                           options['using']['local']['passphrase'])
                 self.cli.set_config()
-                result = self.cli.cmd('webui ssl import certificate "file://%s"\nYES\n%s\n' % (options['using']['local']['pem'],options['using']['local']['passphrase']),
+                result = self.cli.cmd(cli_str,
                                       RegexParser('Invalid certificate format', match_exception=CLICmdError, match_msg=__('Import Failed: wrong format')),
                                       RegexParser('already exists', match_exception=CLICmdError, match_msg=__('Import Failed: the certificate file already exists')),
                                       RegexParser('import successful', match_exception=CLICmdNormal, exclusive=True),
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/system/AccessControl/box_action.html
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/system/AccessControl/box_action.html	(revision 0)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/apv/templates/system/AccessControl/box_action.html	(working copy)
@@ -0,0 +1,131 @@
+{# Required Context Variables: MODEL, MANAGER, OBJECT, PARAMS['action']; Optional Variables: PARAMS['post_data'] #}
+{% extends "box.html" %}
+{% set action = MODEL._meta.get_action_by_name(PARAMS['action']) %}
+{% block box_content %}
+{% import "widgets/form.html" as form %}
+
+{% set post_data = PARAMS['post_data'] | url2obj %}
+{% set base_pk_list = post_data['__pk_list'] %}
+
+
+    <div class="box-header my-header">
+        <div class="box-icon-title">
+            <i class="fa fa-wrench"></i>
+        </div>
+        <h2>
+            {{ action.verbose_name }}
+        </h2>
+    </div>
+    <div class="box-content">
+    <form class="form-horizontal main-form">
+            <script type="text/javascript">
+            var js_hook_{{ id|jsvar }}_{{ action.name }} = {
+                id: "{{ id|jsvar }}_{{ action.name }}",
+                form_fields: {},
+                ready_total: 0,
+                ready_count: 0
+            };
+            </script>
+            <div class="row-fluid">
+                <div class="span12 with-min-width field-group-box">
+                    {% if action.verbose_name %}
+                    <a id="{{ action.verbose_name }}"></a>
+                    <legend>{{ action.verbose_name }}</legend>
+                    {% endif %}
+                    <fieldset>
+                    {% for field in action.option_fields if not (SESSION.is_segment_user and field.seg_hidden)%}
+                        {{ field.default_widget(editable=field.editable, model_instance=None, manager=MANAGER, base_pk_list=base_pk_list).render(form, 'js_hook_'+id|jsvar+'_'+action.name, {'form':form, 'csrf_token':csrf_token, 'base_pk_list':base_pk_list}) }}
+                    {% endfor %}
+                    <div class="form-group action-actions">
+                        <label class="col-md-3"></label>
+                        <div class="col-md-9">
+                        <button type="button" class="btn action-btn action-btn-{{ action.name }} {{ action.btn_class }}">{{ action.action_name }}</button>
+                        </div>
+                    </div>
+                    </fieldset>
+                </div>
+            </div><!-- row-fluid -->
+    </form>
+    </div><!-- box-content -->
+{% endblock box_content %}
+
+{% block box_script %}
+{% if 0 %}
+<script type="text/javascript">
+// Just make editor happy to highlight the scripts
+{% endif %}
+
+require(['widget-form', 'hive'], function(form){
+    var hook = js_hook_{{ id|jsvar }}_{{ action.name }};
+    var action = {{ action.get_options() }};
+    var field_condition_dict = {{ action.option_fields_condition()|json_dumps }};
+    box.form_fields = hook.form_fields;
+
+    $HIVE.check_form_condition(box, {}, {}, field_condition_dict);
+
+    $.each(box.form_fields, function(key,value){
+        box.listenTo(value, "form:changed", function(){
+            $HIVE.check_form_condition(box, {}, {}, field_condition_dict);
+        });
+    });
+
+    $('.passwordinput_pfx_pass').parent().css('display', 'none');
+
+    box.$el.find('.action-btn-{{ action.name }}').click(function(){
+        {%if not SESSION.allow_config %}
+            $HIVE.alert('error','Config Mode Entrance Denied', 'You are enable user, not allowed to change the configuration of APV');
+            return false;
+        {% endif%}
+        var err = false;
+        var err_msg = '';
+        var post_data = {'csrf_token': '{{ csrf_token }}'};
+        {% if PARAMS['post_data'] %}
+        post_data["options"] = {{ PARAMS['post_data'] }};
+        {% else %}
+        post_data["options"] = {}
+        {% endif %}
+        $.each(hook.form_fields, function(key,value){
+            if (!value.is_hidden()) {
+                if (value['validate'] != undefined) {
+                    validate_result = value['validate']();
+                    if (!validate_result[0]) {
+                        err = true;
+                        err_msg += '<b>' + value['validate_label']() + '</b> -- ' + validate_result[1] + '<br />';
+                    }
+                }
+                if (value['validate_on_blur'] != undefined) {
+                    validate_result = value['validate_on_blur']();
+                    if (!validate_result[0]) {
+                        err = true;
+                        err_msg += '<b>' + value['validate_label']() + '</b> -- ' + validate_result[1] + '<br />';
+                    }
+                }
+                post_data["options"][value['name']] = value.get_value();
+            }
+        });
+        if (err) {
+            $HIVE.alert('warning',gettext('Please correct these errors'),err_msg,false);
+            return false;
+        }
+        var fun_cb = function(response){
+            box.trigger("box:finish", {"response":response});
+        };
+        if (action.confirm_msg) {
+            if ($HIVE.confirm(action.confirm_msg)) {
+                if (action.alert_msg) {
+                    window.alert(action.alert_msg);
+                }
+                perform_action(action, post_data, fun_cb);
+            }
+        } else {
+            if (action.alert_msg) {
+                window.alert(action.alert_msg);
+            }
+            perform_action(action, post_data, fun_cb);
+        }
+    });
+});
+{% if 0 %}
+</script>
+{% endif %}
+{% endblock %}
Index: /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/media/js/coffee/widget-form.coffee
===================================================================
--- /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/media/js/coffee/widget-form.coffee	(revision 38909)
+++ /branches/rel_apv_10_7/usr/click/webui/htdocs/new/src/media/js/coffee/widget-form.coffee	(working copy)
@@ -1156,6 +1156,10 @@
                         $(".importlocalfile_" + _this.widget.name + " #uploaded_file_url").remove();
                         $('<p/>').attr({'id':'uploaded_file_name'}).text(file.name + ' uploaded.').appendTo($('#'+id))
                         $('<input>').attr({'type':'hidden','id':'uploaded_file_url','value':file.url}).appendTo($('#'+id))
+                        if (file.name + "").toLowerCase().indexOf(".pfx") != -1 && $('.passwordinput_pfx_pass').length
+                            $('.passwordinput_pfx_pass').parent().css('display', 'block');
+                        else if $('.passwordinput_pfx_pass').length
+                            $('.passwordinput_pfx_pass').parent().css('display', 'none');
                         return
                     return
                 add: (e, data) ->
