diff options
| author | 2019-11-08 23:49:43 +0100 | |
|---|---|---|
| committer | 2019-11-08 23:49:43 +0100 | |
| commit | 59f284d229608f0d80784ecfd19742c06db44a8a (patch) | |
| tree | ef2727bb060420d793481ae8f7e629cc918ca04d /app/views/configure/integration.phtml | |
| parent | f1d1d46651140961d6dc9436b3b9c66a2723f896 (diff) | |
Rename sharing action (#2643)
Before, some ad-blocker rules were preventing to display the sharing page
because of its name. I've renamed that page to integration but kept every
thing else identical. So it's still called sharing through out the
application.
If needed, this can be addressed as well.
See #2509 and #2419
Diffstat (limited to 'app/views/configure/integration.phtml')
| -rw-r--r-- | app/views/configure/integration.phtml | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/app/views/configure/integration.phtml b/app/views/configure/integration.phtml new file mode 100644 index 000000000..32ef11716 --- /dev/null +++ b/app/views/configure/integration.phtml @@ -0,0 +1,71 @@ +<?php $this->partial('aside_configure'); ?> + +<div class="post"> + <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> + + <form method="post" action="<?= _url('configure', 'sharing') ?>" + data-simple='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"><div class="stick"><input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="##label##" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" /> + <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled /><a href="#" class="remove btn btn-attention" data-remove="group-share-##key##"><?= _i('close') ?></a></div> + <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>' + data-advanced='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"> + <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /> + <input type="hidden" id="share_##key##_method" name="share[##key##][method]" value="##method##" /> + <input type="hidden" id="share_##key##_field" name="share[##key##][field]" value="##field##" /> + <div class="stick"> + <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" /> + <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?= _t('conf.sharing.share_url') ?>" size="64" /> + <a href="#" class="remove btn btn-attention" data-remove="group-share-##key##" title="<?= _t('conf.sharing.remove') ?>"><?= _i('close') ?></a></div> + <a target="_blank" rel="noreferrer" class="btn" title="<?= _t('conf.sharing.more_information') ?>" href="##help##"><?= _i('help') ?></a> + </div></div>'> + <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> + <legend><?= _t('conf.sharing') ?></legend> + <?php + foreach (FreshRSS_Context::$user_conf->sharing as $key => $share_options) { + $share = FreshRSS_Share::get($share_options['type']); + $share->update($share_options); + ?> + <div class="form-group group-share" id="group-share-<?= $key ?>"> + <label class="group-name"> + <?= $share->name(true) ?> + </label> + <div class="group-controls"> + <input type='hidden' id='share_<?= $key ?>_type' name="share[<?= $key ?>][type]" value='<?= $share->type() ?>' /> + <input type='hidden' id='share_<?= $key ?>_method' name="share[<?= $key ?>][method]" value='<?= $share->method() ?>' /> + <input type='hidden' id='share_<?= $key ?>_field' name="share[<?= $key ?>][field]" value='<?= $share->field() ?>' /> + <div class="stick"> + <input type="text" id="share_<?= $key ?>_name" name="share[<?= $key ?>][name]" class="extend" value="<?= $share->name() ?>" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" data-leave-validation="<?= $share->name() ?>"/> + <?php if ($share->formType() === 'advanced') { ?> + <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="extend" value="<?= $share->baseUrl() ?>" placeholder="<?= _t('conf.sharing.share_url') ?>" size="64" data-leave-validation="<?= $share->baseUrl() ?>"/> + <?php } else { ?> + <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="extend" value="<?= $share->baseUrl() ?>" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled/> + <?php } ?> + <a href='#' class='remove btn btn-attention' data-remove="group-share-<?= $key ?>" title="<?= _t('conf.sharing.remove') ?>"><?= _i('close') ?></a> + </div> + <?php if ($share->formType() === 'advanced') { ?> + <a target="_blank" rel="noreferrer" class="btn" title="<?= _t('conf.sharing.more_information') ?>" href="<?= $share->help() ?>"><?= _i('help') ?></a> + <?php } ?> + </div> + </div> + <?php } ?> + + <div class="form-group"> + <div class="group-controls"> + <select> + <?php foreach (FreshRSS_Share::enum() as $share) { ?> + <option value='<?= $share->type() ?>' data-form='<?= $share->formType() ?>' data-help='<?= $share->help() ?>' data-method='<?= $share->method() ?>' data-field='<?= $share->field() ?>'> + <?= $share->name(true) ?> + </option> + <?php } ?> + </select> + <a href='#' class='share add btn' title="<?= _t('conf.sharing.add') ?>"><?= _i('add') ?></a> + </div> + </div> + + <div class="form-group form-actions"> + <div class="group-controls"> + <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button> + <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button> + </div> + </div> + </form> +</div> |
