1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
freshrss_ynh/sources/app/views/feed/add.phtml

92 lines
3.7 KiB
PHTML
Raw Normal View History

2014-07-23 15:52:50 +02:00
<?php if ($this->feed) { ?>
<div class="post">
2015-02-08 18:55:48 +01:00
<h1><?php echo _t('sub.feed.add'); ?></h1>
2014-07-23 15:52:50 +02:00
<?php if (!$this->load_ok) { ?>
2015-02-08 18:55:48 +01:00
<p class="alert alert-error"><span class="alert-head"><?php echo _t('gen.short.damn'); ?></span> <?php echo _t('feedback.sub.feed.internal_problem', _url('index', 'logs')); ?></p>
2014-07-23 15:52:50 +02:00
<?php } ?>
<form method="post" action="<?php echo _url('feed', 'add'); ?>" autocomplete="off">
2015-02-08 18:55:48 +01:00
<legend><?php echo _t('sub.feed.informations'); ?></legend>
2014-07-23 15:52:50 +02:00
<?php if ($this->load_ok) { ?>
<div class="form-group">
2015-02-08 18:55:48 +01:00
<label class="group-name"><?php echo _t('sub.feed.title'); ?></label>
2014-07-23 15:52:50 +02:00
<div class="group-controls">
<label><?php echo $this->feed->name() ; ?></label>
</div>
</div>
<?php $desc = $this->feed->description(); if ($desc != '') { ?>
<div class="form-group">
2015-02-08 18:55:48 +01:00
<label class="group-name"><?php echo _t('sub.feed.description'); ?></label>
2014-07-23 15:52:50 +02:00
<div class="group-controls">
<label><?php echo htmlspecialchars($desc, ENT_NOQUOTES, 'UTF-8'); ?></label>
</div>
</div>
<?php } ?>
<div class="form-group">
2015-02-08 18:55:48 +01:00
<label class="group-name"><?php echo _t('sub.feed.website'); ?></label>
2014-07-23 15:52:50 +02:00
<div class="group-controls">
<?php echo $this->feed->website(); ?>
2015-02-08 18:55:48 +01:00
<a class="btn" target="_blank" href="<?php echo $this->feed->website(); ?>"><?php echo _i('link'); ?></a>
2014-07-23 15:52:50 +02:00
</div>
</div>
<?php } ?>
<div class="form-group">
2015-02-08 18:55:48 +01:00
<label class="group-name" for="url"><?php echo _t('sub.feed.url'); ?></label>
2014-07-23 15:52:50 +02:00
<div class="group-controls">
<div class="stick">
<input type="text" name="url_rss" id="url" class="extend" value="<?php echo $this->feed->url(); ?>" />
2015-02-08 18:55:48 +01:00
<a class="btn" target="_blank" href="<?php echo $this->feed->url(); ?>"><?php echo _i('link'); ?></a>
2014-07-23 15:52:50 +02:00
</div>
2015-02-08 18:55:48 +01:00
<a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->feed->url(); ?>"><?php echo _t('sub.feed.validator'); ?></a>
2014-07-23 15:52:50 +02:00
</div>
</div>
<div class="form-group">
2015-02-08 18:55:48 +01:00
<label class="group-name" for="category"><?php echo _t('sub.category'); ?></label>
2014-07-23 15:52:50 +02:00
<div class="group-controls">
<select name="category" id="category">
<?php foreach ($this->categories as $cat) { ?>
<option value="<?php echo $cat->id(); ?>"<?php echo $cat->id() == 1 ? ' selected="selected"' : ''; ?>>
<?php echo $cat->name(); ?>
</option>
<?php } ?>
2015-02-08 18:55:48 +01:00
<option value="nc"><?php echo _t('sub.category.new'); ?></option>
2014-07-23 15:52:50 +02:00
</select>
<span style="display: none;">
2015-02-08 18:55:48 +01:00
<input type="text" name="new_category[name]" id="new_category_name" autocomplete="off" placeholder="<?php echo _t('sub.category.new'); ?>" />
2014-07-23 15:52:50 +02:00
</span>
</div>
</div>
2015-02-08 18:55:48 +01:00
<legend><?php echo _t('sub.feed.auth.http'); ?></legend>
2014-07-23 15:52:50 +02:00
<?php $auth = $this->feed->httpAuth(false); ?>
<div class="form-group">
2015-02-08 18:55:48 +01:00
<label class="group-name" for="http_user"><?php echo _t('sub.feed.auth.username'); ?></label>
2014-07-23 15:52:50 +02:00
<div class="group-controls">
2015-11-06 16:54:20 +01:00
<input type="text" name="http_user" id="http_user" class="extend" value="<?php echo empty($auth['username']) ? ' ' : $auth['username']; ?>" autocomplete="off" />
2014-07-23 15:52:50 +02:00
</div>
2015-02-08 18:55:48 +01:00
<label class="group-name" for="http_pass"><?php echo _t('sub.feed.auth.password'); ?></label>
2014-07-23 15:52:50 +02:00
<div class="group-controls">
<input type="password" name="http_pass" id="http_pass" class="extend" value="<?php echo $auth['password']; ?>" autocomplete="off" />
</div>
<div class="group-controls">
2015-02-08 18:55:48 +01:00
<?php echo _i('help'); ?> <?php echo _t('sub.feed.auth.help'); ?>
2014-07-23 15:52:50 +02:00
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
2015-02-08 18:55:48 +01:00
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
<button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
2014-07-23 15:52:50 +02:00
</div>
</div>
</form>
</div>
<?php } ?>