tazlito diff live.cgi @ rev 399

Improve GUI; misc changes
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 20 17:05:51 2015 +0200 (2015-11-20)
parents 5d7c04a1ac79
children a047e5c78492
line diff
     1.1 --- a/live.cgi	Thu Nov 05 21:48:22 2015 +0100
     1.2 +++ b/live.cgi	Fri Nov 20 17:05:51 2015 +0200
     1.3 @@ -2,147 +2,198 @@
     1.4  #
     1.5  # CGI interface for SliTaz Live systems using Tazlito and TazUSB.
     1.6  #
     1.7 -# Copyright (C) 2011 SliTaz GNU/Linux - BSD License
     1.8 +# Copyright (C) 2011-2015 SliTaz GNU/Linux - BSD License
     1.9  #
    1.10  
    1.11 -if [ "$1" == "call" ]; then
    1.12 +if [ "$1" == 'call' ]; then
    1.13  	case "$2" in
    1.14 -	merge_cleanup)
    1.15 -		mv -f $3.merged $3
    1.16 -		for i in $4/*; do
    1.17 -			umount -d $i
    1.18 -		done
    1.19 -		rm -rf $4
    1.20 -		exit ;;
    1.21 +		merge_cleanup)
    1.22 +			mv -f $3.merged $3
    1.23 +			for i in $4/*; do
    1.24 +				umount -d $i
    1.25 +			done
    1.26 +			rm -rf $4
    1.27 +			exit ;;
    1.28  	esac
    1.29  fi
    1.30  
    1.31 +
    1.32  # Common functions from libtazpanel
    1.33 +
    1.34  . lib/libtazpanel
    1.35  get_config
    1.36  
    1.37 +
    1.38  #------
    1.39  # menu
    1.40  #------
    1.41  
    1.42  case "$1" in
    1.43  	menu)
    1.44 -		TEXTDOMAIN_original=$TEXTDOMAIN
    1.45 +		TEXTDOMAIN_original="$TEXTDOMAIN"
    1.46  		export TEXTDOMAIN='tazlito'
    1.47  		cat <<EOT
    1.48 -<li><a data-icon="cd" href="live.cgi" data-root>$(gettext 'Live')</a>
    1.49 +<li><a data-icon="cd" href="live.cgi" data-root>$(_ 'Live')</a>
    1.50  	<menu>
    1.51 -		<li><a data-icon="" href="live.cgi?liveusb" data-root>$(gettext 'Create a live USB key')</a></li>
    1.52 -		<li><a data-icon="" href="live.cgi#liveiso" data-root>$(gettext 'Create a live CD-ROM')</a></li>
    1.53 -		<li><a data-icon="" href="live.cgi#hybrid" data-root>$(gettext 'Create a hybrid ISO')</a></li>
    1.54 -		<li><a data-icon="" href="live.cgi#loram" data-root>$(gettext 'Convert ISO to loram')</a></li>
    1.55 -		<li><a data-icon="" href="live.cgi#meta" data-root>$(gettext 'Build a meta ISO')</a></li>
    1.56 +		<li><a data-icon="" href="live.cgi?liveusb" data-root>$(_ 'Create a live USB key')</a></li>
    1.57 +		<li><a data-icon="" href="live.cgi#liveiso" data-root>$(_ 'Create a live CD-ROM')</a></li>
    1.58 +		<li><a data-icon="" href="live.cgi#hybrid" data-root>$(_ 'Create a hybrid ISO')</a></li>
    1.59 +		<li><a data-icon="" href="live.cgi#loram" data-root>$(_ 'Convert ISO to loram')</a></li>
    1.60 +		<li><a data-icon="" href="live.cgi#meta" data-root>$(_ 'Build a meta ISO')</a></li>
    1.61  	</menu>
    1.62  </li>
    1.63  EOT
    1.64 -		export TEXTDOMAIN=$TEXTDOMAIN_original
    1.65 +		export TEXTDOMAIN="$TEXTDOMAIN_original"
    1.66  		exit
    1.67  esac
    1.68  
    1.69  
    1.70 -TITLE=$(gettext 'TazPanel - Live')
    1.71 +TEXTDOMAIN='tazlito'
    1.72 +TITLE=$(_ 'Live')
    1.73  header
    1.74  
    1.75 +
    1.76  # Build arguments to create a meta iso using 'tazlito merge' command
    1.77 -merge_args()
    1.78 -{
    1.79 -	tmp=$1
    1.80 +
    1.81 +merge_args() {
    1.82 +	tmp="$1"
    1.83  	first=true
    1.84  	i=1
    1.85  	while [ -n "$(GET input$i)" ]; do
    1.86  		echo "$(stat -c "%s" $(GET input$i)) $(GET input$i) $(GET ram$i)"
    1.87  		$((i++))
    1.88 -	done | sort -nr | while read size file ram; do
    1.89 +	done | sort -nr | \
    1.90 +	while read size file ram; do
    1.91  		if $first; then
    1.92  			cp $file $(GET metaoutput)
    1.93  			echo -n "$ram $(GET metaoutput) "
    1.94  			first=false
    1.95  			continue
    1.96  		fi
    1.97 -		dir=$tmp/$(basename $file)
    1.98 -		mkdir $dir
    1.99 -		mount -o loop,ro $file $dir
   1.100 +		dir="$tmp/$(basename $file)"
   1.101 +		mkdir "$dir"
   1.102 +		mount -o loop,ro "$file" "$dir"
   1.103  		echo -n "$ram $dir/boot/rootfs.gz "
   1.104  	done
   1.105  }
   1.106  
   1.107 +
   1.108  #
   1.109  # Commands executed in Xterm first
   1.110  #
   1.111  
   1.112  case " $(GET) " in
   1.113  	*\ loramoutput\ *)
   1.114 +		export output='raw'
   1.115 +		DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' \
   1.116  		$TERMINAL $TERM_OPTS \
   1.117 -			-T "build loram iso" \
   1.118 -			-e "tazlito build-loram $(GET input) $(GET loramoutput) $(GET type)" & ;;
   1.119 +			-T "$(_ 'Convert ISO to loram')" \
   1.120 +			-e "tazlito build-loram $(GET input) $(GET loramoutput) $(GET type)" &
   1.121 +		;;
   1.122 +
   1.123  	*\ meta\ *)
   1.124  		tmp=/tmp/$(basename $0).$$
   1.125  		cleanup="sh $0 call merge_cleanup $(GET output) $tmp"
   1.126 +		export output='raw'
   1.127 +		DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' \
   1.128  		$TERMINAL $TERM_OPTS \
   1.129 -			-T "build meta iso" \
   1.130 +			-T "$(_ 'Build a meta ISO')" \
   1.131  			-e "tazlito merge $(merge_args $tmp); \
   1.132 -				gettext 'ENTER to quit'; read i; \
   1.133 -				$cleanup" & ;;
   1.134 +				_ 'ENTER to quit'; read i; \
   1.135 +				$cleanup" &
   1.136 +		;;
   1.137 +
   1.138  	*\ hybrid\ *)
   1.139 +		export output='raw'
   1.140 +		DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' \
   1.141  		$TERMINAL $TERM_OPTS \
   1.142 -			-T "build hybrid iso" \
   1.143 -			-e "iso2exe $(GET input)" & ;;
   1.144 +			-T "$(_ 'Create a hybrid ISO')" \
   1.145 +			-e "iso2exe $(GET input)" &
   1.146 +		;;
   1.147  esac
   1.148  
   1.149 +
   1.150  #
   1.151  # Commands
   1.152  #
   1.153  
   1.154  case " $(GET) " in
   1.155 +
   1.156  	*\ create\ *)
   1.157  		#
   1.158  		# Create a flavor file and ISO in options with all settings
   1.159  		# Step by step interface and store files in cache.
   1.160  		#
   1.161 -		gettext 'TODO' ;;
   1.162 +		xhtml_header
   1.163 +		_ 'TODO'
   1.164 +		;;
   1.165 +
   1.166  	*\ liveusb\ *)
   1.167 -		xhtml_header
   1.168 -		cat << EOT
   1.169 -<div id="wrapper">
   1.170 -	<h2>$(gettext 'SliTaz LiveUSB')</h2>
   1.171 -	<p>$(gettext 'Create Live USB SliTaz systems')<p>
   1.172 -</div>
   1.173 +		TITLE="$(_ 'SliTaz LiveUSB')"
   1.174 +		xhtml_header "$(_ 'Create Live USB SliTaz systems')"
   1.175 +		cat <<EOT
   1.176 +<section>
   1.177 +	<header>$(_ 'SliTaz LiveUSB')</header>
   1.178  
   1.179 -<p>$(gettext "Generate SliTaz LiveUSB media and boot in RAM! Insert a LiveCD \
   1.180 -into the cdrom drive, select the correct device and press Generate.")</p>
   1.181 +	<form method="get" action="$SCRIPT_NAME" class="wide">
   1.182 +		<div>
   1.183 +$(_ "Generate SliTaz LiveUSB media and boot in RAM! Insert a Live CD \
   1.184 +into the CD-ROM drive, select the correct device and press Generate.")
   1.185 +		</div>
   1.186  
   1.187 -<form method="get" action="$SCRIPT_NAME">
   1.188 -	<input type="hidden" name="liveusb" />
   1.189 -	$(gettext 'USB Media to use:')
   1.190 -	<select name="gen">
   1.191 +		<input type="hidden" name="liveusb" />
   1.192 +		<footer>
   1.193 +			$(_ 'USB Media to use:')
   1.194 +			<select name="gen" id="gen">
   1.195  EOT
   1.196  		# List disk if there is a plugged USB device
   1.197  		if [ -d /proc/scsi/usb-storage ]; then
   1.198 -			for i in `blkid | cut -d ":" -f 1`; do
   1.199 -				echo "<option value='$i'>$i</option>"
   1.200 +			for dev in /sys/block/sd*; do
   1.201 +				# removable writable sd* device:
   1.202 +				if [ "$(cat $dev/removable)" == '1' -a "$(cat $dev/ro)" == '0' ]; then
   1.203 +					echo "<optgroup label='$(cat $dev/device/vendor) $(cat $dev/device/model):'>"
   1.204 +					for part in $dev/sd*; do
   1.205 +						[ ! -d "$part" ] && break
   1.206 +						linuxdev=$(readlink -f /dev/block/$(cat $part/dev))
   1.207 +						cat <<EOT
   1.208 +<option value='$linuxdev'>$(basename $linuxdev) [$(blkid -o value -s TYPE "$linuxdev")]
   1.209 + $(blkid -o value -s LABEL "$linuxdev") ($(cat $part/size | blk2h))</option>
   1.210 +EOT
   1.211 +					done
   1.212 +					echo '</optgroup>'
   1.213 +				fi
   1.214  			done
   1.215  		else
   1.216 -			echo "<option value="">$(gettext 'Not found')</option>"
   1.217 +			echo "<option value=''>$(_ 'Not found')</option>"
   1.218  		fi
   1.219 -		cat << EOT
   1.220 -	</select>
   1.221 -	<input type="submit" value="$(gettext 'Generate')" />
   1.222 -</form>
   1.223 +
   1.224 +		cat <<EOT
   1.225 +			</select>
   1.226 +			<button type="submit" data-icon="removable">$(_ 'Generate')</button>
   1.227 +		</footer>
   1.228 +	</form>
   1.229 +</section>
   1.230  EOT
   1.231 -		if [ "$(GET gen)" ]; then
   1.232 -			cat << EOT
   1.233 -<h3>tazusb gen-liveusb $(GET gen)</h3>
   1.234 -<pre>
   1.235 +
   1.236 +		gen="$(GET gen)"
   1.237 +		if [ -n "$gen" ]; then
   1.238 +			cat <<EOT
   1.239 +<script>document.getElementById("gen").value = "$gen";</script>
   1.240 +
   1.241 +<section>
   1.242 +	<header>tazusb gen-liveusb $gen</header>
   1.243 +	<pre>
   1.244  EOT
   1.245  			# No pipe here so output is displayed in realtime
   1.246 -			yes | tazusb gen-liveusb $(GET gen)
   1.247 -			echo '</pre>'
   1.248 -		fi ;;
   1.249 +			yes | tazusb gen-liveusb $gen
   1.250 +		cat <<EOT
   1.251 +	</pre>
   1.252 +</section>
   1.253 +EOT
   1.254 +		fi
   1.255 +
   1.256 +		;;
   1.257 +
   1.258  	*\ write_iso\ *)
   1.259  		xhtml_header
   1.260  
   1.261 @@ -152,14 +203,14 @@
   1.262  		until [ -f /rootfs.gz ]; do
   1.263  			sleep 1
   1.264  		done
   1.265 -		cat << EOT
   1.266 +		cat <<EOT
   1.267  <fieldset>
   1.268  $(head /tmp/tazlitowriteiso | sed "s|$|<p></p>|g" | sed '/.gvfs/d')
   1.269  <li id="fssize"> </li>
   1.270  EOT
   1.271  		until [ ! -f /rootfs.gz ]; do
   1.272  			sleep 1
   1.273 -		cat << EOT
   1.274 +		cat <<EOT
   1.275  <script type="text/javascript">
   1.276  document.getElementById('fssize').innerHTML = "<h4>$(boldify $(du -mh /rootfs.gz | cut -f1))</h4>";
   1.277  </script>
   1.278 @@ -192,163 +243,192 @@
   1.279  		tail -n5 /tmp/tazlitowriteiso | sed "s|$|<p></p>|g"
   1.280  		ls -l /home/slitaz/distro
   1.281  		echo "</fieldset>"
   1.282 -		echo "Use ' <code>tazlito emu-iso</code> ' to check it" ;;
   1.283 +		echo "Use ' <code>tazlito emu-iso</code> ' to check it"
   1.284 +		;;
   1.285 +
   1.286  	*)
   1.287  		#
   1.288  		# Default xHTML content
   1.289  		#
   1.290 -		xhtml_header
   1.291 -		cat << EOT
   1.292 -<header id="liveiso"> <header>
   1.293 -<div id="wrapper">
   1.294 -	<h2>$(gettext 'SliTaz Live Systems')</h2>
   1.295 -	<p>$(gettext 'Create and manage Live CD or USB SliTaz systems')<p>
   1.296 -</div>
   1.297 +		TITLE="$(_ 'SliTaz Live Systems')"
   1.298 +		xhtml_header "$(_ 'Create and manage Live CD or USB SliTaz systems')"
   1.299  
   1.300 -<div id="actions">
   1.301 -	<a class="button" href="$SCRIPT_NAME?liveusb">
   1.302 -		<img src="$IMAGES/harddisk.png" />$(gettext 'Create LiveUSB')</a>
   1.303 -</div>
   1.304 +		cat <<EOT
   1.305  
   1.306 -<fieldset >
   1.307 -<h3 id="loram">$(gettext 'Write a Live CD')</h3>
   1.308 +<section id="liveiso">
   1.309 +	<header>$(_ 'Write a Live CD')</header>
   1.310  
   1.311 -<!-- id="livecd" -->
   1.312 -
   1.313 -<div>
   1.314 -<p>$(gettext "The command writeiso will generate an ISO image of the current \
   1.315 +	<form method="get" action="$SCRIPT_NAME" class="wide">
   1.316 +		<div>
   1.317 +$(_ "The command writeiso will generate an ISO image of the current \
   1.318  filesystem as is, including all files in the /home directory. It is an easy \
   1.319  way to remaster a SliTaz Live system, you just have to: boot, modify, \
   1.320 -writeiso.")</p>
   1.321 +writeiso.")
   1.322 +		</div>
   1.323  
   1.324 -<form method="get" action="$SCRIPT_NAME">
   1.325 -	$(gettext 'Compression type:')
   1.326 -	<select name="write_iso">
   1.327 -<!--
   1.328 -		<option value="gzip">gzip</option>
   1.329 --->
   1.330 -		<option value="lzma">lzma</option>
   1.331 -		<option value="none">$(gettext 'none')</option>
   1.332 -	</select>
   1.333 -	<input type="submit" value="$(gettext 'Write ISO')" />
   1.334 -</form>
   1.335 -$([ ! -d /media/cdrom/boot/isolinux -a ! -f /boot/*slitaz* ] && \
   1.336 -echo '<p> Cannot find Slitaz ISO/cd mounted in /media/cdrom (You will get only rootfs.gz)</p>')
   1.337 -</div>
   1.338 -</fieldset>
   1.339 +		<table>
   1.340 +			<tr><td>
   1.341 +				$(_ 'Compression type:')
   1.342 +				<select name="write_iso">
   1.343 +					<!-- option value="gzip">gzip</option -->
   1.344 +					<option value="lzma">lzma</option>
   1.345 +					<option value="none">$(_ 'none')</option>
   1.346 +				</select>
   1.347 +			</td></tr>
   1.348 +		</table>
   1.349 +EOT
   1.350  
   1.351 -<p></p>
   1.352 -<fieldset>
   1.353 +		if [ ! -d /media/cdrom/boot/isolinux -a ! -f /boot/*slitaz* ]; then
   1.354 +			msg warn "$(_ 'Cannot find SliTaz ISO/CD mounted in /media/cdrom (You will get only rootfs.gz)')"
   1.355 +		fi
   1.356  
   1.357 -<h3>$(gettext 'Live CD tools')</h3>
   1.358 +		inputiso="$(GET input)"; inputiso="${inputiso:-/root/}"
   1.359 +		loramoutput="$(GET loramoutput)"; loramoutput="${loramoutput:-/root/loram.iso}"
   1.360  
   1.361 -<fieldset>
   1.362 -<h4>$(gettext 'Convert ISO to loram')</h4>
   1.363 +		cat <<EOT
   1.364 +		<footer>
   1.365 +			<button type="submit" data-icon="cd">$(_ 'Write ISO')</button>
   1.366 +		</footer>
   1.367 +	</form>
   1.368 +</section>
   1.369  
   1.370 -<!-- id="loram" -->
   1.371  
   1.372 -<p>$(gettext "This command will convert an ISO image of a SliTaz Live CD to a \
   1.373 -new ISO image requiring less RAM to run.")</p>
   1.374 +<section><header>$(_ 'Live CD tools')</header>
   1.375  
   1.376 -<form method="get" action="$SCRIPT_NAME#loram">
   1.377 -	<table>
   1.378 -		<tr>
   1.379 -			<td>$(gettext 'ISO to convert')
   1.380 -				<input type="text" accept=".iso" name="input" value="/root/" /></td>
   1.381 -		</tr>
   1.382 -		<tr>
   1.383 -			<td><input type="radio" name="type" value="ram" id="type1" checked />
   1.384 -				<label for="type1">$(gettext 'The filesystem is always in RAM')</label>
   1.385 -			</td>
   1.386 -		</tr>
   1.387 -		<tr>
   1.388 -			<td><input type="radio" name="type" value="smallcdrom" id="type2" />
   1.389 -				<label for="type2">$(gettext 'The filesystem may be on a small CDROM')</label>
   1.390 -			</td>
   1.391 -		</tr>
   1.392 -		<tr>
   1.393 -			<td><input type="radio" name="type" value="cdrom" id="type3" />
   1.394 -				<label for="type3">$(gettext 'The filesystem may be on a large CDROM')</label>
   1.395 -			</td>
   1.396 -		</tr>
   1.397 -		<tr>
   1.398 -			<td>$(gettext 'ISO to create')
   1.399 -				<input type="text" accept=".iso" name="loramoutput" value="/root/loram.iso" />
   1.400 -			</td>
   1.401 -		</tr>
   1.402 -	</table>
   1.403 -	<input type="submit" value="$(gettext 'Convert ISO to loram')" />
   1.404 -</form>
   1.405 -</fieldset>
   1.406  
   1.407 -<fieldset>
   1.408 -<h4 id="hybrid">$(gettext 'Build a hybrid ISO')</h4>
   1.409 +<section id="loram">
   1.410 +	<header>$(_ 'Convert ISO to loram')</header>
   1.411  
   1.412 -<p>$(gettext "Add a master boot sector and an EXE header to the ISO image. \
   1.413 -")</p>
   1.414 +	<form method="get" action="$SCRIPT_NAME#loram" class="wide">
   1.415 +		<div>
   1.416 +$(_ "This command will convert an ISO image of a SliTaz Live CD to a \
   1.417 +new ISO image requiring less RAM to run.")
   1.418 +		</div>
   1.419  
   1.420 -<form method="get" action="$SCRIPT_NAME#hybrid">
   1.421 -	<table>
   1.422 -	<tr>
   1.423 -	<td>
   1.424 -	$(gettext 'ISO to convert')
   1.425 -	<input type="text" name="input" value="/root/" />
   1.426 -	</td>
   1.427 -	</tr>
   1.428 -	</table>
   1.429 -	<input type="submit" name="hybrid" value="$(gettext 'Build a hybrid ISO')" />
   1.430 -</form>
   1.431 -</fieldset>
   1.432 +		<table>
   1.433 +			<tr><td>
   1.434 +				$(_ 'ISO to convert')
   1.435 +				<input type="text" accept=".iso" name="input" value="$inputiso" />
   1.436 +			</td></tr>
   1.437 +			<tr><td>
   1.438 +				<input type="radio" name="type" value="ram" id="type1" checked />
   1.439 +				<label for="type1">$(_ 'The filesystem is always in RAM')</label>
   1.440 +			</td></tr>
   1.441 +			<tr><td>
   1.442 +				<input type="radio" name="type" value="smallcdrom" id="type2" />
   1.443 +				<label for="type2">$(_ 'The filesystem may be on a small CD-ROM')</label>
   1.444 +			</td></tr>
   1.445 +			<tr><td>
   1.446 +				<input type="radio" name="type" value="cdrom" id="type3" />
   1.447 +				<label for="type3">$(_ 'The filesystem may be on a large CD-ROM')</label>
   1.448 +			</td></tr>
   1.449 +			<tr><td>
   1.450 +				$(_ 'ISO to create')
   1.451 +				<input type="text" accept=".iso" name="loramoutput" value="$loramoutput" />
   1.452 +			</td></tr>
   1.453 +		</table>
   1.454  
   1.455 -<fieldset>
   1.456 -<h4 id="meta">$(gettext 'Build a meta ISO')</h4>
   1.457 +		<script>
   1.458 +EOT
   1.459 +		case "$(GET type)" in
   1.460 +			smallcdrom) sel='type2';;
   1.461 +			cdrom) sel='type3';;
   1.462 +			*) sel='type1';;
   1.463 +		esac
   1.464 +		echo "document.getElementById('$sel').checked = true;"
   1.465 +		cat <<EOT
   1.466 +		</script>
   1.467  
   1.468 -<p>$(gettext "Combines several ISO flavors like nested Russian dolls. The \
   1.469 -amount of RAM available at startup will be used to select the utmost one.")</p>
   1.470 +		<footer>
   1.471 +			<button type="submit" data-icon="cd">$(_ 'Convert ISO to loram')</button>
   1.472 +		</footer>
   1.473 +	</form>
   1.474 +</section>
   1.475  
   1.476 -<form method="get" action="$SCRIPT_NAME#meta">
   1.477 -	<table>
   1.478 +
   1.479 +<section id="hybrid">
   1.480 +	<header>$(_ 'Build a hybrid ISO')</header>
   1.481 +
   1.482 +	<form method="get" action="$SCRIPT_NAME#hybrid" class="wide">
   1.483 +		<div>
   1.484 +$(_ "Add a master boot sector and an EXE header to the ISO image.")
   1.485 +		</div>
   1.486 +
   1.487 +		<table>
   1.488 +			<tr><td>
   1.489 +				$(_ 'ISO to convert')
   1.490 +				<input type="text" name="input" value="/root/" />
   1.491 +			</td></tr>
   1.492 +		</table>
   1.493 +
   1.494 +		<footer>
   1.495 +			<button type="submit" name="hybrid" data-icon="cd">$(_ 'Build a hybrid ISO')</button>
   1.496 +		</footer>
   1.497 +	</form>
   1.498 +</section>
   1.499 +
   1.500 +
   1.501 +<section id="meta">
   1.502 +	<header>$(_ 'Build a meta ISO')</header>
   1.503 +
   1.504 +	<form method="get" action="$SCRIPT_NAME#meta">
   1.505 +		<div>
   1.506 +$(_ "Combines several ISO flavors like nested Russian dolls. The \
   1.507 +amount of RAM available at startup will be used to select the utmost one.")
   1.508 +		</div>
   1.509 +
   1.510 +		<table class="wide">
   1.511  EOT
   1.512 -		i=""
   1.513 +		i=''
   1.514  		while [ -n "$(GET addmeta)" ]; do
   1.515  			[ -n "$(GET input$i)" ] || break
   1.516  			j=$(($i + 1))
   1.517 -			cat << EOT
   1.518 -		<tr>
   1.519 -			<td>$(gettext 'ISO number') $j: $(GET input$i)
   1.520 -				<input type="hidden" name="input$j" value="$(GET input$i)" />
   1.521 -			</td>
   1.522 -			<td>$(gettext 'Minimum RAM'): $(GET ram$i)
   1.523 -				<input type="hidden" name="ram$j" value="$(GET ram$i)" />
   1.524 -			</td>
   1.525 -		</tr>
   1.526 +			cat <<EOT
   1.527 +			<tr>
   1.528 +				<td>
   1.529 +					$(_ 'ISO number %s:' "$j") $(GET input$i)
   1.530 +					<input type="hidden" name="input$j" value="$(GET input$i)" />
   1.531 +				</td>
   1.532 +				<td>
   1.533 +					$(_ 'Minimum RAM:') $(GET ram$i)
   1.534 +					<input type="hidden" name="ram$j" value="$(GET ram$i)" />
   1.535 +				</td>
   1.536 +			</tr>
   1.537  EOT
   1.538  			i=$j
   1.539  		done
   1.540  		metaoutput="$(GET metaoutput)"
   1.541  		[ -n "$metaoutput" ] || metaoutput="/root/meta.iso"
   1.542  
   1.543 -		cat << EOT
   1.544 -		<tr>
   1.545 -			<td>$(gettext 'ISO to add')
   1.546 -				<input type="text" name="input" value="/root/" />
   1.547 -			</td>
   1.548 -			<td>$(gettext 'Minimum RAM')
   1.549 -				<input type="text" name="ram" value="128M" />
   1.550 -				<input type="submit" name="addmeta" value="$(gettext 'Add to the list')" />
   1.551 -			</td>
   1.552 -		</tr>
   1.553 -		<tr>
   1.554 -			<td>$(gettext 'ISO to create')
   1.555 -				<input type="text" name="metaoutput" value="$metaoutput" />
   1.556 -			</td>
   1.557 -		</tr>
   1.558 -	</table>
   1.559 -	<input type="submit" name="meta" value="$(gettext 'Build a meta ISO')" />
   1.560 -</form>
   1.561 -</fieldset>
   1.562 -</fieldset>
   1.563 +		cat <<EOT
   1.564 +			<tr>
   1.565 +				<td>
   1.566 +					$(_ 'ISO to add')
   1.567 +					<input type="text" name="input" value="/root/" />
   1.568 +				</td>
   1.569 +				<td>
   1.570 +					$(_ 'Minimum RAM:')
   1.571 +					<input type="text" name="ram" value="128M" />
   1.572 +					<button type="submit" name="addmeta" value="addmeta" data-icon="add">$(_ 'Add to the list')</button>
   1.573 +				</td>
   1.574 +			</tr>
   1.575 +			<tr>
   1.576 +				<td>
   1.577 +					$(_ 'ISO to create')
   1.578 +					<input type="text" name="metaoutput" value="$metaoutput" />
   1.579 +				</td>
   1.580 +				<td>
   1.581 +				</td>
   1.582 +			</tr>
   1.583 +		</table>
   1.584  
   1.585 +		<footer>
   1.586 +			<button type="submit" name="meta" value="meta" data-icon="cd">$(_ 'Build a meta ISO')</button>
   1.587 +		</footer>
   1.588 +	</form>
   1.589 +</section>
   1.590 +
   1.591 +</section>
   1.592  EOT
   1.593  		;;
   1.594  esac