Skip to content

Commit bc5640a

Browse files
committed
Remove deprecated Symbol literal for *.scala.html files via regex
find core-play27/ play27-bootstrap3/ play27-bootstrap4/ -name *.scala.html | xargs sed -i "s/'\([^, ]\+\),/Symbol(\"\1\"),/g"
1 parent 9b16992 commit bc5640a

13 files changed

Lines changed: 14 additions & 14 deletions

play27-bootstrap3/module/app/views/b3/inputWrapped.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@(inputType: String, field: Field, args: (Symbol,Any)*)(inputGroup: Html => Html)(implicit fc: b3.B3FieldConstructor, messages: MessagesProvider)
2-
@inputFormGroup(field, withFeedback = true, withLabelFor = true, bs.Args.withAddingStringValue(args, 'class, "form-control")) { fieldInfo =>
2+
@inputFormGroup(field, withFeedback = true, withLabelFor = true, bs.Args.withAddingStringValue(args, Symbol("class"), "form-control")) { fieldInfo =>
33
@inputGroup {
44
<input type="@inputType" id="@fieldInfo.id" name="@fieldInfo.name" value="@fieldInfo.value" @toHtmlArgs(fieldInfo.innerArgsMap)>
55
@if(fieldInfo.hasFeedback) {

play27-bootstrap3/module/app/views/b3/selectWithContent.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
val multiple = bs.ArgsMap.isTrue(argsMap, Symbol("multiple"))
1515
(argsMap, disabled, multiple)
1616
}) { case (argsMap, disabled, multiple) =>
17-
@inputFormGroup(field, withFeedback = false, withLabelFor = true, bs.Args.withDefault(bs.Args.withAddingStringValue(args, 'class, "form-control"), Symbol("disabled") -> disabled)) { fieldInfo =>
17+
@inputFormGroup(field, withFeedback = false, withLabelFor = true, bs.Args.withDefault(bs.Args.withAddingStringValue(args, Symbol("class"), "form-control"), Symbol("disabled") -> disabled)) { fieldInfo =>
1818
@defining( if(multiple) "%s[]".format(fieldInfo.name) else fieldInfo.name ) { selectName =>
1919
@defining( ( !field.indexes.isEmpty && multiple ) match {
2020
case true => field.indexes.map( i => field("[%s]".format(i)).value ).flatten.toSet
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@(args: (Symbol,Any)*)(text: => Html)(implicit fc: b3.B3FieldConstructor, messages: MessagesProvider)
2-
@freeFormGroup(bs.Args.withAddingStringValue(args, 'class, "form-control-static")) { innerArgsMap =>
2+
@freeFormGroup(bs.Args.withAddingStringValue(args, Symbol("class"), "form-control-static")) { innerArgsMap =>
33
<p @toHtmlArgs(innerArgsMap)>@text</p>
44
}(fc, messages)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@(field: Field, args: (Symbol,Any)*)(implicit fc: b3.B3FieldConstructor, messages: MessagesProvider)
2-
@inputFormGroup(field, withFeedback = false, withLabelFor = true, bs.Args.withAddingStringValue(args, 'class, "form-control")) { fieldInfo =>
2+
@inputFormGroup(field, withFeedback = false, withLabelFor = true, bs.Args.withAddingStringValue(args, Symbol("class"), "form-control")) { fieldInfo =>
33
<textarea id="@fieldInfo.id" name="@fieldInfo.name" @toHtmlArgs(fieldInfo.innerArgsMap)>@fieldInfo.value</textarea>
44
}(fc, messages)

play27-bootstrap4/module/app/views/b4/checkbox.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@(field: Field, args: (Symbol,Any)*)(implicit fc: b4.B4FieldConstructor, msgsProv: MessagesProvider)
22
@displayLabelWithInput(inputClass: String, labelClass: String, textOpt: Option[Any], value: Any, fieldInfo: b4.B4FieldInfo) = {
3-
<input type="checkbox" id="@fieldInfo.id" name="@fieldInfo.name" value="@value" @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap, 'class, inputClass + (if (textOpt.isEmpty) " position-static" else "")))>
3+
<input type="checkbox" id="@fieldInfo.id" name="@fieldInfo.name" value="@value" @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap, Symbol("class"), inputClass + (if (textOpt.isEmpty) " position-static" else "")))>
44
@textOpt.map { text =>
55
<label class="@labelClass" for="@fieldInfo.id">
66
@text

play27-bootstrap4/module/app/views/b4/file.scala.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
@inputFormGroup(field, withLabelFor = true, args) { fieldInfo =>
33
@if(fieldInfo.isCustom) {
44
<div class="custom-file">
5-
<input type="file" id="@fieldInfo.id" name="@fieldInfo.name" value="@fieldInfo.value" @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap, 'class, "custom-file-input"))>
5+
<input type="file" id="@fieldInfo.id" name="@fieldInfo.name" value="@fieldInfo.value" @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap, Symbol("class"), "custom-file-input"))>
66
<label class="custom-file-label">@fieldInfo.innerArgsMap.get(Symbol("placeholder"))</label>
77
</div>
88
} else {
9-
<input type="file" id="@fieldInfo.id" name="@fieldInfo.name" value="@fieldInfo.value" @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap, 'class, "form-control-file"))>
9+
<input type="file" id="@fieldInfo.id" name="@fieldInfo.name" value="@fieldInfo.value" @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap, Symbol("class"), "form-control-file"))>
1010
}
1111
}(fc, msgsProv)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@(action: Call, args: (Symbol, Any)*)(body: => Html)(implicit fc: b4.B4FieldConstructor)
2-
<form action="@action.toString" method="@action.method" @toHtmlArgs(bs.Args.withAddingStringValue(bs.Args.inner(args, Symbol("role") -> "form"), 'class, if (bs.Args.isTrue(args, Symbol("_disableDefaultClass"))) None else Some(fc.formClass)).toMap)>
2+
<form action="@action.toString" method="@action.method" @toHtmlArgs(bs.Args.withAddingStringValue(bs.Args.inner(args, Symbol("role") -> "form"), Symbol("class"), if (bs.Args.isTrue(args, Symbol("_disableDefaultClass"))) None else Some(fc.formClass)).toMap)>
33
@body
44
</form>

play27-bootstrap4/module/app/views/b4/horizontal/bsFormGroup.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@(contentHtml: Html, argsMap: Map[Symbol, Any], colLabel: String, colOffset: String, colInput: String)(implicit msgsProv: MessagesProvider)
2-
@b4.bsFormGroupCommon(contentHtml, bs.ArgsMap.withAddingStringValue(argsMap, '_class, "row")) { content =>
2+
@b4.bsFormGroupCommon(contentHtml, bs.ArgsMap.withAddingStringValue(argsMap, Symbol("_class"), "row")) { content =>
33
@argsMap.get(Symbol("_label")).map { label =>
44
<label class="col-form-label @colLabel@if(bs.ArgsMap.isTrue(argsMap, Symbol("_hideLabel"))){ sr-only}">@bs.Args.msg(label)(msgsProv)</label>
55
<div class="@colInput">

play27-bootstrap4/module/app/views/b4/inputWrapped.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@(inputType: String, field: Field, args: (Symbol,Any)*)(inputGroup: Html => Html)(implicit fc: b4.B4FieldConstructor, msgsProv: MessagesProvider)
2-
@inputFormGroup(field, withLabelFor = true, bs.Args.withAddingStringValue(args, 'class, "form-control")) { fieldInfo =>
2+
@inputFormGroup(field, withLabelFor = true, bs.Args.withAddingStringValue(args, Symbol("class"), "form-control")) { fieldInfo =>
33
@inputGroup {
44
<input type="@inputType" id="@fieldInfo.id" name="@fieldInfo.name" value="@fieldInfo.value" @toHtmlArgs(fieldInfo.innerArgsMap)>
55
}

play27-bootstrap4/module/app/views/b4/radioOption.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@(inputValue: Any, label: Any, args: (Symbol, Any)*)(implicit extraInfo: (Boolean, Boolean, B4FieldInfo), fc: B4FieldConstructor, msgsProv: MessagesProvider)
22
@displayLabelWithInput(inputClass: String, labelClass: String, fieldInfo: b4.B4FieldInfo) = {
3-
<input type="radio" id="@(fieldInfo.id)_@inputValue" name="@fieldInfo.name" value="@inputValue"@if(fieldInfo.value == Some(inputValue)){ checked} @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap ++ args.toMap, 'class, inputClass))>
3+
<input type="radio" id="@(fieldInfo.id)_@inputValue" name="@fieldInfo.name" value="@inputValue"@if(fieldInfo.value == Some(inputValue)){ checked} @toHtmlArgs(bs.ArgsMap.withAddingStringValue(fieldInfo.innerArgsMap ++ args.toMap, Symbol("class"), inputClass))>
44
<label class="@labelClass" for="@(fieldInfo.id)_@inputValue">
55
@bs.Args.msg(label)(msgsProv)
66
</label>

0 commit comments

Comments
 (0)