Bladeren bron

Layout add subscription (#3289)

* Category first

I kept hitting the 'add' button for a category when adding a new feed

* Blanks

Mix of spaces
Alexandre Alapetite 5 jaren geleden
bovenliggende
commit
2b0f93b013
1 gewijzigde bestanden met toevoegingen van 28 en 28 verwijderingen
  1. 28 28
      app/views/subscription/add.phtml

+ 28 - 28
app/views/subscription/add.phtml

@@ -1,10 +1,27 @@
 <?php $this->partial('aside_subscription'); ?>
 
 <div class="post drop-section">
-    <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
+	<a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
+
+	<h2><?= _t('sub.title.add_category') ?></h2>
+	<form action="<?= _url('category', 'create') ?>" method="post">
+		<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
+		<div class="form-group">
+			<label class="group-name" for="new-category"><?= _t('sub.category') ?></label>
+			<div class="group-controls">
+				<input id="new-category" name="new-category" type="text" autocomplete="off"/>
+			</div>
+		</div>
+
+		<div class="form-group form-actions">
+			<div class="group-controls">
+				<button type="submit" class="btn btn-important"><?= _t('gen.action.add') ?></button>
+			</div>
+		</div>
+	</form>
 
 	<h2><?= _t('sub.title.add_feed') ?></h2>
-    <form id="add_rss" method="post" action="<?= _url('feed', 'add') ?>" autocomplete="off">
+	<form id="add_rss" method="post" action="<?= _url('feed', 'add') ?>" autocomplete="off">
 		<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
 
 		<div class="form-group">
@@ -17,17 +34,17 @@
 		<div class="form-group">
 			<label class="group-name" for="category"><?= _t('sub.category') ?></label>
 			<div class="group-controls">
-                <select name="category" id="category">
-                <?php foreach ($this->categories as $cat) { ?>
-                <option value="<?= $cat->id() ?>"<?= $cat->id() == 1 ? ' selected="selected"' : '' ?>>
-                    <?= $cat->name() ?>
-                </option>
-                <?php } ?>
-                </select>
+				<select name="category" id="category">
+				<?php foreach ($this->categories as $cat) { ?>
+				<option value="<?= $cat->id() ?>"<?= $cat->id() == 1 ? ' selected="selected"' : '' ?>>
+					<?= $cat->name() ?>
+				</option>
+				<?php } ?>
+				</select>
 			</div>
 		</div>
 
-        <legend><?= _t('sub.feed.auth.configuration') ?></legend>
+		<legend><?= _t('sub.feed.auth.configuration') ?></legend>
 		<div class="form-group">
 			<label class="group-name" for="http_user"><?= _t('sub.feed.auth.username') ?></label>
 			<div class="group-controls">
@@ -36,7 +53,7 @@
 		</div>
 
 		<div class="form-group">
-        <label class="group-name" for="http_pass"><?= _t('sub.feed.auth.password') ?></label>
+		<label class="group-name" for="http_pass"><?= _t('sub.feed.auth.password') ?></label>
 			<div class="group-controls">
 				<input id="http_pass" name="http_pass" type="text" value=" " autocomplete="new-password"/>
 			</div>
@@ -71,21 +88,4 @@
 			</div>
 		</div>
 	</form>
-
-	<h2><?= _t('sub.title.add_category') ?></h2>
-	<form action="<?= _url('category', 'create') ?>" method="post">
-		<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
-		<div class="form-group">
-			<label class="group-name" for="new-category"><?= _t('sub.category') ?></label>
-			<div class="group-controls">
-				<input id="new-category" name="new-category" type="text" autocomplete="off"/>
-			</div>
-		</div>
-
-		<div class="form-group form-actions">
-			<div class="group-controls">
-				<button type="submit" class="btn btn-important"><?= _t('gen.action.add') ?></button>
-			</div>
-		</div>
-	</form>
 </div>