form-fields
1 year ago
modules
1 year ago
module-editor.blade.php
1 year ago
module-picker.blade.php
1 year ago
module-templates.blade.php
1 year ago
overview.blade.php
1 year ago
module-editor.blade.php
48 lines
| 1 | @php /** @var \IAWP\Env $env */ @endphp |
| 2 | @php /** @var \IAWP\Overview\Modules\Module $module */ @endphp |
| 3 | |
| 4 | <div class="iawp-module module-editor {{ $module !== null && $module->is_full_width() ? 'full-width' : '' }}" |
| 5 | data-controller="module-editor" |
| 6 | data-module-editor-module-id-value="{{ $module->id() }}" |
| 7 | data-module-editor-reports-value="{{ esc_attr(json_encode($module->get_report_details())) }}"> |
| 8 | <header class="module-header"> |
| 9 | <div class="module-icon"> |
| 10 | @include('icons.overview.' . $module->module_type()) |
| 11 | </div> |
| 12 | <div class="module-title-container"> |
| 13 | <h2>{{ $module->module_name() }}</h2> |
| 14 | </div> |
| 15 | <button class="iawp-button module-editing-buttons change-module-type" data-action="module-editor#changeModuleType">{{ __('Change Module Type', 'independent-analytics') }}</button> |
| 16 | <button class="iawp-button module-editing-buttons cancel-module-edit" data-module-editor-target="cancelButton" data-action="module-editor#cancel">{{ __('Cancel', 'independent-analytics') }}</button> |
| 17 | </header> |
| 18 | |
| 19 | <div class="module-contents"> |
| 20 | <div> |
| 21 | <form class="iawp-module-editor-form" data-action="module-editor#save"> |
| 22 | <input type="hidden" name="module_type" value="{{ $module->module_type() }}"> |
| 23 | <div> |
| 24 | <label>{{ esc_html__('Name', 'independent-analytics') }}</label> |
| 25 | <input type="text" |
| 26 | name="name" |
| 27 | value="{{ $module->is_saved() ? $module->name() : $module->module_name() }}" |
| 28 | autofocus |
| 29 | required |
| 30 | data-1p-ignore |
| 31 | > |
| 32 | </div> |
| 33 | |
| 34 | {!! $module->get_form_fields_html() !!} |
| 35 | |
| 36 | <footer> |
| 37 | <button type="submit" |
| 38 | class="module-save-button iawp-button purple" |
| 39 | data-module-editor-target="saveButton" |
| 40 | data-loading-text="{{ __('Saving...') }}" |
| 41 | > |
| 42 | {{ $module->is_saved() ? __('Save', 'independent-analytics') : __('Add Module', 'independent-analytics') }} |
| 43 | </button> |
| 44 | </footer> |
| 45 | </form> |
| 46 | </div> |
| 47 | </div> |
| 48 | </div> |