Skip to content

Commit

Permalink
Merge pull request #354 from uzulla/issue337/set-explicit-form-action
Browse files Browse the repository at this point in the history
Formにactionプロパティを明記 #337
  • Loading branch information
fc2dev authored Aug 7, 2021
2 parents 170937a + 3b368f8 commit d993a12
Show file tree
Hide file tree
Showing 59 changed files with 185 additions and 179 deletions.
4 changes: 2 additions & 2 deletions app/src/config/fc2_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
\$__str__2 = __("Password");
\$__str__3 = __("Submit");
echo <<<HTML
<form method="POST">
<form action="index.php" method="post">
<input type="hidden" name="mode" value="Entries" />
<input type="hidden" name="process" value="password" />
<input type="hidden" name="id" value="{\$entry['id']}" />
Expand Down Expand Up @@ -537,7 +537,7 @@ function getTopentryDiscription(): string
\$__str__2 = __("Password");
\$__str__3 = __("Submit");
echo <<<HTML
<form method="POST">
<form action="" method="post">
<input type="hidden" name="mode" value="Entries" />
<input type="hidden" name="process" value="password" />
<input type="hidden" name="id" value="{\$entry['id']}" />
Expand Down
138 changes: 70 additions & 68 deletions app/templates/default/fc2_default_template_sp.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,87 +135,89 @@ function submit(){
<!--/allow_comment-->
<!--deny_comment-->
<li>
<span><%template_cm_close></span>
<span><%template_cm_close></span>
</li>
<!--/deny_comment-->
<!--/deny_comment-->
</ul>
</div>
<div class="pager">
<!--preventry--><a href="<%preventry_url><%tail_url>" class="prevpage"><%template_goto_preventry></a><!--/preventry-->
<!--nextentry--><a href="<%nextentry_url><%tail_url>" class="nextpage"><%template_goto_nextentry></a><!--/nextentry-->
<!--preventry--><a href="<%preventry_url><%tail_url>" class="prevpage"><%template_goto_preventry></a>
<!--/preventry-->
<!--nextentry--><a href="<%nextentry_url><%tail_url>" class="nextpage"><%template_goto_nextentry></a>
<!--/nextentry-->
</div>
<!--/topentry-->
<!--/permanent_area-->
<!--/permanent_area-->
<!--form_area-->
<!--コメント投稿ページ-->
<!--form_area-->
<!--コメント投稿ページ-->
<div id="comment_post" class="section">
<div class="page_title">
<h2><%template_post_comment></h2>
</div>
<form method="post" name="form1" action="./">
<dl class="form">
<dt><%template_name></dt>
<dd><input type="text" name="comment[name]" /></dd>
<dt><%template_title></dt>
<dd><input type="text" name="comment[title]" /></dd>
<dt><%template_address></dt>
<dd><input type="email" name="comment[mail]" /></dd>
<dt>URL</dt>
<dd><input type="url" name="comment[url]" /></dd>
<dt><%template_body></dt>
<dd><textarea name="comment[body]"></textarea></dd>
<dt><%template_password></dt>
<dd><input type="password" name="comment[pass]" /></dd>
<dt><%template_privacy_set></dt>
<dd>
<select name="comment[himitu]">
<option value ="0"><%template_privacy_public></option>
<option value ="1"><%template_privacy_secret></option>
</select>
</dd>
<div class="page_title">
<h2><%template_post_comment></h2>
</div>
<form action="./" method="post" name="form1">
<dl class="form">
<dt><%template_name></dt>
<dd><input type="text" name="comment[name]"/></dd>
<dt><%template_title></dt>
<dd><input type="text" name="comment[title]"/></dd>
<dt><%template_address></dt>
<dd><input type="email" name="comment[mail]"/></dd>
<dt>URL</dt>
<dd><input type="url" name="comment[url]"/></dd>
<dt><%template_body></dt>
<dd><textarea name="comment[body]"></textarea></dd>
<dt><%template_password></dt>
<dd><input type="password" name="comment[pass]"/></dd>
<dt><%template_privacy_set></dt>
<dd>
<select name="comment[himitu]">
<option value="0"><%template_privacy_public></option>
<option value="1"><%template_privacy_secret></option>
</select>
</dd>
</dl>
<input type="hidden" name="mode" value="regist" />
<input type="hidden" name="comment[no]" value="<%pno>" />
<input type="hidden" name="mobile" value="1" />
<!--private_area--><input type="hidden" name="spass" value="<%spass>" /><!--/private_area-->
<div class="submit_btn">
<a href="#" onclick="submit();return false;"><%template_send></a>
</div>
</form>
<ul class="contents_footer">
<li><a href="<%url>?no=<%pno><%tail_url>"><%template_return_post></a></li>
</ul>
<input type="hidden" name="mobile" value="1"/>
<!--private_area--><input type="hidden" name="spass" value="<%spass>"/><!--/private_area-->
<div class="submit_btn">
<a href="#" onclick="submit();return false;"><%template_send></a>
</div>
</form>
<ul class="contents_footer">
<li><a href="<%url>?no=<%pno><%tail_url>"><%template_return_post></a></li>
</ul>
</div>
<!--/form_area-->
<!--/form_area-->
<!--edit_area-->
<!--コメントエディットエリア開始-->
<div id="comment_post" class="section">
<div class="page_title">
<h2><%template_edit_comment></h2>
</div>
<form method="post" name="form1" action="./">
<dl class="form">
<dt><%template_name></dt>
<dd><input type="text" name="edit[name]" value="<%edit_name>" /></dd>
<dt><%template_title></dt>
<dd><input type="text" name="edit[title]" value="<%edit_title>" /></dd>
<dt><%template_address></dt>
<dd><input type="email" name="edit[mail]" value="<%edit_mail>" ></dd>
<dt>URL</dt>
<dd><input type="url" name="edit[url]" value="<%edit_url>" /></dd>
<dt><%template_body></dt>
<dd><textarea name="edit[body]"><%edit_body></textarea></dd>
<dt><%template_password></dt>
<dd><input type="password" name="edit[pass]" /></dd>
<dt><%template_privacy_set></dt>
<dd>
<select name="edit[himitu]">
<option value ="0"><%template_privacy_public></option>
<option value ="1"><%template_privacy_secret></option>
</select>
</dd>
<!--edit_area-->
<!--コメントエディットエリア開始-->
<div id="comment_post" class="section">
<div class="page_title">
<h2><%template_edit_comment></h2>
</div>
<form action="./" method="post" name="form1">
<dl class="form">
<dt><%template_name></dt>
<dd><input type="text" name="edit[name]" value="<%edit_name>"/></dd>
<dt><%template_title></dt>
<dd><input type="text" name="edit[title]" value="<%edit_title>"/></dd>
<dt><%template_address></dt>
<dd><input type="email" name="edit[mail]" value="<%edit_mail>"></dd>
<dt>URL</dt>
<dd><input type="url" name="edit[url]" value="<%edit_url>"/></dd>
<dt><%template_body></dt>
<dd><textarea name="edit[body]"><%edit_body></textarea></dd>
<dt><%template_password></dt>
<dd><input type="password" name="edit[pass]"/></dd>
<dt><%template_privacy_set></dt>
<dd>
<select name="edit[himitu]">
<option value="0"><%template_privacy_public></option>
<option value="1"><%template_privacy_secret></option>
</select>
</dd>
</dl>
<div class="submit_btn">
<input type="submit" value="<%template_update>">
Expand Down
4 changes: 2 additions & 2 deletions app/templates/skeleton/fc2_skeleton_template_sp.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<div class="page_title">
<h2>コメントを書く</h2>
</div>
<form method="post" name="form1" action="./">
<form action="./" method="post" name="form1">
<dl class="form">
<dt>名前</dt>
<dd><input type="text" name="comment[name]"/></dd>
Expand Down Expand Up @@ -220,7 +220,7 @@
<div class="page_title">
<h2>コメントを編集する</h2>
</div>
<form method="post" name="form1" action="../../config">
<form action="../../config" method="post" name="form1">
<dl class="form">
<dt>名前</dt>
<dd><input type="text" name="edit[name]" value="<%edit_name>"/></dd>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_plugins/create.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a class="admin_common_btn create_btn" href="{{ url(req, 'BlogPlugin', 'index') }}">{{ _('Plugin management') }}</a>
</p>

<form method="POST" id="sys-blog-plugin-form" class="admin-form">
<form action="create" method="post" id="sys-blog-plugin-form" class="admin-form">

{{ input(req, 'blog_plugin[device_type]', 'hidden') }}
{{ input(req, 'blog_plugin[category]', 'hidden') }}
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_plugins/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block content %}
<header><h2>{{ _('I want to edit the plugin') }}</h2></header>

<form method="POST" id="sys-blog-plugin-form" class="admin-form">
<form action="edit" method="post" id="sys-blog-plugin-form" class="admin-form">

<input type="hidden" name="id" value="{{ req.get('id') }}"/>
{{ input(req, 'blog_plugin[device_type]', 'hidden') }}
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_plugins/edit_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block content %}
<header><h1 class="in_menu sh_heading_main_b"><span class="h1_title">{{ _('I want to edit the plugin') }}</span></h1></header>

<form method="POST" id="sys-blog-plugin-form" class="admin-form">
<form action="edit" method="post" id="sys-blog-plugin-form" class="admin-form">

<input type="hidden" name="id" value="{{ req.get('id') }}"/>
{{ input(req, 'blog_plugin[device_type]', 'hidden') }}
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_plugins/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</div>
</div>

<form action="{{ url(req, 'BlogPlugins', 'sort') }}" method="POST" id="sys-order" style="display: none;">
<form action="{{ url(req, 'BlogPlugins', 'sort') }}" method="post" id="sys-order" style="display: none;">
{% for category, blog_plugins in category_blog_plugins %}
<h3>{{ _('Category') }}{{ category }}</h3>
<ul id="sys-category-{{ category }}" class="jquery-ui-sortable mb20"></ul>
Expand Down
4 changes: 2 additions & 2 deletions app/twig_templates/admin/blog_plugins/index_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
</ul>
</div>

<form action="{{ url(req, 'BlogPlugins', 'display_changes') }}" method="POST" id="sys-display">
<form action="{{ url(req, 'BlogPlugins', 'display_changes') }}" method="post" id="sys-display">
<input type="hidden" name="device_type" value="{{ device_type }}"/>
<input type="hidden" name="sig" value="{{ sig }}"/>
</form>
<form action="{{ url(req, 'BlogPlugins', 'sort') }}" method="POST" id="sys-order">
<form action="{{ url(req, 'BlogPlugins', 'sort') }}" method="post" id="sys-order">
<input type="hidden" name="device_type" value="{{ device_type }}"/>
<input type="hidden" name="sig" value="{{ sig }}"/>
</form>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_plugins/register.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a class="admin_common_btn create_btn" href="{{ url(req, 'blog_plugins', 'index') }}">{{ _('Plugin management') }}</a>
</p>

<form method="POST" id="sys-plugin-form" class="admin-form">
<form action="register" method="post" id="sys-plugin-form" class="admin-form">

<input type="hidden" name="id" value="{{ req.get('id') }}"/>
<input type="hidden" name="sig" value="{{ sig }}"/>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_settings/comment_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% include('admin/blog_settings/tab.twig') %}

<form method="POST" id="sys-blog-template-form" class="admin-form">
<form action="comment_edit" method="post" id="sys-blog-template-form" class="admin-form">

<table>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% include('admin/blog_settings/tab_sp.twig') %}

<h2 id="blog_settings"><span class="h2_inner">{{ _('Setting') }}</span></h2>
<form method="POST" id="sys-blog-template-form" class="admin-form">
<form action="comment_edit" method="post" id="sys-blog-template-form" class="admin-form">
<div class="form_area">
<div class="form_contents">
<h4>{{ _('Approval settings') }}</h4>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_settings/entry_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% include('admin/blog_settings/tab.twig') %}

<form method="POST" id="sys-blog-template-form" class="admin-form">
<form action="entry_edit" method="post" id="sys-blog-template-form" class="admin-form">

<table>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_settings/entry_edit_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% include('admin/blog_settings/tab_sp.twig') %}

<h2 id="blog_settings"><span class="h2_inner">{{ _('Setting') }}</span></h2>
<form method="POST" id="sys-blog-template-form" class="admin-form">
<form action="entry_edit" method="post" id="sys-blog-template-form" class="admin-form">
<div class="form_area">
<div class="form_contents">
<h4>{{ _('Display the latest entries') }}</h4>
Expand Down
4 changes: 2 additions & 2 deletions app/twig_templates/admin/blog_settings/etc_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% include('admin/blog_settings/tab.twig') %}

<form method="POST" id="sys-blog-template-form" class="admin-form">
<forma action="etc_edit" method="post" id="sys-blog-template-form" class="admin-form">

<table>
<tbody>
Expand All @@ -26,5 +26,5 @@
</table>
<input type="hidden" name="sig" value="{{ sig }}">

</form>
</forma>
{% endblock %}
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_settings/etc_edit_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% include('admin/blog_settings/tab_sp.twig') %}

<h2 id="blog_settings"><span class="h2_inner">{{ _('Setting') }}</span></h2>
<form method="POST" id="sys-blog-template-form" class="admin-form">
<form action="etc_edit" method="post" id="sys-blog-template-form" class="admin-form">
<div class="form_area">
<div class="form_contents">
<h4>{{ _('Initial display page') }}</h4>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_templates/create.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<header><h2>{{ _('I want to create a template') }}</h2></header>

<form method="POST" id="sys-blog-template-form" class="admin-form">
<form action="create" method="post" id="sys-blog-template-form" class="admin-form">

{{ input(req, 'blog_template[device_type]', 'hidden') }}
{{ input(req, 'sig', 'hidden', {'value': sig} ) }}
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blog_templates/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<header><h2>{{ _('I want to edit the template') }}</h2></header>

<form method="POST" id="sys-blog-template-form" class="admin-form">
<form action="edit" method="post" id="sys-blog-template-form" class="admin-form">

<input type="hidden" name="id" value="{{ req.get('id') }}"/>
<input type="hidden" name="sig" value="{{ sig }}"/>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blogs/create.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block content %}
<header><h2>{{ _('New registration of the blog') }}</h2></header>

<form method="POST" class="admin-form">
<form action="create" method="post" class="admin-form">

<table>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blogs/create_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block content %}
<header><h1 class="in_menu sh_heading_main_b"><span class="h1_title">{{ _('New registration of the blog') }}</span></h1></header>

<form method="POST" class="admin-form">
<form action="create" method="post" class="admin-form">
<div class="form_area">
<div class="form_contents">
<h4>{{ _('Blog ID') }}</h4>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blogs/delete.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% include('admin/blog_settings/tab.twig') %}

<form method="POST" id="sys-blogs-form" class="admin-form">
<form action="delete" method="post" id="sys-blogs-form" class="admin-form">
<table>
<tbody>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions app/twig_templates/admin/blogs/delete_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% include('admin/blog_settings/tab_sp.twig') %}

<h2 id="blog_settings"><span class="h2_inner">{{ _('Delete confirmation') }}</span></h2>
<form method="POST" id="sys-blogs-form" class="admin-form">
<form action="delete" method="post" id="sys-blogs-form" class="admin-form">
<div class="form_area">
<div class="form_contents">{{ _('If you want to delete the blog, please tap the "Delete" button Check the "Delete confirmation".') }}</div>
<div class="form_contents">
Expand All @@ -22,7 +22,7 @@
</div>
<div class="form_area">
<div class="form_contents">
<div clas="btn">
<div class="btn">
<button type="button" class="btn_contents touch" id="sys-withdrawal">{{ _('Delete') }}<i class="delete_icon btn_icon"></i></button>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blogs/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{% include('admin/blog_settings/tab.twig') %}

<form method="POST" class="admin-form">
<form action="edit" method="post" class="admin-form">

<table>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion app/twig_templates/admin/blogs/edit_sp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% include('admin/blog_settings/tab_sp.twig') %}

<h2 id="blog_settings"><span class="h2_inner">{{ _('Setting') }}</span></h2>
<form method="POST" class="admin-form">
<form action="edit" method="post" class="admin-form">
<div class="form_area">
<div class="form_contents">
<h4>{{ _('Blog name') }}</h4>
Expand Down
Loading

0 comments on commit d993a12

Please sign in to comment.