Skip to content

Commit 1ab2d33

Browse files
committed
Remove form with POST action on Update Repo button
Since the Update action does not result in any actual modifications, there is no need to use an HTML form for the Update Repository button on the Manage Repository page. Using a simple link button allows refreshing the Update Repository page without having to re-send non-existent form data. Fixes #300
1 parent fc65cbd commit 1ab2d33

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Source/pages/repo_manage_page.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,13 @@ function convert_to_key_value( $p_array ) {
132132
</div>
133133
<div class="widget-toolbox padding-8 clearfix">
134134
<div class="col-md-6 col-xs-12 no-padding">
135-
<form action="<?php echo plugin_page( 'repo_update_page' ) . '&amp;id=' . $t_repo->id ?>" method="post" class="pull-left">
136-
<input type="submit" class="btn btn-primary btn-white btn-sm btn-round" value="<?php echo plugin_lang_get( 'update_repository' ) ?>"/>
137-
</form>
135+
<?php
136+
print_link_button(
137+
plugin_page( 'repo_update_page' ) . '&id=' . $t_repo->id,
138+
plugin_lang_get( 'update_repository' ),
139+
'btn-sm pull-left'
140+
);
141+
?>
138142
<form action="<?php echo plugin_page( 'repo_delete' ) . '&amp;id=' . $t_repo->id ?>" method="post" class="pull-left">
139143
<?php echo form_security_field( 'plugin_Source_repo_delete' ) ?>
140144
<input type="submit" class="btn btn-primary btn-white btn-sm btn-round" value="<?php echo plugin_lang_get( 'delete_repository' ) ?>"/>

0 commit comments

Comments
 (0)