/** * @inheritdoc */ public function init() { parent::init(); $this->settings = ArrayHelper::merge($this->defaultSettings, $this->settings); $this->checkBehavior(); $this->checkMultiple(); $this->setupCsrf(); $this->setupUrl(); $this->setupAttachments(); $this->setupTemplate(); }
" class="attachment-widget__input"> </div> <?php if (isset($settings['autoUpload']) && $settings['autoUpload'] == false) { ?> <div class="btn btn-success" data-attachment="empty.hide"> <span data-attachment="ctrl.upload"><?php echo Widget::t('widget', 'Upload'); ?> </span> </div> <?php } ?> <div class="btn btn-danger" data-attachment="empty.hide" title="<?php echo Widget::t('widget', 'Remove'); ?> "> <div data-attachment="remove"> <span class="glyphicon glyphicon-trash"></span> </div> </div> </div> <div class="alert alert-danger" data-attachment="error" style="display:none"></div> <input type="hidden" name="<?php echo $inputName; ?> " value="" data-attachment="input" /> </div>
</div> </div> <div class="attachment-widget__actions" data-attachment="active.hide"> <div class="btn attachment-widget__button-add"> <span><i class="glyphicon glyphicon-folder-open"></i> <?php echo Widget::t('widget', 'Add'); ?> </span> <input type="file" name="<?php echo $paramName; ?> " class="attachment-widget__input"> </div> <?php if (isset($settings['autoUpload']) && $settings['autoUpload'] == false) { ?> <div class="btn btn-success" data-attachment="emptyQueue.hide"> <span data-attachment="ctrl.upload"><?php echo Widget::t('widget', 'Upload'); ?> </span> </div> <?php } ?> </div> </div>