-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Anexo de proyectofinanciero con turbo en lugar de coccon+jquery. Closes
- Loading branch information
Showing
10 changed files
with
56 additions
and
34 deletions.
There are no files selected for viewing
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
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
18 changes: 10 additions & 8 deletions
18
app/views/cor1440_gen/anexos_proyectofinanciero/create.turbo_stream.erb
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 |
---|---|---|
@@ -1,22 +1,24 @@ | ||
<%= simple_form_for @proyectofinanciero do |f| %> | ||
<%= f.simple_fields_for :anexo, | ||
child_index: params[:index] do |subf| %> | ||
<%= simple_form_for @proyectofinanciero, multipart: true do |f| %> | ||
<%= f.simple_fields_for :anexo_proyectofinanciero, | ||
child_index: params[:index] do |ap| %> | ||
<%= turbo_stream.replace "agregar-anexo-proyectofinanciero" do %> | ||
<%= f.submit "Agregar Anexo", | ||
class: "btn btn-sm btn-primary", | ||
data: { | ||
disable_with: false | ||
}, | ||
formaction: cor1440_gen.crear_anexo_proyectofinanciero_path( | ||
subf.index.to_i + 1 | ||
ap.index.to_i + 1 | ||
), | ||
formmethod: :post, | ||
formnovalidate: true, | ||
id: "agregar-anexo-proyectofinanciero", | ||
name: "agregar-anexo-proyectofinanciero" %> | ||
<% end %> | ||
<%= turbo_stream.append "anexos_proyectofinanciero_marco" do %> | ||
<%= render partial: | ||
"/cor1440_gen/proyectosfinancieros/anexo_proyectofinanciero_campos", | ||
locals: {f: ap} %> | ||
<% end %> | ||
<% end %> | ||
<%= turbo_stream.append "anexos_proyectofinanciero_marco" do %> | ||
<%= render "/cor1440_gen/proyectosfinancieros/anexo_campos", f: subf %> | ||
<% 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
22 changes: 21 additions & 1 deletion
22
app/views/cor1440_gen/proyectosfinancieros/_anexos.html.erb
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 |
---|---|---|
@@ -1 +1,21 @@ | ||
<%= render 'campo_anexo_proyectofinanciero', f: f %> | ||
<div id="anexos_proyectofinanciero_marco"> | ||
<%= f.simple_fields_for :anexo_proyectofinanciero, | ||
child_index: params[:index] do |a| %> | ||
<%= render partial: 'anexo_proyectofinanciero_campos', | ||
locals: {f: a} %> | ||
<% end %> | ||
</div> | ||
<div class="enlace-agregar-anexo"> | ||
<%= f.submit "Agregar anexo", | ||
class: 'btn btn-sm btn-primary', | ||
data: { | ||
disable_with: false | ||
}, | ||
formaction: cor1440_gen.crear_anexo_proyectofinanciero_path( | ||
index: @proyectofinanciero.anexo.size | ||
), | ||
formmethod: :post, | ||
formnovalidate: true, | ||
id: "agregar-anexo-proyectofinanciero", | ||
name: "agregar-anexo-proyectofinanciero" %> | ||
</div> |
17 changes: 0 additions & 17 deletions
17
app/views/cor1440_gen/proyectosfinancieros/_campo_anexo_proyectofinanciero.html.erb
This file was deleted.
Oops, something went wrong.
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