<mt:var name="page_title" value="<__trans phrase="Publishing Profile">">

<mt:setvarblock name="html_head" append="1">
<script type="text/javascript" src="<mt:var name="static_uri">js/dialog.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
var dialog;
var panels;
function dialog_closed(ok) {
    if (ok) {
        // fill out form and submit to create the association
        var frm = getByID("publishing_profiles_form");
        frm.submit();
    } else {
        parent.jQuery.fn.mtDialog.close();
    }
}
function init() {
    dialog = new Dialog.MultiPanel("profile");
    panels = [];
    var panel;
    panel = new ListingPanel("profile");
    panels[panels.length] = panel;
    panel = new ListingPanel("confirm");
    panels[panels.length] = panel;
    dialog.setPanels(panels);
    dialog.open({}, dialog_closed);
}
/* ]]> */
</script>
</mt:setvarblock>

<mt:include name="dialog/header.tmpl">
<form name="publishing_profiles_form" id="publishing_profiles_form" method="post" action="<mt:var name="script_url">" target="_top" onsubmit="return false">
    <input type="hidden" name="blog_id" value="<mt:var name="blog_id">" />
    <input type="hidden" name="__mode" value="save" />
    <input type="hidden" name="_type" value="blog" />
    <input type="hidden" name="id" value="<mt:var name="blog_id">" />
    <input type="hidden" name="cfg_screen" value="cfg_publish_profile" />
    <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
    <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />

    <div id="profile-panel" class="hidden panel">

        <p><__trans phrase="Choose the profile that best matches the requirements for this blog."></p>

        <mtapp:setting
            id="dynamicity"
            label="<__trans phrase="Publishing Profile">"
            show_label="0"
            label_class="top-label"
            help_page="blog_settings_publishing"
            help_section="dynamic_publishing">
            <ul>
                <li>
                    <input type="radio" id="dynamicity-sync" name="dynamicity" value="none" <mt:if name="dynamicity" eq="none"> checked="checked"</mt:if>/>
                    <label for="dynamicity-sync"><__trans phrase="Static Publishing"> <span class="hint"><__trans phrase="Immediately publish all templates statically."></span></label>
                </li>
                <li>
                    <input type="radio" id="dynamicity-async" name="dynamicity" value="async_all" <mt:if name="dynamicity" eq="async_all"> checked="checked"</mt:if>/>
                    <label for="dynamicity-async"><__trans phrase="Background Publishing"> <span class="hint"><__trans phrase="All templates published statically via Publish Que."></span></label>
                </li>
                <li>
                    <input type="radio" id="dynamicity-partialasync" name="dynamicity" value="async_partial" <mt:if name="dynamicity" eq="async_partial"> checked="checked"</mt:if>/>
                    <label for="dynamicity-partialasync"><__trans phrase="High Priority Static Publishing">
                        <span class="hint">
                <mt:if name="is_blog">
                            <__trans phrase="Immediately publish Main Index template, Entry archives, and Page archives statically. Use Publish Queue to publish all other templates statically.">
                <mt:else>
                            <__trans phrase="Immediately publish Main Index template, Page archives statically. Use Publish Queue to publish all other templates statically.">
                </mt:if>
                        </span>
                    </label>
                </li>
                <li>
                    <input type="radio" id="dynamicity-dynamic" name="dynamicity" value="all" <mt:if name="dynamicity" eq="all"> checked="checked"</mt:if>/>
                    <label for="dynamicity-dynamic"><__trans phrase="Dynamic Publishing"> <span class="hint"><__trans phrase="Publish all templates dynamically."></span></label>
                </li>
                <li>
                    <input type="radio" id="dynamicity-archives" name="dynamicity" value="archives" <mt:if name="dynamicity" eq="archives"> checked="checked"</mt:if>/>
                    <label for="dynamicity-archives"><__trans phrase="Dynamic Archives Only"> <span class="hint"><__trans phrase="Publish all Archive templates dynamically. Immediately publish all other templates statically."></span></label>
                </li>
            </ul>
        </mtapp:setting>
        <div class="actions-bar">
            <button
               type="submit"
               accesskey="s"
               class="action primary button next">
              <__trans phrase="Continue">
            </button>
            <button
               type="submit"
               accesskey="x"
               title="<__trans phrase="Cancel (x)">"
               class="action button mt-close-dialog">
              <__trans phrase="Cancel">
            </button>
        </div>
    </div>
    <div id="confirm-panel" class="hidden panel">
        <p><__trans phrase="This new publishing profile will update your publishing settings."></p>

        <p><strong><__trans phrase="Are you sure you wish to continue?"></strong></p>

        <div class="actions-bar">
            <button
                type="button"
                accesskey="s"
                class="action primary button close">
              <__trans phrase="Confirm">
            </button>
            <button
                type="submit"
                class="cancel action button mt-close-dialog"
                accesskey="x"
                title="<__trans phrase="Cancel (x)">">
              <__trans phrase="Cancel">
            </button>
            <!-- <button
                onclick="toggleHidden('confirm-panel'); toggleHidden('refresh-panel'); return false"
                type="submit"
                accesskey="b"
                title="<__trans phrase="Back (b)">"
                ><__trans phrase="Back"></button> -->
        </div>

    </div>

</form>
<script type="text/javascript">
/* <![CDATA[ */
jQuery(function() {
    init();
});
/* ]]> */
</script>
<mt:include name="dialog/footer.tmpl">
