Skip to content

Commit

Permalink
Merge pull request #936 from alphagov/allow-creator-subunsub
Browse files Browse the repository at this point in the history
Add subscribe/unsubscribe buttons for creators
  • Loading branch information
pixeltrix authored May 23, 2024
2 parents 976f96c + 5bb1b21 commit 1dcddb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/petitions/admin/views/_shared.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
.button_to {
display: inline-block;

input[type=submit] {
button, input[type=submit] {
margin: 0;
font-size: 12px;
padding: 2px 8px;
Expand Down
6 changes: 5 additions & 1 deletion app/views/admin/signatures/_signature.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@
<% if signature.pending? %>
<%= button_to 'Validate', validate_admin_signature_path(signature, search_params), method: :post, class: 'button validate-action', data: { confirm: 'Validate signature?' } %>
<% else %>
&nbsp;
<% if signature.subscribed? %>
<%= button_to 'Unsubscribe', [:unsubscribe, :admin, @petition, signature, search_params].compact, method: :post, class: 'button unsubscribe-action', data: { confirm: 'Unsubscribe signature?' } %>
<% else %>
<%= button_to 'Subscribe', [:subscribe, :admin, @petition, signature, search_params].compact, method: :post, class: 'button subscribe-action', data: { confirm: 'Subscribe signature?' } %>
<% end %>
<% end %>
<% else %>
<% if signature.validated? %>
Expand Down

0 comments on commit 1dcddb3

Please sign in to comment.