Remove deprecated editor

This commit is contained in:
Paul Chavard 2018-12-19 15:18:34 +01:00
parent 2632ccef9c
commit 3446782cd0
23 changed files with 0 additions and 1305 deletions

View file

@ -1,86 +0,0 @@
= f.fields_for type_de_champ_service.fields_for_var, types_de_champ, remote: true do |ff|
- type_champ = ff.object.type_champ
.form-inline{ class: (type_champ == TypeDeChamp.type_champs.fetch(:header_section) ? 'header-section' : nil) }
.form-group.libelle
%h4 Libellé
= ff.text_field :libelle, class: 'form-control libelle', placeholder: 'Libellé'
.form-group.type
%h4 Type
= ff.select :type_champ, type_de_champ_service.options, {}, { class: 'form-control type-champ' }
.form-group.description
%h4 Description
= ff.text_area :description, class: 'form-control description', placeholder: 'Description', rows: 3
.form-group.drop-down-list{ class: (%w(drop_down_list multiple_drop_down_list linked_drop_down_list).include?(type_champ) ? 'show-inline' : nil), style: 'margin-right: 5px;' }
%h4 Liste déroulante
= ff.fields_for :drop_down_list_attributes, ff.object.drop_down_list do |fff|
~ fff.text_area :value, class: 'form-control drop_down_list', placeholder: "Ecrire une valeur par ligne et --valeur-- pour un séparateur.", rows: 3, cols: 30
= fff.hidden_field :id
.form-group.pj-template{ class: (type_champ == TypeDeChamp.type_champs.fetch(:piece_justificative)) ? 'show-inline' : nil }
%h4 Modèle
- if type_champ == TypeDeChamp.type_champs.fetch(:piece_justificative)
- template = ff.object.piece_justificative_template
- if !template.attached?
= ff.file_field :piece_justificative_template,
direct_upload: true
- else
= link_to template.filename.to_s, url_for(template), target: '_blank', rel: 'noopener'
%br
Modifier :
= ff.file_field :piece_justificative_template,
direct_upload: true
- else
= ff.file_field :piece_justificative_template,
direct_upload: true
.form-group.carte-options{ class: (type_champ == TypeDeChamp.type_champs.fetch(:carte)) ? 'show-inline' : nil }
%h4 Utilisation de la cartographie
%label
= ff.check_box :quartiers_prioritaires
Quartiers prioritaires
%br
%label
= ff.check_box :cadastres
Cadastre
%br
%label
= ff.check_box :parcelles_agricoles
Parcelles Agricoles
- hide_mandatory = (ff.object.private? || type_champ == TypeDeChamp.type_champs.fetch(:explication))
.form-group.mandatory{ style: hide_mandatory ? 'visibility: hidden;' : nil }
%h4 Obligatoire ?
.center
= ff.check_box :mandatory, placeholder: 'Obligatoire ?'
.form-group
= ff.hidden_field :order_place, value: ff.index
= ff.hidden_field :id
- if ff.object.id.present?
.form-group
%br  
- kind = type_de_champ_service.private? ? "private" : "public"
= button_up(@procedure, kind, ff.index, type_de_champ_service.move_up_url(ff))
= button_down(@procedure, kind, ff.index, type_de_champ_service.move_down_url(ff))
.form-group
%h4 position
= ff.number_field :custom_order_place, value: (ff.index + 1), length: 999, class: 'form-control', style: 'width: 100px;'
.form-group
%br  
- if ff.object.id.nil?
= f.button 'Ajouter le champ',
id: type_de_champ_service.add_button_id,
class: 'btn btn-success',
data: { disable: true }
- else
= link_to("", type_de_champ_service.delete_url(ff), method: :delete, remote: true, id: "delete_type_de_champ_#{ff.object.id}", class: %w(form-control btn btn-danger fa fa-trash-o) )
%div{ style: 'background-color: rgb(204, 204, 204); height: 1px; margin: 30px auto;' }

View file

@ -1,11 +0,0 @@
= form_for [:admin, procedure], url: type_de_champ_service.url, remote: true do |f|
= render partial: 'admin/types_de_champ/fields', locals: { type_de_champ_service: type_de_champ_service, types_de_champ: type_de_champ_service.types_de_champ, f: f }
= f.button 'Enregistrer',
id: :save,
class: 'btn btn-success',
data: { disable: true }
%hr
#new_type_de_champ
= render partial: 'admin/types_de_champ/fields', locals: { type_de_champ_service: type_de_champ_service, types_de_champ: type_de_champ_service.new_type_de_champ, f: f }

View file

@ -1,3 +0,0 @@
.row.white-back
#liste-champ
= render partial: 'admin/types_de_champ/form', locals: { procedure: @procedure, type_de_champ_service: @type_de_champ_service }

View file

@ -1,2 +0,0 @@
<%= render_flash(timeout: 3000, sticky: true) %>
<%= render_to_element('#liste-champ', partial: 'admin/types_de_champ/form', locals: { procedure: @procedure, type_de_champ_service: @type_de_champ_service }) %>