Skip to content

Commit 8531320

Browse files
momijizukamoriCocoa
andauthored
Foundationize assorted pages (#3501)
* Add some utility classes to help with styling * Foundationize changeemail.tt * Foundationize manage/icons * Foundationize manage/index.tt * Foundationize manage/emailpost.tt * Foundationize invite/index.tt --------- Co-authored-by: Cocoa <momijizukamori@gmail.com>
1 parent 22ce170 commit 8531320

File tree

11 files changed

+202
-234
lines changed

11 files changed

+202
-234
lines changed

cgi-bin/DW/Controller/InviteCodes.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ sub management_handler {
4242
unless LJ::check_form_auth( $args->{lj_form_auth} );
4343

4444
if ( DW::InviteCodeRequests->create( userid => $remote->id, reason => $args->{reason} ) ) {
45-
$rv->{req_yes} = 1;
45+
$r->add_msg( LJ::Lang::ml('/invite/index.tt.msg.request.success'), $r->SUCCESS );
4646
}
4747
else {
48-
$rv->{req_no} = 1;
48+
$r->add_msg( LJ::Lang::ml('/invite/index.tt.msg.request.error'), $r->ERROR );
4949
}
5050
}
5151

htdocs/scss/foundation/components/_forms.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,12 @@ $select-hover-bg-color: scale-color($select-bg-color, $lightness: -3%) !default;
398398
}
399399
}
400400

401+
/* Create a label-like style, for visual matching in forms */
402+
.label {
403+
@include form-label;
404+
cursor: auto;
405+
}
406+
401407
/* Attach elements to the beginning or end of an input */
402408
.prefix,
403409
.postfix { @include prefix-postfix-base; }

htdocs/scss/foundation/components/_grid.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,18 @@ $last-child-float: $opposite-direction !default;
160160
}
161161
}
162162

163+
.#{$size}-right {
164+
text-align:right;
165+
}
166+
167+
.#{$size}-left {
168+
text-align:left;
169+
}
170+
171+
.#{$size}-center {
172+
text-align:center;
173+
}
174+
163175
.column,
164176
.columns { @include grid-column($columns:false, $position:true); }
165177

htdocs/scss/foundation/foundation.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// @import 'foundation/components/inline-lists';
2626
// @import 'foundation/components/joyride';
2727
// @import 'foundation/components/keystrokes';
28-
@import 'foundation/components/labels';
28+
// @import 'foundation/components/labels';
2929
// @import 'foundation/components/magellan';
3030
// @import 'foundation/components/orbit';
3131
@import 'foundation/components/pagination';

htdocs/stc/editicons.css

Lines changed: 12 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,16 @@
1-
#Content input.text,
2-
#Content input.radio,
3-
#Content input.file,
4-
#Content label.left,
5-
#Content .helplink {
6-
float: left;
7-
}
8-
#Content .helplink {
9-
margin-top: 4px;
10-
}
11-
#Content label.left {
12-
min-width: 6em !important;
13-
line-height: 20px !important;
14-
}
15-
* html #Content label.left {
16-
width: 6em;
17-
}
181
hr {
192
clear: left;
203
}
21-
#userpic_authas {
22-
margin-bottom: 10px;
23-
}
24-
#uploadBox {
25-
float: left;
26-
width: 300px;
27-
margin: 0 15px 0 0;
28-
}
294

30-
#uploadBox-inner {
31-
padding: 6px 12px;
32-
}
33-
#upload_desc {
34-
font-size: 0.9em;
35-
line-height: 1.4em;
36-
margin-bottom: 8px;
37-
}
38-
#uploadBox p {
39-
margin: 0 0 6px 0;
40-
}
41-
#uploadBox p.detail {
42-
margin: 0 0 10px 0
43-
}
44-
#uploadBox input.text {
45-
width: 240px;
5+
#uploadBox-inner {
6+
padding: 0.5em 0.75em;
467
}
8+
479
#submit_wrapper {
4810
text-align: center;
4911
}
50-
#current_userpics {
51-
margin-left: 320px;
52-
}
5312
.userpic_wrapper {
54-
margin: 10px 0 5px 0;
13+
margin: 0.5rem 0 0.25rem 0;
5514
}
5615
.EditIconsUserpic {
5716
margin-right: 10px;
@@ -63,11 +22,7 @@ hr {
6322
clear: left;
6423
margin-bottom: 10px;
6524
}
66-
.userpic_defaultdelete input.radio,
67-
.userpic_defaultdelete input.checkbox,
68-
.userpic_defaultdelete label {
69-
float: none;
70-
}
25+
7126
@media all and (min-width: 0px){ .userpic_controls {
7227
width: 400px;
7328
}}
@@ -80,46 +35,26 @@ hr {
8035
*:first-child+html .userpic_controls input.text {
8136
width: 180px;
8237
}
83-
.userpic_keywords, .userpic_comments, .userpic_descriptions, .userpic_defaultdelete {
84-
float: left;
85-
clear: left;
86-
margin-bottom: 8px;
87-
}
38+
8839
.userpic_defaultdelete {
8940
width: 200px;
9041
}
9142
.userpic_rename {
9243
width: 200px;
93-
margin-left: 6.5em;
9444
margin-bottom: 4px;
9545
margin-top: 4px;
9646
}
97-
* html .userpic_keywords,
98-
* html .userpic_comments,
99-
* html .userpic_descriptions {
100-
width: 290px;
101-
}
102-
*:first-child+html .userpic_keywords,
103-
*:first-child+html .userpic_comments,
104-
*:first-child+html .userpic_descriptions {
105-
width: 290px;
106-
}
107-
html>body .userpic_defaultdelete {
108-
margin-left: 6.5em;
109-
}
110-
.userpic_defaultdelete label {
111-
margin-right: 10px !important;
112-
}
11347
#no_default_userpic {
11448
text-align: center;
11549
}
116-
#userpic_submit {
117-
width: 120px;
118-
margin: 0 auto;
119-
text-align: center;
120-
}
50+
12151
#no_default_userpic input.radio,
12252
#no_default_userpic label {
12353
float: none;
12454
display: inline;
12555
}
56+
57+
.helper {
58+
margin-top: 0.5rem;
59+
font-size: smaller;
60+
}

views/changeemail.tt

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ the same terms as Perl itself. For a copy of the license, please reference
1212
'perldoc perlartistic' or 'perldoc perlgpl'.
1313

1414
%]
15-
15+
[%- CALL dw.active_resource_group( "foundation" ) -%]
1616
[%- sections.title = '.title' | ml -%]
1717

1818
[% IF success %]
@@ -44,37 +44,43 @@ the same terms as Perl itself. For a copy of the license, please reference
4444
</div>
4545
[% END %]
4646

47-
<div class='highlight-box'>
48-
<form method="get">
49-
[% authas_html %]
50-
</form>
51-
47+
<div class='highlight-box columns'>
48+
<form method="get">[%- authas_html -%]</form>
5249
<form action='[% site.root %]/changeemail[% getextra %]' method='post'>
53-
[% dw.form_auth() %]
54-
55-
<br/><br/><div>[% '.label.username' | ml %]<br />[% u.ljuser_display %]</div><br/>
56-
<div>[% '.label.oldemail' | ml %]<br />
50+
[%- dw.form_auth() -%]
51+
<div class="row">
52+
<div class="columns medium-4 medium-right"><span class="label">[% '.label.username' | ml %]</span></div>
53+
<div class="columns medium-8 medium-left">[% u.ljuser_display %]</div>
54+
</div>
55+
<div class="row">
56+
<div class="columns medium-4 medium-right"><span class="label">[% '.label.oldemail' | ml %]<span></div>
57+
<div class="columns medium-8 medium-left">
5758
[% IF noemail %]
5859
<em>[% '.noemail' | ml %]</em>
5960
[% ELSE %]
6061
<b>[% old_email %]</b>
6162
[% END %]
62-
</div><br/>
63-
<div>[% '.label.newemail' | ml %]<br />
64-
<input type='text' name='email' size='50' maxlength='50' tabindex='1' />
63+
</div>
64+
</div>
65+
<div class="row">
66+
<div class="columns medium-4 medium-right"><label for="email" class="inline">[% '.label.newemail' | ml %]</label></div>
67+
<div class="columns medium-8 medium-left">
68+
<input type='text' name='email' size='50' maxlength='50' tabindex='1'/>
6569
[% IF email_checkbox %]
66-
<br />[% email_checkbox %]
70+
[% email_checkbox %]
6771
[% END %]
68-
</div><br />
72+
</div>
73+
</div>
6974
[% UNLESS is_identity %]
70-
<div>[% '.label.password2' | ml(remote = remote.ljuser_display) %]<br />
71-
<input type='password' name='password' size='50' maxlength='[% site.maxlength_pass %]' tabindex='2' /></div>
75+
<div class="row">
76+
<div class="columns medium-4 medium-right"><label for="password" class="inline">[% '.label.password2' | ml(remote = remote.ljuser_display) %]</label></div>
77+
<div class="columns medium-8 medium-left"><input type='password' name='password' size='50' maxlength='[% site.maxlength_pass %]' tabindex='2'/></div>
78+
</div>
7279
[% END %]
80+
<div class="row"><input type='submit' tabindex='3' value="[% '.btn.change' | ml %]" /></div>
81+
</form>
7382
</div>
74-
<br />
7583

76-
<div class='action-box'><div class='inner'>
77-
<input type='submit' tabindex='3' value="[% '.btn.change' | ml %]" />
78-
</div></div><div class='clear-floats'></div>
79-
</form>
84+
85+
8086
[% END %]

0 commit comments

Comments
 (0)