aboutsummaryrefslogtreecommitdiff
path: root/src/guff/views/ecrs/test/auth.ecr
blob: ec6e9a807d9bf049a340400f72e413ade5b5100f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<div
  class='navbar navbar-inverse navbar-static-top'
  role='navigation'
>
  <div class='container-fluid'>
    <div class='navbar-header'>
      <a
        href='/test/auth'
        class='navbar-brand'
      ><%=
        h(TITLE)
      %></a><!-- navbar-brand -->
    </div><!-- navbar-default -->
  </div><!-- container-fluid -->
</div><!-- navbar -->

<div class='container'>
  <div class='col-md-6'>
    <div class='panel panel-default'>
      <div class='panel-heading'>
        <b>
          <i class='fa fa-users'></i>
          Users
        </b>

        <a
          href='#'
          id='reload'
          class='btn btn-default btn-xs pull-right'
          title='Reload users.'
        >
          <span class='loading'>
            <i class='fa fa-refresh'></i>
          </span>

          <span class='loading hidden'>
            <i class='fa fa-spinner fa-spin'></i>
          </span>
        </a><!-- #reload -->
      </div><!-- panel-heading -->

      <div id='users' class='list-group'>
        <span class='list-group-item disabled'>
          <i class='fa fa-spinner fa-spin'></i>
          Loading...
        </span><!-- list-group-item -->
      </div><!-- list-group -->
    </div><!-- panel -->
  </div><!-- col-md-6 -->

  <div class='col-md-6'>
    <div class='panel panel-default'>
      <div class='panel-heading'>
        <b>
          <i class='fa fa-user-plus'></i>
          Create User
        </b>
      </div><!-- panel-heading -->

      <div class='panel-body'>
        <div class='form-group'>
          <label for='user-name'>
            Name
          </label>

          <input
            type='text'
            id='user-name'
            class='form-control'
            title='Enter name of user.'
            placeholder='John Doe'
          />
        </div><!-- form-group -->

        <div class='form-group'>
          <label for='user-email'>
            Email Address
          </label>

          <input
            type='text'
            id='user-email'
            class='form-control'
            title='Enter user email.'
            placeholder='johndoe@example.com'
          />
        </div><!-- form-group -->

        <div class='form-group'>
          <label for='user-password'>
            Password
          </label>

          <input
            type='password'
            id='user-password'
            class='form-control'
            title='Enter password.'
          />
        </div><!-- form-group -->

        <div class='form-group'>
          <label for='user-role'>
            Role
          </label>

          <select
            id='user-role'
            class='form-control'
            title='Choose role of user.'
          ><%=
            get_roles
          %></select>
        </div><!-- form-group -->

        <div class='form-group'>
          <button
            id='create-user'
            class='btn btn-primary'
            title='Create user.'
          >
            <span class='hidden loading'>
              <i class='fa fa-spinner fa-spin'></i>
              Please Wait...
            </span>

            <span class='loading'>
              <i class='fa fa-user-plus'></i>
              Create User
            </span>
          </button>
        </div><!-- form-group -->
      </div><!-- panel-body -->
    </div><!-- panel -->

    <div class='panel panel-default'>
      <div class='panel-heading'>
        <b>
          <i class='fa fa-lock'></i>
          Login
        </b>
      </div><!-- panel-heading -->

      <div class='panel-body'>
        <div class='form-group'>
          <label for='login-email'>
            Email
          </label>

          <input
            type='text'
            id='login-email'
            class='form-control'
            title='Enter email address.'
            placeholder='foo@example.com'
          />
        </div><!-- form-group -->

        <div class='form-group'>
          <label for='login-password'>
            Password
          </label>

          <input
            type='password'
            id='login-password'
            class='form-control'
            title='Enter password.'
          />
        </div><!-- form-group -->

        <div class='form-group'>
          <button
            id='login'
            class='btn btn-primary'
            title='Log in.'
          >
            <span class='hidden loading'>
              <i class='fa fa-spinner fa-spin'></i>
              Please Wait...
            </span>

            <span class='loading'>
              <i class='fa fa-unlock-alt'></i>
              Log In
            </span>
          </button>
        </div><!-- form-group -->
      </div><!-- panel-body -->
    </div><!-- panel -->
  </div><!-- col-md-6 -->
</div><!-- container -->