Check-in [96b4a74064]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added web interface for creating SHA3 repos
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:96b4a740646a9bd767535ebef465f5861e14e195
User & Date: rkeene 2017-03-16 16:07:29
Context
2017-03-16
16:29
Fixed issue calling Fossil binary to unset SSH command check-in: 101e430ec6 user: rkeene tags: trunk
16:07
Added web interface for creating SHA3 repos check-in: 96b4a74064 user: rkeene tags: trunk
16:04
Updated to support creating SHA3 repositories (disabled by default) at the nano layer check-in: 1f8460d3c5 user: rkeene tags: trunk
Changes

Changes to public/secure/repository/create.php.

25
26
27
28
29
30
31


32
33
34
35
36
37
38
39

        if (isset($_POST['project-code']) && !empty($_POST['project-code'])) {
            $projectCode = $_POST['project-code'];
        } else {
            $projectCode = null;
        }



        if ($result = $fossil->newRepo($_POST['repository-name'], $password, $private, $projectCode)) {
            $view->user     = $user;
            $view->name     = $_POST['repository-name'];
            $view->private  = $private;
            $view->password = $result;
            $view->success  = true;
        }
        else {







>
>
|







25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

        if (isset($_POST['project-code']) && !empty($_POST['project-code'])) {
            $projectCode = $_POST['project-code'];
        } else {
            $projectCode = null;
        }

        $sha3 = isset($_POST['sha3']);

        if ($result = $fossil->newRepo($_POST['repository-name'], $password, $private, $projectCode, $sha3)) {
            $view->user     = $user;
            $view->name     = $_POST['repository-name'];
            $view->private  = $private;
            $view->password = $result;
            $view->success  = true;
        }
        else {

Changes to public/secure/repository/presentation/create.tpl.

23
24
25
26
27
28
29

30
31
32
33
34
35
36
    <ol>
        <li><? $this->form_text('repository-name') ?></li>
        <li><? $this->form_password('repository-password', 'Repository password <em>(Optional)</em>') ?></li>
        <li>
            <? $this->form_checkbox('private', null, 'Make this repository private? <em>(Prevents repositories from being listed as public only, lock down within fossil still required.)</em>') ?>
        </li>
        <li><? $this->form_text('project-code', null, 'Override project code <em>(Optional, but may be needed if pushing an already created repo to Flint.)</em>') ?></li>

    </ol>
    <p>
        <? $this->form_button('Create Repository') ?>
        <img class="loader" src="/global/media/loader.gif" alt="Loading..." />
    </p>
</form>
<? endif ?>







>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    <ol>
        <li><? $this->form_text('repository-name') ?></li>
        <li><? $this->form_password('repository-password', 'Repository password <em>(Optional)</em>') ?></li>
        <li>
            <? $this->form_checkbox('private', null, 'Make this repository private? <em>(Prevents repositories from being listed as public only, lock down within fossil still required.)</em>') ?>
        </li>
        <li><? $this->form_text('project-code', null, 'Override project code <em>(Optional, but may be needed if pushing an already created repo to Flint.)</em>') ?></li>
        <li><? $this->form_checkbox('sha3', null, 'Use SHA3 for initial commit <em>(All clients will require Fossil 2.0 or newer)</em>') ?></li>
    </ol>
    <p>
        <? $this->form_button('Create Repository') ?>
        <img class="loader" src="/global/media/loader.gif" alt="Loading..." />
    </p>
</form>
<? endif ?>