forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add edit and update method to controller
- Loading branch information
Showing
6 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
decidim-admin/app/commands/decidim/admin/update_share_token.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
module Decidim | ||
module Admin | ||
# A command with all the business logic to create a taxonomy. | ||
# This command is called from the controller. | ||
class UpdateShareToken < Decidim::Commands::UpdateResource | ||
fetch_form_attributes :token, :expires_at, :organization, :user, :token_for | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<% add_decidim_page_title(t(".title")) %> | ||
<div class="item_show__header"> | ||
<h1 class="item_show__header-title"> | ||
<%= t ".title", component_name: translated_attribute(component.name) %> | ||
</h1> | ||
</div> | ||
<div class="item__edit-form"> | ||
<%= decidim_form_for(@form, html: { class: "form-defaults form edit_component_share_token" }) do |f| %> | ||
<div class="card"> | ||
<div class="card-section"> | ||
<%= render partial: "form", object: f %> | ||
</div> | ||
</div> | ||
<div class="item__edit-sticky"> | ||
<div class="item__edit-sticky-container"> | ||
<%= f.submit t(".update"), class: "button button__sm button__secondary" %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters