Method: Ezframe::SubEditor#make_edit_form
- Defined in:
- lib/ezframe/sub_editor.rb
#make_edit_form(command = :edit) ⇒ Object
編集フォームの生成
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/ezframe/sub_editor.rb', line 192 def make_edit_form(command = :edit) # @id ||= get_id if command == :edit && !@id EzLog.error "make_edit_form: @id is not defined" end target_keys = @edit_keys || @column_set.keys list = target_keys.map do |colkey| column = @column_set[colkey.to_sym] unless column EzLog.error("undefined column entry: #{colkey}") next end make_edit_line(column) end.compact event = "on=click:url=#{make_base_url(@id)}/#{command}:with=form" = Ht.(id: "#{@class_snake}-#{command}-finish-button", class: %w[btn], child: [Ht.icon("check"), Message[:edit_finish_button_label]], event: event) = ("on=click:url=#{make_base_url(@id)}/#{command}:cancel=true:with=form") list.push(Ht.p(class: %w[edit-finish-buttons], child: [, ])) return Ht.form(list) end |