<commit_before><!-- Form to create or update a blog post
  -  Copyright (C) 2011 <NAME>
  -  Written by <NAME> (<EMAIL>)
  -
  -  Licensed under the Apache License, Version 2.0 (the "License");
  -  you may not use this file except in compliance with the License.
  -  You may obtain a copy of the License at
  -
  -      http://www.apache.org/licenses/LICENSE-2.0
  -
  -  Unless required by applicable law or agreed to in writing, software
  -  distributed under the License is distributed on an "AS IS" BASIS,
  -  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  -  See the License for the specific language governing permissions and
  -  limitations under the License.
  -->
<ui:composition
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:util="http://code.google.com/p/ada-asf/util"
        xmlns:c="http://java.sun.com/jstl/core"
	xmlns:u="http://code.google.com/p/ada-asf/util"
        xmlns:h="http://java.sun.com/jsf/html">

  <div class='awa-post ui-widget ui-widget-content ui-corner-all awa-form'>
    <h2>#{blogMsg.blog_post_update_title}</h2>
    <h:form id='post'>
        <input type="hidden" name="blog_id" value="#{blog.id}"/>
        <input type="hidden" name="post_id" value="#{param['post_id']}"/>
        <div class='grid_8'>
            <dl class="awa-required#{util:hasMessage('title') ? ' awa-error' : ''}">
                <dt>
                    <label for='title'>#{blogMsg.blog_post_title_label}</label>
                    <h:message for='title' styleClass='error'/>
                </dt>
                <dd>
                    <h:inputText id='title' size='50' required='true' value='#{post.title}'/>
                </dd>
                <dt>
                    <label for='text'>#{blogMsg.blog_post_text_label}</label>
                </dt>
                <dd>
                    <h:inputTextarea id='text' rows='20' required='false' value='#{post.text}'/>
                </dd>
            </dl>
        </div>
        <div class='grid_4'>
            <dl class="awa-required">
                <dt>
                    <label for="post-status">#{blogMsg.blog_post_status_label}</label>
                </dt>
                <dd>
                    <h:selectOneMenu id='post-status' size='10' value='#{post.status}'
                                     styleClass="ui-state-default ui-corner-all">
                        <f:selectItems value="#{postStatusList}"/>
                    </h:selectOneMenu>
                </dd>
            </dl>
            <dl class="awa-required">
                <dt>
                    <label for="post-status">#{blogMsg.blog_post_publish_date_label}</label>
                </dt>
                <dd>
                    #{empty post.publish_date ? post.create_date : post.publish_date}
                </dd>
            </dl>
            <dl class="awa-optional">
                <dd>
                    <ui:include src="syntax.xhtml"/>
                </dd>
            </dl>
        </div>

        <ul class='awa-buttons'>
            <li>
                <h:commandButton id='save' value='#{blogMsg.blog_post_save_button}'
                                 styleClass="ui-button ui-state-default ui-corner-all"
                                 action="#{post.save}" title="#{blogMsg.blog_post_save_title}"/>
            </li>
        </ul>
    </h:form>
  </div>

</ui:composition>

<commit_msg>Use <h:inputHidden> to pass the blog id and post id<commit_after><!-- Form to create or update a blog post
  -  Copyright (C) 2011 <NAME>
  -  Written by <NAME> (<EMAIL>)
  -
  -  Licensed under the Apache License, Version 2.0 (the "License");
  -  you may not use this file except in compliance with the License.
  -  You may obtain a copy of the License at
  -
  -      http://www.apache.org/licenses/LICENSE-2.0
  -
  -  Unless required by applicable law or agreed to in writing, software
  -  distributed under the License is distributed on an "AS IS" BASIS,
  -  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  -  See the License for the specific language governing permissions and
  -  limitations under the License.
  -->
<ui:composition
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:util="http://code.google.com/p/ada-asf/util"
        xmlns:c="http://java.sun.com/jstl/core"
	xmlns:u="http://code.google.com/p/ada-asf/util"
        xmlns:h="http://java.sun.com/jsf/html">

  <div class='awa-post ui-widget ui-widget-content ui-corner-all awa-form'>
    <h2>#{blogMsg.blog_post_update_title}</h2>
    <h:form id='post'>
        <h:inputHidden id='post-id' value='#{post.id}'/>
        <h:inputHidden id='post-blog-id' value='#{post.blogId}'/>
        <input type="hidden" name="blog_id" value="#{blog.id}"/>
        <div class='grid_8'>
            <dl class="awa-required#{util:hasMessage('title') ? ' awa-error' : ''}">
                <dt>
                    <label for='title'>#{blogMsg.blog_post_title_label}</label>
                    <h:message for='title' styleClass='error'/>
                </dt>
                <dd>
                    <h:inputText id='title' size='50' required='true' value='#{post.title}'/>
                </dd>
                <dt>
                    <label for='text'>#{blogMsg.blog_post_text_label}</label>
                </dt>
                <dd>
                    <h:inputTextarea id='text' rows='20' required='false' value='#{post.text}'/>
                </dd>
            </dl>
        </div>
        <div class='grid_4'>
            <dl class="awa-required">
                <dt>
                    <label for="post-status">#{blogMsg.blog_post_status_label}</label>
                </dt>
                <dd>
                    <h:selectOneMenu id='post-status' size='10' value='#{post.status}'
                                     styleClass="ui-state-default ui-corner-all">
                        <f:selectItems value="#{postStatusList}"/>
                    </h:selectOneMenu>
                </dd>
            </dl>
            <dl class="awa-required">
                <dt>
                    <label for="post-status">#{blogMsg.blog_post_publish_date_label}</label>
                </dt>
                <dd>
                    #{empty post.publish_date ? post.create_date : post.publish_date}
                </dd>
            </dl>
            <dl class="awa-optional">
                <dd>
                    <ui:include src="syntax.xhtml"/>
                </dd>
            </dl>
        </div>

        <ul class='awa-buttons'>
            <li>
                <h:commandButton id='save' value='#{blogMsg.blog_post_save_button}'
                                 styleClass="ui-button ui-state-default ui-corner-all"
                                 action="#{post.save}" title="#{blogMsg.blog_post_save_title}"/>
            </li>
        </ul>
    </h:form>
  </div>

</ui:composition>


{'fraction_non_alphanumeric': 0.15013519282766472, 'fraction_numerical': 0.00512309662729472, 'mean_word_length': 1.6460843373493976, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 133, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '675601', 'n_tokens_mistral': 2167, 'n_tokens_neox': 2089, 'n_words': 427}