public function get_cms_admin_edit() { $cols = []; $cols[] = node::create('td span.btn.btn-default.live' . ($this->live ? '' : '.not_live'), [], icon::get($this->live ? 'ok' : 'remove')); $cols[] = node::create('td span.btn.btn-default.edit', ['href' => '/' . $this->fid . '/?module=\\module\\cms\\object\\_cms_module&act=get_edit_field_form&fid=' . $this->fid, 'data-target' => '#modal', 'data-toggle' => 'modal'], icon::get('pencil')); $cols[] = node::create('td', [], $this->fid); $cols[] = node::create('td', [], node::create('a.up.reorder.btn.btn-default', ['data-ajax-click' => 'cms:do_reorder_fields', 'data-ajax-post' => '{"mid":' . $this->parent_form->get_module_id() . ',"fid":' . $this->fid . ',"dir":"up"}'], icon::get('arrow-up')) . node::create('a.down.reorder.btn.btn-default', ['data-ajax-click' => 'cms:do_reorder_fields', 'data-ajax-post' => '{"mid":' . $this->parent_form->get_module_id() . ',"fid":' . $this->fid . ',"dir":"down"}'], icon::get('arrow-down'))); $cols[] = node::create('td', [], $this->title); $cols[] = node::create('td', [], $this->field_name); $cols[] = node::create('td', [], get::__class_name($this)); $fields = ['list', 'required', 'filter']; foreach ($fields as $field) { $list_options = ['data-ajax-change' => 'form\\field_boolean:update_cms_setting', 'data-ajax-post' => '{"fid":' . $this->fid . ', "field":"' . $field . '"}', 'value' => 1, 'type' => 'checkbox']; if ($this->{$field}) { $list_options['checked'] = 'checked'; } $cols[] = node::create('td input#' . $this->fid . '_list', $list_options); } $cols[] = node::create('td', [], $this instanceof field_image ? $this->get_image_edit_link() : ''); return $cols; }