#15 -- Fix collapsible
This commit is contained in:
parent
5bc65ea8d9
commit
11f3b93b9d
@ -2,7 +2,6 @@ package ru.ulstu.extractor.mvc.model;
|
|||||||
|
|
||||||
public class RepoForm {
|
public class RepoForm {
|
||||||
private String repo;
|
private String repo;
|
||||||
|
|
||||||
private String branch;
|
private String branch;
|
||||||
|
|
||||||
public String getRepo() {
|
public String getRepo() {
|
||||||
@ -24,7 +23,8 @@ public class RepoForm {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "RepoForm{" +
|
return "RepoForm{" +
|
||||||
"subject='" + repo +
|
"repo='" + repo + '\'' +
|
||||||
|
", branch='" + branch + '\'' +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,19 +9,34 @@
|
|||||||
<div class="container" layout:fragment="content">
|
<div class="container" layout:fragment="content">
|
||||||
<form action="#" th:action="@{/newRepo}" th:object="${repoForm}" method="post">
|
<form action="#" th:action="@{/newRepo}" th:object="${repoForm}" method="post">
|
||||||
<p style="color:red" th:text="${error}"></p>
|
<p style="color:red" th:text="${error}"></p>
|
||||||
|
<button class="btn btn-outline-dark dropdown-toggle" type="button" data-toggle="collapse"
|
||||||
|
data-target="#collapseOne" aria-expanded="false" aria-controls="collapseExample"
|
||||||
|
th:if="${repoForm.repo != null}"
|
||||||
|
th:text="${repoForm.repo == null ? 'Репозиторий' : repoForm.repo}">
|
||||||
|
Button with data-target
|
||||||
|
</button>
|
||||||
|
<div id="collapseOne" th:class="${repoForm.repo == null ? 'collapse show' : 'collapse'}"
|
||||||
|
aria-labelledby="headingOne">
|
||||||
|
<div class="card-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="repoUrl">Ваш git репозиторий (https url):</label>
|
<label for="repoUrl">Ваш git репозиторий (https url):</label>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 col-sm-12">
|
<div class="col-md-8 col-sm-12">
|
||||||
<input id="repoUrl" type="text" class="form-control" aria-label="Ваш git репозиторий (https url)"
|
<input id="repoUrl" type="text" class="form-control"
|
||||||
|
aria-label="Ваш git репозиторий (https url)"
|
||||||
th:field="*{repo}">
|
th:field="*{repo}">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-sm-12">
|
<div class="col-md-4 col-sm-12">
|
||||||
<input type="submit" class="btn btn-outline-primary w-100" name="send" value="Индексировать"/>
|
<input type="submit" class="btn btn-outline-primary w-100" name="send"
|
||||||
|
value="Индексировать"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" th:if="${repoForm.repo != null}">
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="collapseTwo" class="collapse show" aria-labelledby="headingOne" th:if="${repoForm.repo != null}">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-group">
|
||||||
<label for="select-branch">Ветки:</label>
|
<label for="select-branch">Ветки:</label>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 col-sm-12">
|
<div class="col-md-8 col-sm-12">
|
||||||
@ -38,6 +53,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
@ -49,5 +66,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user